pure virtual w/implementation bug in GCC 3.3?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi everyone,

Using GCC 3.3 or GCC 3.2, it appears unable to digest this code:

--------8<--------
class Foo
{
public:
        virtual ~Foo() = 0 { }
};
--------8<--------

> g++33 -c foo.cpp
foo.cpp:4: error: parse error before `{' token
foo.cpp:4: error: missing ';' before right brace

Pure virtual functions can have implementations.  Pure virtual destructors (if I recall correctly) MUST have implementations.

And if the implementation is defined later with GCC 3.2 or 3.3 -- either as inline or not as inline ("out of line"?) -- it digests it with out an issue.

As per Stroustrup's C++PL, the EBNF grammar looks like it should and does support the syntax given above.  (The "implicit inline" of a method given in the class declaration.)

Is this a known bug in GCC?

Or is this a new bug in GCC?

Or am I misinformed?

Thanks,
--Eljay


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux