New gcc 4.0.0 warnings seem spurious
Gabriel Dos Reis
gdr@integrable-solutions.net
Wed Apr 27 12:15:00 GMT 2005
Zack Weinberg <zack@codesourcery.com> writes:
[...]
| >> Bruce Lilly <blilly@erols.com> writes:
| >> > static const unsigned char AAA = 0x1U;
| >> > static const unsigned char BBB = 0x2U;
| >>
| >> Again, C does not work the way you think. These are not constants.
| >
| > But if they are never modified, they evaluate to constants, right?
|
| The compiler is allowed, but not required, to replace references to
| them with their known values.
Yes, however this
enum { V = AAA };
requires a diagnostic.
-- Gaby
More information about the Gcc
mailing list