This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Patch to add "pure" attribute to some functions
- To: jhub6202 at ss1000 dot ms dot mff dot cuni dot cz
- Subject: Re: Patch to add "pure" attribute to some functions
- From: "Kaveh R. Ghazi" <ghazi at caip dot rutgers dot edu>
- Date: Mon, 23 Aug 1999 14:26:13 -0400 (EDT)
- Cc: egcs-patches at egcs dot cygnus dot com
> From: Jan Hubicka <jhub6202@ss1000.ms.mff.cuni.cz>
>
> > Hi,
> >
> > I don't think your detection for ATTRIBUTE_PURE will work when
> > someone bootstraps stage1 with a 2.96 snapshot from before when your
> > patch is installed.
>
> I wondered about this problem when i was writing the code. I've tested
> it and the compiler just complained about ignored attribute so I've
> decided that this is probably OK (the stage 1 will warn a lot but once you
> bootstrap problem disappears and 2.96 snapshots are development so they
> may not get to normal user not aware of this.)
Ah, it occurs to me that our two cases are slightly different.
In my case, I was adding attribute unused on labels where no
attributes were previously allowed. I had to first change the parser
to allow any attributes on labels at all. Otherwise snapshots without
this change got a syntax error if they saw one.
Since functions already allow some attributes, and gcc only warns
about the unknown attribute pure, perhaps you don't need to do
anything.
--Kaveh
--
Kaveh R. Ghazi Engagement Manager / Project Services
ghazi@caip.rutgers.edu Qwest Internet Solutions