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

[Bug tree-optimization/31727] Functions with non-local gotos are considered not to have side effects



------- Comment #2 from pinskia at gcc dot gnu dot org  2007-04-28 00:36 -------
This code is undefined
Take a look at the manual:
http://gcc.gnu.org/onlinedocs/gcc-4.1.2/gcc/Labels-as-Values.html

You may not use this mechanism to jump to code in a different function. If you
do that, totally unpredictable things will happen. The best way to avoid this
is to store the label address only in automatic variables and never pass it as
an argument. 

There is nothing special about this code, except it is undefined :).


-- 

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=31727


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