RE: [sv-bc] 10.8 Named blocks and statement labels - question

From: Steven Sharp <sharp_at_.....>
Date: Thu Feb 09 2006 - 16:52:49 PST
>From: "Rich, Dave" <Dave_Rich@mentor.com>

>Well, section 17.2 does say so explicitly and there is an example in
>10.8 of both a begin/end and fork/join with a matching end label.

Actually, 17.2 says that it creates a named block around the statement
to which it applies.  This means that the label would not name the
begin/end that it was attached to, but would create a new named block
around the statement (the begin/end) that it was attached to.  So 17.2
says that

   labelA: begin
     ...
   end
   
is equivalent to

 begin: labelA
   begin
     ...
   end
 end
 
not

   begin: labelA
     ...
   end
   
So if you tried to put a closing block name on the nested begin/end,
you would get

 begin: labelA
   begin
     ..
   end: labelA
 end
 
which is clearly wrong.  Now maybe it was intended that a label attached
to a begin/end or fork/join would be moved inside the block instead of
creating a new block around it like all other statements, but that is
not what it says.

And just because attaching a label is semantically equivalent to
naming the block, does not necessarily mean that it is syntactically
equivalent, down to allowing the label to be used as a block name on
the end/join.  In fact, that idea is pretty weird.

And examples are not normative.

Steven Sharp
sharp@cadence.com
Received on Thu Feb 9 16:53:04 2006

This archive was generated by hypermail 2.1.8 : Thu Feb 09 2006 - 16:56:06 PST