From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30469 invoked by alias); 20 Mar 2004 00:56:19 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 30356 invoked from network); 20 Mar 2004 00:56:06 -0000 Received: from unknown (HELO sccrmhc11.comcast.net) (204.127.202.55) by sources.redhat.com with SMTP; 20 Mar 2004 00:56:06 -0000 Received: from ariel.fpx.de (h00045aa24b30.ne.client2.attbi.com[24.147.72.76]) by comcast.net (sccrmhc11) with ESMTP id <2004032000560501100ibfepe>; Sat, 20 Mar 2004 00:56:05 +0000 Received: (from fp@localhost) by ariel.fpx.de (8.12.9/8.12.9) id i2K0tjGJ000647 for gcc@gcc.gnu.org; Fri, 19 Mar 2004 19:55:45 -0500 Date: Sat, 20 Mar 2004 04:06:00 -0000 From: Frank Pilhofer To: gcc@gcc.gnu.org Subject: C++: Non-allowed exception diagnostic? Message-ID: <20040319195544.C582@ariel.ne1.client2.attbi.com> Reply-To: Frank Pilhofer Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i X-SW-Source: 2004-03/txt/msg01191.txt.bz2 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