PING: [PATCH: c++/diagnostic/18313] Warn for pointless qualifiers on return type

Andrew Pinski
Sun Nov 12 22:32:00 GMT 2006

On Sun, 2006-11-12 at 23:08 +0100, Dirk Mueller wrote:
> On Sunday, 12. November 2006 22:25, Andrew Pinski wrote:
> > > >   typedef const int I;
> > > >   I f();
> > I don't think it should warn for this testcase.
> Care to explain? Note that this behaviour is consistent with the C frontend, 
> and IMHO I think it makes more sense to warn in this case than to not warn 
> about it (after all, the qualifiers are *there*, even if not given 
> explicitely). 

Because this qualifier is not given explicitly in function return type,
maybe the C front-end should also change.

Andrew Pinski

More information about the Gcc-patches mailing list