[PATCH] fix warning about duplicate 'const'
Richard Henderson
rth@twiddle.net
Wed Mar 10 05:49:00 GMT 2004
On Mon, Mar 08, 2004 at 05:32:11PM -0800, Linus Torvalds wrote:
> Also, I'm not convinced this isn't a gcc regression. It would be stupid to
> "fix" something that makes old gcc's complain, when they may be doing the
> right thing.
Problem is, that we're supposed to complain for
const const int x;
and
typedef const int t;
const t x;
The proposition that we're not supposed to complain for
const int a;
const __typeof(a) x;
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.
r~
More information about the Gcc
mailing list