* nsterm.m warnings
@ 2012-01-04 17:53 Carsten Mattner
2012-01-04 19:57 ` Jan Djärv
0 siblings, 1 reply; 5+ messages in thread
From: Carsten Mattner @ 2012-01-04 17:53 UTC (permalink / raw)
To: Emacs developers
I think at least one of the following or ideally both should be fixed.
nsterm.m: In function ‘-[EmacsView conversationIdentifier]’:
nsterm.m:5053: warning: conflicting types for ‘-(long
int)conversationIdentifier’
/System/Library/Frameworks/AppKit.framework/Headers/NSInputManager.h:25:
warning: previous declaration of ‘-(NSInteger)conversationIdentifier’
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: nsterm.m warnings
2012-01-04 17:53 nsterm.m warnings Carsten Mattner
@ 2012-01-04 19:57 ` Jan Djärv
2012-01-04 23:49 ` Carsten Mattner
0 siblings, 1 reply; 5+ messages in thread
From: Jan Djärv @ 2012-01-04 19:57 UTC (permalink / raw)
To: Carsten Mattner; +Cc: Emacs developers
4 jan 2012 kl. 18:53 skrev Carsten Mattner:
> I think at least one of the following or ideally both should be fixed.
>
> nsterm.m: In function ‘-[EmacsView conversationIdentifier]’:
> nsterm.m:5053: warning: conflicting types for ‘-(long
> int)conversationIdentifier’
> /System/Library/Frameworks/AppKit.framework/Headers/NSInputManager.h:25:
> warning: previous declaration of ‘-(NSInteger)conversationIdentifier’
What do you mean by "both"? This is only one warning.
It has no practical importance, and only occurs if you build a 32-bit executable, which is rare on OSX.
Jan D.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: nsterm.m warnings
2012-01-04 19:57 ` Jan Djärv
@ 2012-01-04 23:49 ` Carsten Mattner
2012-01-05 7:31 ` Jan D.
0 siblings, 1 reply; 5+ messages in thread
From: Carsten Mattner @ 2012-01-04 23:49 UTC (permalink / raw)
To: Jan Djärv; +Cc: Emacs developers
On Wed, Jan 4, 2012 at 8:57 PM, Jan Djärv <jan.h.d@swipnet.se> wrote:
>
> 4 jan 2012 kl. 18:53 skrev Carsten Mattner:
>
>> I think at least one of the following or ideally both should be fixed.
>>
>> nsterm.m: In function ‘-[EmacsView conversationIdentifier]’:
>> nsterm.m:5053: warning: conflicting types for ‘-(long
>> int)conversationIdentifier’
>> /System/Library/Frameworks/AppKit.framework/Headers/NSInputManager.h:25:
>> warning: previous declaration of ‘-(NSInteger)conversationIdentifier’
>
> What do you mean by "both"? This is only one warning.
It's the same cause, but two warning messages.
You could logically group them to one, yes.
> It has no practical importance, and only occurs if you build a 32-bit
> executable, which is rare on OSX.
If it's safe to ignore in a 32-bit build, ok.
Strictly speaking the code is incorrect, isn't it?
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: nsterm.m warnings
2012-01-04 23:49 ` Carsten Mattner
@ 2012-01-05 7:31 ` Jan D.
2012-01-05 11:21 ` Carsten Mattner
0 siblings, 1 reply; 5+ messages in thread
From: Jan D. @ 2012-01-05 7:31 UTC (permalink / raw)
To: Carsten Mattner; +Cc: Emacs developers
Carsten Mattner skrev 2012-01-05 00:49:
> On Wed, Jan 4, 2012 at 8:57 PM, Jan Djärv<jan.h.d@swipnet.se> wrote:
>>
>> 4 jan 2012 kl. 18:53 skrev Carsten Mattner:
>>
>>> I think at least one of the following or ideally both should be fixed.
>>>
>>> nsterm.m: In function ‘-[EmacsView conversationIdentifier]’:
>>> nsterm.m:5053: warning: conflicting types for ‘-(long
>>> int)conversationIdentifier’
>>> /System/Library/Frameworks/AppKit.framework/Headers/NSInputManager.h:25:
>>> warning: previous declaration of ‘-(NSInteger)conversationIdentifier’
>>
>> What do you mean by "both"? This is only one warning.
>
> It's the same cause, but two warning messages.
> You could logically group them to one, yes.
I see it as one warning message. There are two "warning:" in there, but
they only make sense together.
>
>> It has no practical importance, and only occurs if you build a 32-bit
>> executable, which is rare on OSX.
>
> If it's safe to ignore in a 32-bit build, ok.
> Strictly speaking the code is incorrect, isn't it?
The code relies on the fact that the compiler can convert a long to an
int on a 32-bit build. In principle such a conversion can truncate the
value. But in this case it does not matter, as long as the value is
unique within the application (Emacs). As the build is 32-bit, the
pointer converted to long is 32-bit to start with. That long is then
converted to an int, so there is no truncation.
But it is bad style to change interfaces like this, I'll fix it shortly.
I guess it was long at some point in time, and then got changed to
NSInteger.
Jan D.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: nsterm.m warnings
2012-01-05 7:31 ` Jan D.
@ 2012-01-05 11:21 ` Carsten Mattner
0 siblings, 0 replies; 5+ messages in thread
From: Carsten Mattner @ 2012-01-05 11:21 UTC (permalink / raw)
To: Jan D.; +Cc: Emacs developers
On Thu, Jan 5, 2012 at 8:31 AM, Jan D. <jan.h.d@swipnet.se> wrote:
> The code relies on the fact that the compiler can convert a long to an int
> on a 32-bit build. In principle such a conversion can truncate the value.
> But in this case it does not matter, as long as the value is unique within
> the application (Emacs). As the build is 32-bit, the pointer converted to
> long is 32-bit to start with. That long is then converted to an int, so
> there is no truncation.
>
> But it is bad style to change interfaces like this, I'll fix it shortly. I
> guess it was long at some point in time, and then got changed to NSInteger.
Thanks.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2012-01-05 11:21 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-04 17:53 nsterm.m warnings Carsten Mattner
2012-01-04 19:57 ` Jan Djärv
2012-01-04 23:49 ` Carsten Mattner
2012-01-05 7:31 ` Jan D.
2012-01-05 11:21 ` Carsten Mattner
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.