------- Comment #4 from manu at gcc dot gnu dot org  2010-04-06 14:25 -------
(In reply to comment #3)
> It is generally presumed that if a new feature is deliberately added in a 
> new language version, as with duplicate qualifiers in C99, then it is 
> useful for it to be allowed with previous versions and not diagnosed by 
> default but only with -pedantic. 

OK. I am happy with this answer for the pedantic part. So this is a GCC
extension for C90, hence, pedwarn if !C99 (warned by pedantic, error with
-pedantic-errors). 

> I think the reason duplicate qualifiers are allowed in C99 is to allow you 
> to use volatile with a typedef name without knowing whether that typedef 
> already includes volatile, for example.

I think we are talking about different things. I only want to warn, not
disallow its use. I don't want it to be a pedwarn just a simple warning (which
may be disabled by default). And it only needs to apply to the precise syntax
when the duplicate appears in the same declaration, which is the precise case
covered by the example above, not in qualifiers derived from other declarations
(your typedef example). I think this is the behaviour of icc.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43651

Reply via email to