This is the mail archive of the gcc-bugs@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]

c++/5507: Overzealous implicit typename warning



>Number:         5507
>Category:       c++
>Synopsis:       Overzealous implicit typename warning
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Jan 27 12:46:00 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:     Paolo Carlini
>Release:        3.1 20020127 (experimental)
>Organization:
>Environment:
i686-pc-linux-gnu
>Description:
The following snippet:
/////////////
template<typename _CharT>
class __ctype_abstract_base
{
  typedef int mask;
};

template<typename _CharT>
class ctype : public __ctype_abstract_base<_CharT>
{
  typedef typename ctype::mask mask;
};
/////////////

Triggers:

testcase2.cc:10: warning: `typename ctype<_CharT>::mask' is implicitly a
   typename
testcase2.cc:10: warning: implicit typename is deprecated, please see the
   documentation for details

And it should'nt. See also:

http://gcc.gnu.org/ml/libstdc++/2001-12/msg00336.html
>How-To-Repeat:

>Fix:
Refine the code which went in with:
http://gcc.gnu.org/ml/gcc-patches/2001-12/msg00128.html
>Release-Note:
>Audit-Trail:
>Unformatted:


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