This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Your change breaks something.
- To: jason at cygnus dot com
- Subject: Your change breaks something.
- From: Klaus-Georg Adams <Klaus-Georg dot Adams at chemie dot uni-karlsruhe dot de>
- Date: Mon, 8 Jun 1998 18:26:01 +0200
- CC: egcs-bugs at cygnus dot com
The latest egcs (cvs from about 10.00 GMT+2 on 8 Jun)
complains about the attached testcase:
/egcs/egcs/bin/g++ -ansi -pedantic-errors -c resolve.C
resolve.C: In method `int B::foo()':
resolve.C:14: calling type `B::mode' like a method
while
/egcs/egcs/bin/g++ -V egcs-2.91.33 -ansi -pedantic-errors -c resolve.C
compiles cleanly.
The error message comes from the change:
1998-06-05 Jason Merrill <jason@yorick.cygnus.com>
* semantics.c (finish_object_call_expr): Complain about calling a
TYPE_DECL.
I am pretty sure the code is ok.
kga
--
-------------------------------------------------------------------------
Klaus-Georg Adams Email: Klaus-Georg.Adams@chemie.uni-karlsruhe.de
Institut f. Anorg. Chemie, Lehrstuhl II Tel: 49(0)721 608 3485
Universität Karlsruhe, D-76128 Karlsruhe
-------------------------------------------------------------------------
--------snip resolve.C-------------
// Build don't link.
struct B {
enum mode { first, second };
int foo();
};
struct A {
B::mode mode();
};
extern A* theA;
int B::foo()
{
if ( theA->mode() == first )
return 0;
else
return 1;
}
--------snip resolve.C-------------