This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: bct_p *is* used in loop.c:strength_reduction
- To: David Edelsohn <dje at watson dot ibm dot com>
- Subject: Re: bct_p *is* used in loop.c:strength_reduction
- From: Jeffrey A Law <law at cygnus dot com>
- Date: Thu, 15 Oct 1998 14:41:33 -0600
- cc: "Kaveh R. Ghazi" <ghazi at caip dot rutgers dot edu>, egcs at cygnus dot com, egcs-patches at cygnus dot com
- Reply-To: law at cygnus dot com
In message <9810151845.AA39780@marc.watson.ibm.com>you write:
> When we were adding these types of attributes to rs6000.c, we went
> to the extreme of two different declarations for the two different ifdef
> cases -- one using the parameters, the other not.
>
> If this attribute is not dangerous and we want to use it in this
> manner just to remove warnings and not to imply anything to the compiler,
> then that is fine with me. However, as part of this process of adding
> these attributes and removing warnings, we have implemented two different
> policies of how and where to use them. We should be consistent about
> using this attribute throughout EGCS to avoid this type of confusion.
I told Kaveh not to make them conditional on compile time options. It seems
rather absurd to have
foobar (a)
int a
#if defined BLAH
ATTRIBUTE_UNUSED
#else
#if defined OOF && !defined COM
ATTRIBUTE_UNUSED
#endif
#endif
;
Given that the attribute means the variable may be unused and that having
the attribute on a used varaible can not (should not) cause problems I
suggested we not conditionalize it on all those compile time things.
This is a case where I think someone (possibly even myself) told Kaveh one
thing in the past and we've decided it was a mistake. We should go back and
fix the others to be consistent.
Trying to come up with the exact conditional where the arguments are unused
just seemed like it wasn't worth the effort, cluttered up the source too
much and wasn't going to be maintainable long term.
jeff