This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
gcc gives bogus errors for classes wrapped in 'extern "C"'
- To: <gcc-bugs at gcc dot gnu dot org>
- Subject: gcc gives bogus errors for classes wrapped in 'extern "C"'
- From: turly <turly at apple dot com>
- Date: Thu, 13 Jan 2000 18:56:23 +0000
- Cc: "turly" <turly at apple dot com>
gcc-2.95.2 gives bogus errors for classes wrapped in 'extern "C"'
(I'm not even sure whether this is legal.)
extern "C" {
class Argh {
public:
~Argh ();
void DoSomething (Argh *);
Argh ();
};
}
gcc will give the error
"invalid use of undefined type `class Argh'"
when it sees the "Argh *" parameter of DoSomething ().
(It's even weirder in that these error messages are only given for
methods which occur AFTER the destructor has been seen; i.e., moving
the destructor so it's the LAST method above will result in a clean
compile. <fx:Theme music from _The Twilight Zone_> Hmmm. </fx>)
Any ideas/suggestions, or is this simply a case of "Doctor, it hurts
when I do this." -- "Well, don't do that."?
Thanks!
--turly