From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31085 invoked by alias); 26 Jul 2007 22:10:32 -0000 Received: (qmail 31076 invoked by uid 22791); 26 Jul 2007 22:10:31 -0000 X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (65.74.133.4) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 26 Jul 2007 22:10:29 +0000 Received: (qmail 20571 invoked from network); 26 Jul 2007 22:10:27 -0000 Received: from unknown (HELO ?10.253.176.62?) (mitchell@127.0.0.2) by mail.codesourcery.com with ESMTPA; 26 Jul 2007 22:10:27 -0000 Message-ID: <46A91BD6.4090902@codesourcery.com> Date: Thu, 26 Jul 2007 23:09:00 -0000 From: Mark Mitchell User-Agent: Thunderbird 2.0.0.5 (Windows/20070716) MIME-Version: 1.0 To: Paolo Carlini CC: gcc-patches@gcc.gnu.org Subject: Re: [C++ Patch] PR 32108 References: <46960B4C.6070407@suse.de> <469C45D2.8060508@codesourcery.com> <46A71AD2.8090404@suse.de> In-Reply-To: <46A71AD2.8090404@suse.de> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2007-07/txt/msg01953.txt.bz2 Paolo Carlini wrote: >> I think it would be better to call >> cp_parser_label_declaration (just as we do now), but have >> finish_label_decl issue an error message. Then, you can say "__label__ >> declarations are only allowed in function scopes". >> > Yes, I see what you mean, at some point I was figuring out a specific > error message. Then, frankly, noticed that the C front-end was rejecting > it with a similar error and decided to post the simple patch. I still think we should do better, using the approach I suggested above. If that turns out to be hard, we can fall back to your simpler patch. >> void f(int i = ({ __label__ f; ... })) >> > What happens (I'm not expert of such extensions, admittedly), is that > the contruct is already rejected without my patchlet: "error: > statement-expressions are allowed only inside functions"... OK, good. Thanks, -- Mark Mitchell CodeSourcery mark@codesourcery.com (650) 331-3385 x713