Re: label inside for-loop

From: Chris Torek (nospam_at_torek.net)
Date: 06/08/04


Date: 8 Jun 2004 18:24:37 GMT

In article <news:ca3vu4$rbh$1@news.tudelft.nl>
Capstar <news@deleg.homeip.net> writes:

[ "goto label; ... { ... label: }" produces the complaint ]

>resource-loop.c:38: warning: deprecated use of label at end of compound
>statement

As others have noted, the immediate fix is to use a null statement.

It is worth pointing out that what is "deprecated" here is actually
a GNUC extension -- the syntax above has always been invalid in
ANSI C. The GCC folks decided to allow it, and have now decided
to stop allowing it.

For those who want to find one, there is a moral in here about
depending on compiler-specific extensions. :-)

-- 
In-Real-Life: Chris Torek, Wind River Systems
Salt Lake City, UT, USA (40°39.22'N, 111°50.29'W)  +1 801 277 2603
email: forget about it   http://web.torek.net/torek/index.html
Reading email is like searching for food in the garbage, thanks to spammers.


Relevant Pages

  • Re: Exception Handling - Good Practice
    ... It's worth pointing out that in this particular scenario, ... reading email addresses from a DB so there is no opportunity for interaction ... have some Regex code to parse email addresses, so I'm going to handle it ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Exception Handling - Good Practice
    ... It's worth pointing out that in this particular scenario, ... reading email addresses from a DB so there is no opportunity for interaction ... CJM ...
    (microsoft.public.dotnet.languages.vb)