__builtin_longjmp and rs6000 TOC

Jeffrey A Law law@cygnus.com
Sun Feb 1 02:17:00 GMT 1998


  In message <9801300357.AA31560@rios1.watson.ibm.com>you write:
  > >>>>> Richard Henderson writes:
  > > Eh?  Nested functions across module boundaries?
  > > I am suggesting that we do just that -- make nonlocal_goto be
  > > defined only for intra-module jumps, and that longjmp be used
  > > for inter-module jumps.
  > 
  > The GCC documentation on the __label__ extension states:
  > 
  > 	You can 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.
  > 
  > 	A nested function always has internal linkage.  Declaring one with
  > 	@code{extern} is erroneous.  If you need to declare the nested function
  > 	before its definition, use @code{auto} (which is otherwise meaningless
  > 	for function declarations).
  > 
  > I think this probably allows TOC and other things to fail if jumping
  > between modules via labels (nonlocal gotos) instead of setjmp/longjmp so
  > Richard's distinction does seem justified allowing the optimization.  I
  > withdraw my concern.
I stand corrected.  Thanks for clarifying things David.

jeff



More information about the Gcc mailing list