[Bug c++/11118] [3.4 only] missleading error message on missing typename
bangerth@dealii.org
gcc-bugzilla@gcc.gnu.org
Mon Jun 9 01:24:00 GMT 2003
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
More information about the Gcc-bugs
mailing list