|
From: Gabriel D. R. <Gab...@cm...> - 2000-08-23 22:29:20
|
[ Excuse me if I appear slow to answer, but I'm busy in fixing bugs I
introduced in current gcc cvs. ]
"Christophe Prud'homme" <pru...@MI...> writes:
| > Well, that mess was my fault -- I think the right figure is probably 4.
| > By now, most the testsuite failures should have gone.
| Well g++ 2.96 did a very good job at finding some issues in the code
| especially for the exceptions.
Hmm, now I'm confused, I'm unsure about the original topic...
Anyway...
| one quick question if you don't mind:
| - is a class forward declaration sufficient for exception
| or is the class interface needed also?
|
| class except;
| class A
| {
| public:
| void f() throw(except);
| };
|
| or
|
| <full class definition for except via #include for example>
| class A
| {
| public:
| void f() throw(except);
| };
|
| it seems that g++ 2.96 likes the second one and rejects the first one
Yes, the first construct is ill-formed since
15.4/1:
[...] A type denoted in an exception-specification shall not be an
incomplte type. A type denoted in an exception-specification shall
not denote a pointer or reference to an incomplte type, other than
void*, const void*, volatile void*, or const volatile const*.
-- Gaby
|