Re: [PATCH] fix warning about duplicate 'const'

From: Joseph S. Myers
Date: Wed Mar 10 2004 - 05:17:35 EST

On Wed, 10 Mar 2004, Neil Booth wrote:

> > seems dicey at best. I'm not sure what to do about this, actually.
> > We might could do something with a new __nonqual_typeof(a) that
> > strips outermost type qualifications, but I havn't given that much
> > thought.
> Or you could compile in C99 mode?

The gnu89-only kludge allowing compound literals in static initializers in
certain cases, for compatibility with their old ill-defined semantics, is
there because it was needed by Linux; I don't know if it's still needed,
but that would prevent compiling in C99 mode where compound literals have
only their C99 semantics as unnamed variables.

Simpler to restrict the pedwarns for duplicate qualifiers to (pedantic &&
!flag_isoc99) (in all the various cases warned for) and document this as
an extension from C99 that is accepted in C89/C90 mode.

Joseph S. Myers
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at