public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* 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

* Re: C++: Non-allowed exception diagnostic?
  2004-03-20  4:06 C++: Non-allowed exception diagnostic? Frank Pilhofer
@ 2004-03-30  1:20 ` Jim Wilson
  0 siblings, 0 replies; 2+ messages in thread
From: Jim Wilson @ 2004-03-30  1:20 UTC (permalink / raw)
  To: Frank Pilhofer; +Cc: gcc

Frank Pilhofer wrote:
>  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?

Most gcc work is done by volunteers.  If someone volunteers a patch, and 
the patch is well written, then it is likely to be accepted.  We can not 
predict when or whether a volunteer will contribute such a patch though.
-- 
Jim Wilson, GNU Tools Support, http://www.SpecifixInc.com

^ 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).