bct_p *is* used in loop.c:strength_reduction

Jeffrey A Law law@cygnus.com
Thu Oct 15 13:43:00 GMT 1998


  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



More information about the Gcc-patches mailing list