Article View: comp.lang.c
Article #554Re: Taming The Switch-Statement
From: Dan Cross
Date: Mon, 19 Oct 2026 14:35
Date: Mon, 19 Oct 2026 14:35
19 lines
1790 bytes
1790 bytes
In article <11b4smj$1vt4q$1@kst.eternal-september.org>, Keith Thompson <Keith.S.Thompson+u@gmail.com> wrote: >The odd scoping rules for labels don't bother me either. They mean >you can't have two loops or switch statements with the same name in >the same function. I can barely imagine that being inconvenient. An issue is that one might generate such a named loop with a macro. I can imagine that being useful for `XIMPL` type constructs, but C's macros are unusually weak, and C doesn't have something like `(GENSYM)` in Lisp, so you've got to plumb the loop name through the macro invocation: mildly annoying, but not too bad. Then again, if a programmer is abusing macros like that to generate named loops multiple times in the same function, then perhaps the program needs a re-think, ximpl or no. - Dan C.
Technical Details
Message-ID:
<11b59qq$7hk$1@reader2.panix.com>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!panix!.POSTED.spitfire.i.gajendra.net!not-for-mailReferences:
<119qf6l$2rmg3$1@dont-email.me> <20261018223859.000031d3@yahoo.com> <11b4n4s$1q18k$1@dont-email.me> <11b4smj$1vt4q$1@kst.eternal-september.org>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!panix!.POSTED.spitfire.i.gajendra.net!not-for-mail From: cross@spitfire.i.gajendra.net (Dan Cross) Newsgroups: comp.lang.c Subject: Re: Taming The Switch-Statement Date: Mon, 19 Oct 2026 14:35:06 -0000 (UTC) Organization: PANIX Public Access Internet and UNIX, NYC Message-ID: <11b59qq$7hk$1@reader2.panix.com> References: <119qf6l$2rmg3$1@dont-email.me> <20261018223859.000031d3@yahoo.com> <11b4n4s$1q18k$1@dont-email.me> <11b4smj$1vt4q$1@kst.eternal-september.org> Injection-Date: Mon, 19 Oct 2026 14:35:06 -0000 (UTC) Injection-Info: reader2.panix.com; posting-host="spitfire.i.gajendra.net:166.84.136.80"; logging-data="7732"; mail-complaints-to="abuse@panix.com" X-Newsreader: trn 4.0-test77 (Sep 1, 2010) Originator: cross@spitfire.i.gajendra.net (Dan Cross)