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

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.


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