This is the mail archive of the gcc@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]

Re: Q: Dead code elimination in the precense of addresses taken of local labels.


On Tue, Mar 14, 2000 at 01:53:52AM -0600, Eric W. Biederman wrote:
> My interpretation is that since the only valid use of
> computed labels is for local gotos. 

You may also use the label in non-goto contexts like printing.

> The value should not be allowed to be passed out of a function and
> somehow a diagnostic should be raised. 

This falls over with the printing example.

> On the other hand if it is legal to pass an address of a code segment
> to a another function (perhaps for a complicated variant of a switch
> statement) then optimising out the jump target is very bad.

This is most definitely not legal.


r~

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