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]

[Bug c++/11118] [3.4 only] missleading error message on missing typename


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


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