From: Frank Pilhofer <fp@fpx.de>
To: gcc@gcc.gnu.org
Subject: C++: Non-allowed exception diagnostic?
Date: Sat, 20 Mar 2004 04:06:00 -0000 [thread overview]
Message-ID: <20040319195544.C582@ariel.ne1.client2.attbi.com> (raw)
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
next reply other threads:[~2004-03-20 0:56 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-03-20 4:06 Frank Pilhofer [this message]
2004-03-30 1:20 ` Jim Wilson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20040319195544.C582@ariel.ne1.client2.attbi.com \
--to=fp@fpx.de \
--cc=gcc@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).