This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: compiler tweak offered
- From: Richard Henderson <rth at redhat dot com>
- To: der Mouse <mouse at Rodents dot Montreal dot QC dot CA>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Thu, 29 Aug 2002 20:39:26 -0700
- Subject: Re: compiler tweak offered
- References: <200208250706.DAA19798@Sparkle.Rodents.Montreal.QC.CA>
On Sun, Aug 25, 2002 at 08:31:19AM +0200, der Mouse wrote:
> I've finally gotten around to doing a hack to gcc I've been meaning to
> for a while, and I'm writing to offer it back to you people if you're
> interested. It permits labeled control structure, as in
>
> for "outer" (elt=root; elt; elt=elt->link)
> { while (...)
> { ...
> switch (...)
> { ....
> if (...) continue "outer";
>
> This affects do, for, while, switch, break, and continue statements.
I don't know about the other maintainers, but personally I
don't feel this extension adds enough expressiveness to
warrent the maintanence hassle. Really, this is just as
easily written as
for (elt=root; elt; elt=elt->link)
{
while (...)
{
if (...) goto continue_outer;
}
...
continue_outer:;
}
> Unfortunately it does cause a reinterpretation of certain very unusual
> legal C code, namely, any do-loop whose body is a non-brace-bracketed
> statement beginning with a string literal...
In addition, this is a major strike against your proposal.
r~