Possible bug, or at least a severe inconvience.
Scott A Crosby
crosby@qwes.math.cmu.edu
Sun Nov 8 11:08:00 GMT 1998
Hello, I have some code which I wish to have inlined automatically, thus I
am defining it within the class declaration. To make it look pretty, I
wish to have all of the function declarations listed first, and then do
the actual defintions later within the class. Anyways,
If this is non-standard, I think that it still would be a useful
extension. It certainly was keeping my files easier to read.. Other than
this, you have a great compiler, keep up the good work!
class foo {
public:
int bar();
int bar() { return 10;};
};
[crosby@hypercube indep_study]# g++ -c -o /tmp/foo /tmp/foo.cpp
/tmp/foo.cpp:4: `foo::bar()' is already defined in class foo
[crosby@hypercube indep_study]# g++ --version
egcs-2.91.57
More information about the Gcc-bugs
mailing list