----------------------------------------
> Date: Mon, 12 Nov 2007 22:15:11 -0800
> From: [EMAIL PROTECTED]
> To: [email protected]
> Subject: Re: gcc optimizes out program ID string
> 
> On Nov 12, 2007 6:18 PM, Andrew Lentvorski  wrote:
>> Carl Lowenstein wrote:
>>> I don't much like the attitude of the gcc developers.  "We don't use
>>> this ourselves, therefore nobody needs it."
>>
>> No, what *you* (and others) have asked for is to special case the
>> removal of an unused string when optimizing.
>>
>> I agree with their decision about this.
>>
>> Especially since there exists an attribute (and probably a pragma) to
>> handle this behavior.
> 
> Where does one learn that this attribute exists, except by searching
> the archives of  with some assistance from Google?
> __attribute__((used))
> 
>> The gcc folks have become increasingly prickly about special casing
>> behavior that they don't have to because it almost always leads to bugs.
> 
> Perhaps they have lost track of the principle of least surprise.
> 

I don't think so.  I expect unused variables to be optimized out.  All of them. 
 That's the least surprising thing to do, since they aren't needed.  Why keep 
this one special one around, for some odd use case that I don't quite get.

Gabe
_________________________________________________________________
Help yourself to FREE treats served up daily at the Messenger Café. Stop by 
today.
http://www.cafemessenger.com/info/info_sweetstuff2.html?ocid=TXT_TAGLM_OctWLtagline
--
[email protected]
http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-lpsg

Reply via email to