This is the mail archive of the 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: [LTO][PATCH] Check for defintions in prevailing DECLs

I have another patch being tested right now.  That patch fixes up
FUNCTION_DECLs in cp_reset_lang_specifics.  When we reach there, we
should have seen EOF and expanded all needs functions.  Any
FUNCTION_DECL without a GIMPLE body can be treated as an external
reference since an external definition must be provided somewhere else
if the DECL is used at all.


2008/11/26 Diego Novillo <>:
> 2008/11/26 Rafael Espindola <>:
>> You can probably just use the free_lang_specifics to set DECL_EXTERNAL
>> and TREE_STATIC for FUNCTION_DECL depending on the existence of the
>> body. With that we can also avoid streaming out DECL_EXTERNAL and
>> TREE_STATIC for them.
> TREE_STATIC will already have been set correctly for such functions.
> What I don't really care for is the combination
> DECL_EXTERNAL+TREE_STATIC.  In principle, it makes little sense to me,
> but I don't know if this is something specific to C++ or just an
> oversight in the parser.
> Jason, Mark, is there a special meaning for a TREE_STATIC function
> decl to also have DECL_EXTERNAL set?  We are seeing that in class
> methods declarations that also include the body, like:
> class A {
>   int foo (int x) { return x - 1; }
> };
> I'm also not sure if we are consistent in the use of TREE_STATIC.  In
> gimple, we generally rely on gimple_body() and/or the CFG to determine
> if a function has a body.
> Diego.

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