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

Re: [PATCH] Disallow inlining if static vars in that function contain addresses of that function's labels (PR tree-optimization/29484)


On Wed, 26 Dec 2007, Mark Mitchell wrote:

> would succeed.  Function pointers are guaranteed unique, and labels seem
> quite similar at first blush, though I understand that they can only be
> used from within the function itself.
> 
> Joseph, as a C maintainer, what do you think about this?

Existing practice for this extension has the labels only valid for 
computed goto, with the actual values unspecified and no requirements for 
comparability.

If they are used in static initializers they also need to be usable in all 
calls to that function.  Otherwise, they are probably only usable for 
computed goto within the particular call to the function in which the 
label value is taken.

-- 
Joseph S. Myers
joseph@codesourcery.com


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