-----Original Message----- From: gpc-owner@gnu.de [mailto:gpc-owner@gnu.de]On Behalf Of Frank Heckenbach Sent: 17 November 2001 09:22 To: gpc@gnu.de Subject: Re: Bug Report: goto bug
OK, I can reproduce it, and it is a GCC bug. The following C program (using GCC extensions for nested functions and label declarations)
It didn't occur to me to see if gcc had extensions to support this.
is a direct translation from the Pascal program and it has the same problem (also only with 2.95.x on Solaris).
If you have access to a GCC 3.0 on Solaris, you might test it with that version.
Seems to be ok on 3.0.1. Looks like I was a bit unlucky with the version I went for - I just assumed the latest gcc that gpc could build with would be best.
So I think it's time to report it to the GCC maintainers. Will you do that (see the GCC documentaion for how and where), or should I?
I would be very happy for you to report it.
extern int puts (const char *);
int main() { __label__ l1;
void foo() {
void bar() { puts ("goto l1"); goto l1; } bar ();
}
foo (); abort (); l1: puts ("label l1"); return 0; }
Thanks once again for all your help.
Cheers, Martin.