* [Bug libobjc/34315] libobjc warnings with Win64 arget=x86_64-pc-mingw32
2007-12-02 19:46 [Bug libobjc/34315] New: libobjc warnings with Win64 arget=x86_64-pc-mingw32 nightstrike at gmail dot com
@ 2007-12-02 19:49 ` nightstrike at gmail dot com
2007-12-12 17:34 ` [Bug libobjc/34315] libobjc warnings with Win64 target=x86_64-pc-mingw32 nightstrike at gmail dot com
` (6 subsequent siblings)
7 siblings, 0 replies; 10+ messages in thread
From: nightstrike at gmail dot com @ 2007-12-02 19:49 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from nightstrike at gmail dot com 2007-12-02 19:48 -------
Sorry, the copy and paste was cut short. The full warning list is this:
/tmp/rt/build/gcc-svn/gcc/libobjc/archive.c: In function 'objc_read_class':
/tmp/rt/build/gcc-svn/gcc/libobjc/archive.c:911: warning: cast to pointer from
integer of different size
/tmp/rt/build/gcc-svn/gcc/libobjc/Object.m: In function '-[Object compare:]':
/tmp/rt/build/gcc-svn/gcc/libobjc/Object.m:124: warning: comparison of distinct
pointer types lacks a cast
/tmp/rt/build/gcc-svn/gcc/libobjc/sendmsg.c:44:1: warning: "rtx" redefined
In file included from /tmp/rt/build/gcc-svn/gcc/libobjc/sendmsg.c:33:
/tmp/rt/build/gcc-svn/gcc/libobjc/../gcc/coretypes.h:83:1: warning: this is the
location of the previous definition
/tmp/rt/build/gcc-svn/gcc/libobjc/sendmsg.c: In function
'__objc_print_dtable_stats':
/tmp/rt/build/gcc-svn/gcc/libobjc/sendmsg.c:688: warning: format '%ld' expects
type 'long int', but argument 3 has type 'long long unsigned int'
/tmp/rt/build/gcc-svn/gcc/libobjc/sendmsg.c:691: warning: format '%ld' expects
type 'long int', but argument 3 has type 'long long unsigned int'
/tmp/rt/build/gcc-svn/gcc/libobjc/sendmsg.c:695: warning: format '%ld' expects
type 'long int', but argument 3 has type 'long long unsigned int'
/tmp/rt/build/gcc-svn/gcc/libobjc/sendmsg.c: At top level:
./runtime-info.h:4: warning: 'struct_forward_array' defined but not used
/tmp/rt/build/gcc-svn/gcc/libobjc/thr.c: In function
'__objc_thread_detach_function':
/tmp/rt/build/gcc-svn/gcc/libobjc/thr.c:117: warning: 'noreturn' function does
return
In file included from ../.././gcc/gthr-default.h:1,
from /tmp/rt/build/gcc-svn/gcc/libobjc/../gcc/gthr.h:132,
from /tmp/rt/build/gcc-svn/gcc/libobjc/thr-objc.c:42:
/tmp/rt/build/gcc-svn/gcc/libobjc/../gcc/gthr-win32.h: In function
'__gthread_objc_thread_detach':
/tmp/rt/build/gcc-svn/gcc/libobjc/../gcc/gthr-win32.h:122: warning: cast to
pointer from integer of different size
/tmp/rt/build/gcc-svn/gcc/libobjc/../gcc/gthr-win32.h: In function
'__gthread_objc_thread_id':
/tmp/rt/build/gcc-svn/gcc/libobjc/../gcc/gthr-win32.h:203: warning: cast to
pointer from integer of different size
/tmp/rt/build/gcc-svn/gcc/libobjc/../gcc/gthr-win32.h: In function
'__gthread_objc_condition_allocate':
/tmp/rt/build/gcc-svn/gcc/libobjc/../gcc/gthr-win32.h:292: warning: unused
parameter 'condition'
/tmp/rt/build/gcc-svn/gcc/libobjc/../gcc/gthr-win32.h: In function
'__gthread_objc_condition_deallocate':
/tmp/rt/build/gcc-svn/gcc/libobjc/../gcc/gthr-win32.h:300: warning: unused
parameter 'condition'
/tmp/rt/build/gcc-svn/gcc/libobjc/../gcc/gthr-win32.h: In function
'__gthread_objc_condition_wait':
/tmp/rt/build/gcc-svn/gcc/libobjc/../gcc/gthr-win32.h:308: warning: unused
parameter 'condition'
/tmp/rt/build/gcc-svn/gcc/libobjc/../gcc/gthr-win32.h:308: warning: unused
parameter 'mutex'
/tmp/rt/build/gcc-svn/gcc/libobjc/../gcc/gthr-win32.h: In function
'__gthread_objc_condition_broadcast':
/tmp/rt/build/gcc-svn/gcc/libobjc/../gcc/gthr-win32.h:316: warning: unused
parameter 'condition'
/tmp/rt/build/gcc-svn/gcc/libobjc/../gcc/gthr-win32.h: In function
'__gthread_objc_condition_signal':
/tmp/rt/build/gcc-svn/gcc/libobjc/../gcc/gthr-win32.h:324: warning: unused
parameter 'condition'
libtool: link: warning: undefined symbols not allowed in x86_64-pc-mingw32
shared libraries
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34315
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug libobjc/34315] libobjc warnings with Win64 target=x86_64-pc-mingw32
2007-12-02 19:46 [Bug libobjc/34315] New: libobjc warnings with Win64 arget=x86_64-pc-mingw32 nightstrike at gmail dot com
2007-12-02 19:49 ` [Bug libobjc/34315] " nightstrike at gmail dot com
@ 2007-12-12 17:34 ` nightstrike at gmail dot com
2008-02-16 20:47 ` ktietz at gcc dot gnu dot org
` (5 subsequent siblings)
7 siblings, 0 replies; 10+ messages in thread
From: nightstrike at gmail dot com @ 2007-12-12 17:34 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from nightstrike at gmail dot com 2007-12-12 17:33 -------
Does anyone know why the %ld formats are not recognized as valid?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34315
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug libobjc/34315] libobjc warnings with Win64 target=x86_64-pc-mingw32
2007-12-02 19:46 [Bug libobjc/34315] New: libobjc warnings with Win64 arget=x86_64-pc-mingw32 nightstrike at gmail dot com
2007-12-02 19:49 ` [Bug libobjc/34315] " nightstrike at gmail dot com
2007-12-12 17:34 ` [Bug libobjc/34315] libobjc warnings with Win64 target=x86_64-pc-mingw32 nightstrike at gmail dot com
@ 2008-02-16 20:47 ` ktietz at gcc dot gnu dot org
2008-04-21 12:55 ` fxcoudert at gcc dot gnu dot org
` (4 subsequent siblings)
7 siblings, 0 replies; 10+ messages in thread
From: ktietz at gcc dot gnu dot org @ 2008-02-16 20:47 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from ktietz at gcc dot gnu dot org 2008-02-16 20:46 -------
Yes, for the x86_64-pc-mingw32 the %ld printing exists, but it is for long, not
for long long. For this target long is 32-bit scalar, so the printf formatters
are wrong.
in gthr-win32.h there seems to be a more serious bug. The cast of an integer
with less size to a pointer can be seriously wrong.
--
ktietz at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |ktietz at gcc dot gnu dot
| |org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34315
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug libobjc/34315] libobjc warnings with Win64 target=x86_64-pc-mingw32
2007-12-02 19:46 [Bug libobjc/34315] New: libobjc warnings with Win64 arget=x86_64-pc-mingw32 nightstrike at gmail dot com
` (2 preceding siblings ...)
2008-02-16 20:47 ` ktietz at gcc dot gnu dot org
@ 2008-04-21 12:55 ` fxcoudert at gcc dot gnu dot org
2008-04-21 13:04 ` ktietz at gcc dot gnu dot org
` (3 subsequent siblings)
7 siblings, 0 replies; 10+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2008-04-21 12:55 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from fxcoudert at gcc dot gnu dot org 2008-04-21 12:54 -------
(In reply to comment #3)
> in gthr-win32.h there seems to be a more serious bug. The cast of an integer
> with less size to a pointer can be seriously wrong.
I don't think it's an issue: the type objc_thread_t, which is used as a thread
identifier, it declared as (void *), so it's larger than the integer types that
are cast into it (which are DWORD). It's inelegant, but I think it cannot cause
bugs.
I suggest silencing the warning that way (in both libobjc/thr-win32.c and
gcc/thr-win32.c):
--- thr-win32.c.old 2008-04-21 14:53:42.000000000 +0200
+++ thr-win32.c 2008-04-21 14:53:35.000000000 +0200
@@ -70,7 +70,7 @@ __objc_thread_detach(void (*func)(void *
arg, 0, &thread_id)))
thread_id = 0;
- return (objc_thread_t)thread_id;
+ return (objc_thread_t)(INT_PTR)thread_id;
}
/* Set the current thread's priority. */
@@ -151,7 +151,7 @@ __objc_thread_exit(void)
objc_thread_t
__objc_thread_id(void)
{
- return (objc_thread_t)GetCurrentThreadId();
+ return (objc_thread_t)(INT_PTR)GetCurrentThreadId();
}
/* Sets the thread's local storage pointer. */
--
fxcoudert at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |fxcoudert at gcc dot gnu dot
| |org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34315
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug libobjc/34315] libobjc warnings with Win64 target=x86_64-pc-mingw32
2007-12-02 19:46 [Bug libobjc/34315] New: libobjc warnings with Win64 arget=x86_64-pc-mingw32 nightstrike at gmail dot com
` (3 preceding siblings ...)
2008-04-21 12:55 ` fxcoudert at gcc dot gnu dot org
@ 2008-04-21 13:04 ` ktietz at gcc dot gnu dot org
2008-07-10 0:50 ` nightstrike at gmail dot com
` (2 subsequent siblings)
7 siblings, 0 replies; 10+ messages in thread
From: ktietz at gcc dot gnu dot org @ 2008-04-21 13:04 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from ktietz at gcc dot gnu dot org 2008-04-21 13:03 -------
I agree, that this patch does not break things and the build for this target
gets more silent.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34315
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug libobjc/34315] libobjc warnings with Win64 target=x86_64-pc-mingw32
2007-12-02 19:46 [Bug libobjc/34315] New: libobjc warnings with Win64 arget=x86_64-pc-mingw32 nightstrike at gmail dot com
` (4 preceding siblings ...)
2008-04-21 13:04 ` ktietz at gcc dot gnu dot org
@ 2008-07-10 0:50 ` nightstrike at gmail dot com
2009-08-21 17:25 ` ktietz at gcc dot gnu dot org
2009-08-25 10:36 ` ktietz at gcc dot gnu dot org
7 siblings, 0 replies; 10+ messages in thread
From: nightstrike at gmail dot com @ 2008-07-10 0:50 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from nightstrike at gmail dot com 2008-07-10 00:49 -------
Kai, can you apply FX's fix?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34315
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug libobjc/34315] libobjc warnings with Win64 target=x86_64-pc-mingw32
2007-12-02 19:46 [Bug libobjc/34315] New: libobjc warnings with Win64 arget=x86_64-pc-mingw32 nightstrike at gmail dot com
` (5 preceding siblings ...)
2008-07-10 0:50 ` nightstrike at gmail dot com
@ 2009-08-21 17:25 ` ktietz at gcc dot gnu dot org
2009-08-25 10:36 ` ktietz at gcc dot gnu dot org
7 siblings, 0 replies; 10+ messages in thread
From: ktietz at gcc dot gnu dot org @ 2009-08-21 17:25 UTC (permalink / raw)
To: gcc-bugs
--
ktietz at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |ktietz at gcc dot gnu dot
|dot org |org
Status|UNCONFIRMED |ASSIGNED
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2009-08-21 17:25:39
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34315
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug libobjc/34315] libobjc warnings with Win64 target=x86_64-pc-mingw32
2007-12-02 19:46 [Bug libobjc/34315] New: libobjc warnings with Win64 arget=x86_64-pc-mingw32 nightstrike at gmail dot com
` (6 preceding siblings ...)
2009-08-21 17:25 ` ktietz at gcc dot gnu dot org
@ 2009-08-25 10:36 ` ktietz at gcc dot gnu dot org
7 siblings, 0 replies; 10+ messages in thread
From: ktietz at gcc dot gnu dot org @ 2009-08-25 10:36 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from ktietz at gcc dot gnu dot org 2009-08-25 10:36 -------
Ok I fixed at revision 151077 the issues about gthr-win32.h, the objective-c
library warnings aren't fixed by this.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34315
^ permalink raw reply [flat|nested] 10+ messages in thread