* Forward class in throw declaration.
@ 2001-09-14 7:06 Andrew J. Malton
2001-09-14 7:40 ` Nathan Sidwell
0 siblings, 1 reply; 2+ messages in thread
From: Andrew J. Malton @ 2001-09-14 7:06 UTC (permalink / raw)
To: gcc
The following snippet uses a forward class name in a throw declaration:
class F {
int v;
public:
F (int v) { this-> v = v; }
void raise () throw (F) { throw new F (0); }
};
It compiles and works perfectly well using "gcc version egcs-2.91.66
19990314/Linux (egcs-1.1.2 release)" and "gcc version 2.95.2 19991024
(release)" but when compiled with "gcc version 3.0" it fails to parse:
F.cpp:5: invalid use of undefined type `class F'
F.cpp:1: forward declaration of `class F'
Is this a bug, or newly correct ;-) behaviour, or am I missing something?
A Malton
--
Dr. Andrew Malton, Associate Professor
Department of Computer Science
University of Waterloo
Waterloo, Canada N2L 3G1
http://www.cs.uwaterloo.ca/~ajmalton
tel: +1 519 888 4567 x 5144
fax: +1 519 885 1208
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Forward class in throw declaration.
2001-09-14 7:06 Forward class in throw declaration Andrew J. Malton
@ 2001-09-14 7:40 ` Nathan Sidwell
0 siblings, 0 replies; 2+ messages in thread
From: Nathan Sidwell @ 2001-09-14 7:40 UTC (permalink / raw)
To: Andrew J. Malton; +Cc: gcc
"Andrew J. Malton" wrote:
>
> The following snippet uses a forward class name in a throw declaration:
>
> class F {
> int v;
> public:
> F (int v) { this-> v = v; }
> void raise () throw (F) { throw new F (0); }
> };
>
> It compiles and works perfectly well using "gcc version egcs-2.91.66
> 19990314/Linux (egcs-1.1.2 release)" and "gcc version 2.95.2 19991024
> (release)" but when compiled with "gcc version 3.0" it fails to parse:
>
> F.cpp:5: invalid use of undefined type `class F'
> F.cpp:1: forward declaration of `class F'
>
> Is this a bug, or newly correct ;-) behaviour, or am I missing something?
newly correct. 15.4/1
nathan
--
Dr Nathan Sidwell :: http://www.codesourcery.com :: CodeSourcery LLC
'But that's a lie.' - 'Yes it is. What's your point?'
nathan@codesourcery.com : http://www.cs.bris.ac.uk/~nathan/ : nathan@acm.org
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2001-09-14 7:40 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-09-14 7:06 Forward class in throw declaration Andrew J. Malton
2001-09-14 7:40 ` Nathan Sidwell
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).