* C++: Non-allowed exception diagnostic?
@ 2004-03-20 4:06 Frank Pilhofer
2004-03-30 1:20 ` Jim Wilson
0 siblings, 1 reply; 2+ messages in thread
From: Frank Pilhofer @ 2004-03-20 4:06 UTC (permalink / raw)
To: gcc
Hi,
According to ISO C++, compilers are required to accept code that
might cause unexpected exceptions. The example given in in the
standard is
extern void f() throw (X, Y);
void g () throw (X)
{
f ();
}
which is well-formed, despite the fact that f() might throw an
exception of type Y, which is not acceptable according to g's
exception specification.
However, I think it would be helpful if the compiler produced
at least a diagnostic (warning) in this case.
I checked gcc's manual, and didn't see a compiler option that would
enable such diagnostics. Any hope of adding such a feature in future
versions?
Frank
--
Frank Pilhofer ........................................... fp@fpx.de
When money talks, nobody criticises its accent! - Alfred E. Neuman
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2004-03-30 0:20 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-03-20 4:06 C++: Non-allowed exception diagnostic? Frank Pilhofer
2004-03-30 1:20 ` Jim Wilson
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).