This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/11118] [3.4 only] missleading error message on missing typename
- From: "bangerth at dealii dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 9 Jun 2003 01:24:09 -0000
- Subject: [Bug c++/11118] [3.4 only] missleading error message on missing typename
- References: <20030606213538.11118.lars@trolltech.com>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11118
bangerth@dealii.org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |gdr@integrable-solutions.net
------- Additional Comments From bangerth@dealii.org 2003-06-09 01:24 -------
I disagree with the statement that the diagnostics are insufficient, because
there is really not much the compiler can do. See, if no "typename" is
given, the compiler assumes that Foo::Data is a member function/variable.
Since no parentheses are following, it assumes a member variable, and the
star then means multiplication. So far so good, but multiplication with what?
"x" is not a declared variable. That's exactly what the compiler is trying to
tell you.
Honestly, I don't think there is much a compiler can do in this situation if
two-stage name lookup is properly implemented. I leave it to Gaby to decide
what to do with this PR.
Wolfgang