From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26539 invoked by alias); 26 Mar 2003 22:16:00 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 26523 invoked by uid 71); 26 Mar 2003 22:16:00 -0000 Date: Wed, 26 Mar 2003 22:16:00 -0000 Message-ID: <20030326221600.26522.qmail@sources.redhat.com> To: nobody@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org, From: Zack Weinberg Subject: Re: c/10231: Request a "reachable" attribute for labels. Reply-To: Zack Weinberg X-SW-Source: 2003-03/txt/msg01847.txt.bz2 List-Id: The following reply was made to PR c/10231; it has been noted by GNATS. From: Zack Weinberg To: archie@dellroad.org Cc: gcc-gnats@gcc.gnu.org Subject: Re: c/10231: Request a "reachable" attribute for labels. Date: Wed, 26 Mar 2003 14:13:14 -0800 archie@dellroad.org writes: > goto label3; > label2: > printf("don't eliminate me\n"); > label3: > printf("ok I'm here now\n"); > > When optimizing -O2 GCC will eliminate the code between > label2 and label3. However I have an application where > I need this code to remain, because I've made the address > of label2 available (via "&&label2") and also have some > asm() statements that are used to jump to label2 that > GCC doesn't know about. Go up a level and tell us what you're really trying to do. The odds are that you can do it without needing to play games with asm statements jumping to labels. That has never been supported, as you will discover if you look at the manual. zw