Thread View: gnu.gcc.bug
1 messages
1 total messages
Started by Bruno Haible
Tue, 29 Dec 1992 13:32
misleading "limited range" warning
Author: Bruno Haible
Date: Tue, 29 Dec 1992 13:32
Date: Tue, 29 Dec 1992 13:32
22 lines
1285 bytes
1285 bytes
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
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads