This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] PR17913:[4.0 Regression] ICE jumping into statement expression


On Wed, 27 Oct 2004 14:31:56 +0200 (CEST), Steven Bosscher
<stevenb@suse.de> wrote:
>
> Can we first determine if this code is valid at all?  Someone
> optimistically added the ice-on-valid keyword, but I'm not so
> sure if this test case you are fixing is valid code at all.
> In fact, I'd argue that if we accepted it in the past, that
> was an accepts-illegal bug.
> 
> The test case is the following:
> 
> void f(void) { 1 ? 1 : ({ a : 1; 1; }); goto a; }
> 
> So we are jumping into a statement expression.  That looks wrong.
[...]
> So I think this test case is not valid GNU C, and we really
> should issue an error.

Can we somehow make labels inside the statement expression local?
This would catch the similar bogous (?)

void f(void)
{
   void *label;
   ({ a: ; });
   label = &&a;
   goto *label;
}

while a might still escape through

void f(void)
{
  void *label;
  ({ a: label = &&a; });
  goto *label;
}

Oh the wonders of language extensions ;)

Richard.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]