Regression (of sorts) in 20021111 snapshot

Jack Lloyd lloyd@acm.jhu.edu
Fri Nov 15 15:19:00 GMT 2002


The behaviour of g++ when facing long long constants that don't have an LL
suffix seems to be changing from release to release. Specifically, some
versions print a warning, some an error, some ignore it.

egcs 1.1.2 - fine with it
gcc 2.95.x - Error unless -fpermissive/-pedantic is set, warning with
gcc 3.[01].* - fine
gcc 3.2 - haven't checked
20021111 - same as gcc 2.95.x

This is annoying for me, because I know those constants are bigger than a
long, so a warning is not needed (particularly when a single file has 1000s
of such constants), and errors are even more annoying. I had thought this
behaviour was limited to 2.95.x up until now, though (and have specific
workarounds for those compilers in my build stuff).

I would file a bug in GNATS, but the change seems entirely intentional. I
am just wondering the reason for the recent change, and if there is a way
to work around the problem cleanly (ie my makefiles will continue to work
with egcs 1.1.2, etc), and preferably without a warning at compile time.

Thanks,
  Jack



More information about the Gcc mailing list