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

Dirk Mueller dmuell@gmx.net
Mon Nov 27 22:43:00 GMT 2006


On Monday, 27. November 2006 03:23, Gabriel Dos Reis wrote:

> |         * pt.c (tsubst_function_type): Warn for type qualifiers on
> |         return type for dependent types.
> This ChangeLog entry seems to indicate that we warn even for dependent
> type, when in fact I was suggesting to warn only for non-dependent type.

We're warning for the non-dependent case, e.g. for this:

template<typename T> struct S {
  const int f() const;
  const T g() const;
  T h() const;
};

we will only warn for f() in the "normal" case. if the instantiation has a cv 
qualifier, we will warn on h() as well (but not on g()). As far as I 
understood, this was the consensus. 

If you have a better way to describe this behaviour, please tell me. I'd also 
be interested if the TREE_NO_WARNING on the type node has any undesired 
side-effect (there was none exposed by the testsuite). 


Thanks,
Dirk



More information about the Gcc-patches mailing list