This is the mail archive of the gcc-patches@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: PING: [PATCH: c++/diagnostic/18313] Warn for pointless qualifiers on return type


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.

Thanks,
Andrew Pinski


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