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: "Kaveh R. Ghazi" <ghazi at caip dot rutgers dot edu>
- Subject: Re: Patch to add "pure" attribute to some functions
- From: Jan Hubicka <jhub6202 at ss1000 dot ms dot mff dot cuni dot cz>
- Date: Mon, 23 Aug 1999 18:32:55 +0200 (MET DST)
- cc: egcs-patches at egcs dot cygnus dot com
>
> 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.)
>
> I ran into the same issue when I added ATTRIBUTE_UNUSED_LABEL.
> The problem is that there is no __GNUC_MICRO__ macro to detect exactly
> when a feature is added. Since you can only check the MINOR version
> number, the decision at the time was to bump the MINOR number up one
> for the new feature. We'll probably have to do something like this
> for ATTRIBUTE_PURE and increment the minor number to 97 after your
> patch is installed. (Then the check in gansidecl.h will look for
> minor<97 and it will always work.)
OK. This is also solution (except for adding __GNUC_MICRO__)
Is that purpose to send another version of patch with 96 replaced to 97?
Or once someone will review the pure patches he will also change the
number himself?
Honza
>
> --Kaveh
> --
> Kaveh R. Ghazi Engagement Manager / Project Services
> ghazi@caip.rutgers.edu Qwest Internet Solutions
>