home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: gnu.gcc.bug
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!ma2s2.mathematik.uni-karlsruhe.de!haible
- From: haible@ma2s2.mathematik.uni-karlsruhe.de (Bruno Haible)
- Subject: misleading "limited range" warning
- Message-ID: <9212291132.AA19062@ma2s2.mathematik.uni-karlsruhe.de>
- Sender: gnulists@ai.mit.edu
- Organization: GNUs Not Usenet
- Distribution: gnu
- Date: Tue, 29 Dec 1992 13:32:38 GMT
- Approved: bug-gcc@prep.ai.mit.edu
- Lines: 23
-
- Compiling the following
-
- =============================== warntest.c ==============================
- int foo ()
- { if (0xFFFFFFFFULL & -1LL) return 4; else return 1; }
- =========================================================================
-
- using "gcc -V 2.3.3 -c -W warntest.c" produces the warning
-
- warntest.c: In function `foo':
- warntest.c:2: warning: comparison is always 1 due to limited range of data type
-
- This is misleading: If the "comparison" ((0xFFFFFFFFULL & -1LL) != 0)
- evaluates to 1 for a certain data type, then it evaluates to 1 for every
- larger integer data type (in this case even for every integer data type).
-
- I'm using gcc 2.3.3, configured i386-linux.
- Btw, long long on i386 now work perfectly. Congratulations!
-
-
- Bruno Haible
- haible@ma2s2.mathematik.uni-karlsruhe.de
-
-