This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: New gcc 4.0.0 warnings seem spurious


Vincent Lefevre <vincent+gcc@vinc17.org> 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?

No.

| The fact that they are not considered as constant expressions,
| is it due to the fact that the environment is allowed to modify
| them?

Language restriction -- a difference from C++.

-- Gaby


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]