This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: categorize_decl_for_section bogosity
- From: Zack Weinberg <zack at codesourcery dot com>
- To: "Dave Korn" <dk at artimi dot com>
- Cc: <gcc at gcc dot gnu dot org>
- Date: Tue, 25 May 2004 11:38:36 -0700
- Subject: Re: categorize_decl_for_section bogosity
- References: <NUTMEG3oHMwVN7miR9O0000004e@NUTMEG.CAM.ARTIMI.COM>
"Dave Korn" <dk@artimi.com> writes:
[...]
> Anyone got any thoughts on this? I'm tempted to look out for whatever
> flag it is that tells me that this is an extern declaration and add "&& !"
> that test to the DECL_INITIAL (decl) == NULL clause, but that might have
> knockon effects. Has anyone else considered this issue before?
Naively, I would think this is a bug which has gone unnoticed because
most of the time the compiler doesn't care what section an external
reference is in.
To test for an external reference I *think* you do
DECL_EXTERNAL(decl) && !TREE_PUBLIC(decl)
but someone else may know better.
zw