This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [csl-sol210-branch] Patch to support Solaris 2.10
On Thu, Sep 23, 2004 at 04:41:26PM -0700, Richard Henderson wrote:
> > +static void
> > +solaris_pragma_init (cpp_reader *pfile ATTRIBUTE_UNUSED)
> > +{
> ...
> > + tree attrs = tree_cons (get_identifier ("used"), NULL, init_list);
> > + decl_attributes (&decl, attrs, 0);
>
> I'm not certain this happens early enough. You might also need to
> call mark_decl_referenced.
Can you describe why? The pragma handler gets called during parsing
(there's plenty of precedent for pragmas which have similar
time-of-application behavior to attributes - see pack()), so I think
it's no different than having __attribute__((used)) in the source. I
admit it's a bit gross.
--
Daniel Jacobowitz