This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: dubious warning about unused object
>>>>> Philipp Thomas <kthomas@gwdg.de> writes:
> On 05 May 1999 18:59:27 -0700, you wrote:
>> > Lock l (lockinfo) __attribute__ ((unused));
>> > string s;
>>
>> > wouldn't work around the problem? Would the ctor/dtor calls get
>> > accidentally "optimized" away or something?
>>
>> Nope, that would also work. It just seemed like a type attribute would be
>> more convenient, since you would only have to use it once.
> I guess a type attribute is the only reasonable way to solve this
> matter. But in that case I'd pledge for an
> __attribute__((used)). Marking something unused when in fact it's used
> IMO gives the wrong impression. What do you think ?
I agree, but the attribute is already in use.
Jason