c++/9851: [3.4 regression] confusing error message when using '.', not '->'

Giovanni Bajo giovannibajo@libero.it
Mon May 5 00:02:00 GMT 2003


http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=9851

As a reference, with Comeau I get:

"pr9851.cpp", line 6: error: expression must have class type
        foo () { g_.do_nothing (); }
                 ^

which is not bad but probably I prefer the one in GCC before 3.4. With MSVC,
I get:

pr9851.cpp
pr9851.cpp(6) : error C2228: left of '.do_nothing' must have
class/struct/union type
        type is 'goo *'
        did you intend to use '->' instead?

which is nice.

Giovanni Bajo



More information about the Gcc-bugs mailing list