gnustep-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Duplicate Member in NSMenuItemCell.h


From: Fred Kiefer
Subject: Re: Duplicate Member in NSMenuItemCell.h
Date: Sat, 27 Jan 2007 15:21:19 +0100
User-agent: Thunderbird 1.5.0.9 (X11/20060911)

Adam Fedor schrieb:
> 
> On Jan 26, 2007, at 7:48 AM, Richard Frith-Macdonald wrote:
> 
>>
>> On 24 Jan 2007, at 16:36, Ted Howard wrote:
>> Perhaps a bigger issue is that my compiler (gcc-4.1.1) happily
>> compiles the current code!  Now that seems to me like a rather severe
>> compiler bug.  Does anyone know different?
> 
> I don't know why it wouldn't be a bug. Anyway, the Testfarm shows
> several machines that fail (and don't).  For instance gcc 4.0.1 on
> Darwin fails to compile, but 4.1.1. (on Solaris) happiliy compiles this...
> 
> http://www.gnustep.org/developers/testfarm-results.txt
> 

Sorry for taking so long to fix this simple bug. The ivar in
NSMenuItemCell was totally useless and was only set and used within a
single method. But then the code did not belong into this method at all.
So I had to move it to a different method and then one thing followed
from the other. In the end I had do do quite a few changes to the file
and would even prefer to change more in it. But before doing this, I
would like to get some feedback on the changes up to now.

As for the compiler, I now think that the correct behaviour was to allow
the duplicate ivar. In NSMenuItemCell this ivar was declared as private.
With that scope it should not clash with another ivar of the same name
in a super class. At least this is what I think. Still it is better to
avoid this case and have unique names for ivars.

Cheers,
Fred




reply via email to

[Prev in Thread] Current Thread [Next in Thread]