Re: label inside for-loop
From: Chris Torek (nospam_at_torek.net)
Date: 06/08/04
- Next message: E. Robert Tisdale: "Re: OOP in C!"
- Previous message: E. Robert Tisdale: "Re: Why do so few people know the difference between arrays and pointers."
- In reply to: Capstar: "label inside for-loop"
- Next in thread: josh: "Re: label inside for-loop"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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.
- Next message: E. Robert Tisdale: "Re: OOP in C!"
- Previous message: E. Robert Tisdale: "Re: Why do so few people know the difference between arrays and pointers."
- In reply to: Capstar: "label inside for-loop"
- Next in thread: josh: "Re: label inside for-loop"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|