[Bug c++/44298] code addressed only by label with it's address taken is ignored
pinskia at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Thu May 27 18:57:00 GMT 2010
------- Comment #1 from pinskia at gcc dot gnu dot org 2010-05-27 18:57 -------
Addresses of labels are only designed to work with computed gotos so if you
don't have a computed goto in the function of mainx, then this will not work.
See http://gcc.gnu.org/onlinedocs/gcc-4.5.0/gcc/Labels-as-Values.html .
One thing which is documented is "You may not use this mechanism to jump to
code in a different function."
It is not about using labels as value extension only when they know what they
are doing but rather using them as they are correctly documented as being
working. They are only designed for computed gotos. Any other use will cause
undefined behavior.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |INVALID
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44298
More information about the Gcc-bugs
mailing list