This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
c++/9187: Duplicate warning about a missing "typename"
- From: bangerth at ticam dot utexas dot edu
- To: gcc-gnats at gcc dot gnu dot org
- Date: 6 Jan 2003 14:43:09 -0000
- Subject: c++/9187: Duplicate warning about a missing "typename"
- Reply-to: bangerth at ticam dot utexas dot edu
>Number: 9187
>Category: c++
>Synopsis: Duplicate warning about a missing "typename"
>Confidential: no
>Severity: serious
>Priority: low
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Mon Jan 06 06:46:02 PST 2003
>Closed-Date:
>Last-Modified:
>Originator: Wolfgang Bangerth
>Release: unknown-1.0
>Organization:
>Environment:
Present mainline after the merge of the new parser
>Description:
This code (note the missing "typename" keyword)
-----------------------------template <int dim> struct O {
struct I {};
};
template <int dim> void f() {
new O<dim>::I();
};
template void f<1> ();
-----------------------------
makes present CVS (with the new parser) issue
tmp/g> /home/bangerth/bin/gcc-3.4-pre/bin/c++ -o /dev/null -c bug1.cc
bug1.cc: In function `void f()':
bug1.cc:6: error: expected type-name
bug1.cc:6: error: expected type-name
Note the duplicate message. I have another small grieve with
the message, since the line of course contains a type-name,
but what is really missing is a "typename", i.e. hyphen
or not. The old parser issued this:
tmp/g> /home/bangerth/bin/gcc-3.3-pre/bin/c++ -o /dev/null -c bug1.cc
bug1.cc: In function `void f()':
bug1.cc:6: warning: `O<dim>::I' is implicitly a typename
bug1.cc:6: warning: implicit typename is deprecated, please see the
documentation for details
This is more explicit, and would help people who don't
understand the typename-business more.
In any case, both these issues are really minor points, so
I lower the priority.
Regards
Wolfgang
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted: