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: linux-2.5 min()/max() macros generate warnings with gcc-3.0.4and gcc-3.2


On Sun, 10 Nov 2002, Thibaut VARENE wrote:

> But, according to C99, section 6.7.3 "Type qualifiers", paragraph 4,
> "if the same qualifier appears more than once in the same
> specifier-qualifier-list, [...] the behavior is the same as if it
> appeared only once."
> 
> So gcc shouldn't be complaining...

The warning is appropriately conditioned on whether you're in C99 mode.  
If you use -std=c99 or -std=gnu99 you won't get the warning (but Linux
uses at least one feature only permitted in gnu89 mode, treating compound
literals as values that can be used in static initializers rather than
references to anonymous variables which is the C99 notion).

-- 
Joseph S. Myers
jsm28@cam.ac.uk


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