From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 942 invoked by alias); 6 Dec 2006 16:04:16 -0000 Received: (qmail 931 invoked by uid 22791); 6 Dec 2006 16:04:16 -0000 X-Spam-Check-By: sourceware.org Received: from exprod6og51.obsmtp.com (HELO exprod6og51.obsmtp.com) (64.18.1.183) by sourceware.org (qpsmtpd/0.31) with SMTP; Wed, 06 Dec 2006 16:04:08 +0000 Received: from source ([192.150.20.142]) by exprod6ob51.postini.com ([64.18.5.12]) with SMTP; Wed, 06 Dec 2006 08:03:48 PST Received: from inner-relay-3.eur.adobe.com (inner-relay-3b [10.128.4.236]) by outbound-smtp-2.corp.adobe.com (8.12.10/8.12.10) with ESMTP id kB6G48IY006595; Wed, 6 Dec 2006 08:04:08 -0800 (PST) Received: from fe1.corp.adobe.com (fe1.corp.adobe.com [10.8.192.70]) by inner-relay-3.eur.adobe.com (8.12.10/8.12.9) with ESMTP id kB6G3jeA022525; Wed, 6 Dec 2006 08:03:46 -0800 (PST) Received: from namailgen.corp.adobe.com ([10.8.192.91]) by fe1.corp.adobe.com with Microsoft SMTPSVC(6.0.3790.1830); Wed, 6 Dec 2006 08:03:41 -0800 Received: from 10.32.16.88 ([10.32.16.88]) by namailgen.corp.adobe.com ([10.8.192.91]) via Exchange Front-End Server namailhost.corp.adobe.com ([10.8.192.72]) with Microsoft Exchange Server HTTP-DAV ; Wed, 6 Dec 2006 16:03:41 +0000 User-Agent: Microsoft-Entourage/11.2.5.060620 Date: Wed, 06 Dec 2006 16:04:00 -0000 Subject: Re: Exception Specifications From: John Love-Jensen To: Perry Smith CC: MSX to GCC Message-ID: In-Reply-To: <1530B1EA-5C26-46E1-B3C3-0C0B780A7ACB@easesoftware.com> Mime-version: 1.0 Content-type: text/plain; charset="US-ASCII" Content-transfer-encoding: 7bit X-IsSubscribed: yes Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org X-SW-Source: 2006-12/txt/msg00105.txt.bz2 Hi Perry, > Of course, the code produced catches that at run time but I'm looking > for something somehow to tag my functions so that "mistakes" like > this are caught at compile time. (Similar to what happened to you. > I'm looking for a way to catch that at compile time.) I wonder if g+ > + has a compile time flag to catch that. Alas, no. Nor do I know of any "C++ Lint" wholistic analysis tool that provides that information. (If anyone knows of such a tool, PLEASE share that information!) Java's exception scheme is a little more helpful (at compile time) for abiding by the exception contract. But C++ is not Java. And even in Java there are some caveats, and day-in-day-out Java programmers have their own list of issues with Java's exception scheme; so it's no bed of roses over in Java land either. "If we used Java we wouldn't have these problems; we'd have all new problems!" Sincerely, --Eljay