TREE_PUBLIC vs DECL_EXTERNAL

Mark Mitchell mark@codesourcery.com
Tue May 28 17:12:00 GMT 2002


> I think we should be able to put a check like
>
> 	if (!TREE_PUBLIC (decl) && DECL_EXTERNAL (decl))
> 	  abort ();

I completely agree.

This stuff is a mess.  We should have enumerals for linkage (none,
internal, external) as specified by the C standard -- which is
basically the model used by most object file formats.

The DECL_NOT_REALLY_EXTERN stuff should go; instead we should not
let the back end see anything until we're done with it in the front
end.  (The problem is that we're still function-at-a-time, rather
than file-at-a-time.  The front end should just process the file,
and discard whatever functions it doesn't need, or discard their
function bodies if it needs the declaration but not the bodies,
and pass the remainder to the back end.)

Not that I'm volunteering, mind you.

-- 
Mark Mitchell                mark@codesourcery.com
CodeSourcery, LLC            http://www.codesourcery.com



More information about the Gcc-patches mailing list