public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/39065] New: libiberty hashtab.c:hash_pointer() needs intptr_t
@ 2009-02-01 16:59 sezeroz at gmail dot com
2009-02-01 17:00 ` [Bug target/39065] " sezeroz at gmail dot com
` (8 more replies)
0 siblings, 9 replies; 10+ messages in thread
From: sezeroz at gmail dot com @ 2009-02-01 16:59 UTC (permalink / raw)
To: gcc-bugs
in function hash_pointer(), libiberty/hashtab.c casts its pointer argument
to long, probably with the assumption that long is 64 bits on all 64 bit
systems, which isn't true for win64. it must cast to intptr_t, instead.
here is the warning:
../../../gcc-svn/libiberty/hashtab.c: In function 'hash_pointer':
../../../gcc-svn/libiberty/hashtab.c:199: warning: cast from pointer to integer
of different size
(the patch should also be applied to binutils and gdb, or whoever else uses
libiberty)
--
Summary: libiberty hashtab.c:hash_pointer() needs intptr_t
Product: gcc
Version: 4.4.0
Status: UNCONFIRMED
Severity: trivial
Priority: P3
Component: target
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: sezeroz at gmail dot com
GCC target triplet: x86_64-pc-mingw32
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39065
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug target/39065] libiberty hashtab.c:hash_pointer() needs intptr_t
2009-02-01 16:59 [Bug target/39065] New: libiberty hashtab.c:hash_pointer() needs intptr_t sezeroz at gmail dot com
@ 2009-02-01 17:00 ` sezeroz at gmail dot com
2009-02-02 21:52 ` dj at redhat dot com
` (7 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: sezeroz at gmail dot com @ 2009-02-01 17:00 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from sezeroz at gmail dot com 2009-02-01 17:00 -------
Created an attachment (id=17224)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=17224&action=view)
libiberty hashtab.c intptr_t fix
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39065
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug target/39065] libiberty hashtab.c:hash_pointer() needs intptr_t
2009-02-01 16:59 [Bug target/39065] New: libiberty hashtab.c:hash_pointer() needs intptr_t sezeroz at gmail dot com
2009-02-01 17:00 ` [Bug target/39065] " sezeroz at gmail dot com
@ 2009-02-02 21:52 ` dj at redhat dot com
2009-02-02 22:59 ` sezeroz at gmail dot com
` (6 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: dj at redhat dot com @ 2009-02-02 21:52 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from dj at redhat dot com 2009-02-02 21:52 -------
You should put the new code in a #ifdef HAVE_STDINT and use the old code
otherwise. Else, any platforms without stdint.h would not compile.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39065
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug target/39065] libiberty hashtab.c:hash_pointer() needs intptr_t
2009-02-01 16:59 [Bug target/39065] New: libiberty hashtab.c:hash_pointer() needs intptr_t sezeroz at gmail dot com
2009-02-01 17:00 ` [Bug target/39065] " sezeroz at gmail dot com
2009-02-02 21:52 ` dj at redhat dot com
@ 2009-02-02 22:59 ` sezeroz at gmail dot com
2009-02-21 8:06 ` sezeroz at gmail dot com
` (5 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: sezeroz at gmail dot com @ 2009-02-02 22:59 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from sezeroz at gmail dot com 2009-02-02 22:59 -------
(In reply to comment #2)
> You should put the new code in a #ifdef HAVE_STDINT and use the old code
> otherwise. Else, any platforms without stdint.h would not compile.
>
I would do that and it would be easy, but then one may say that having intptr_t
doesn't have to depend on having stdint.h: in MSVC, for one, you get it via the
stddef.h header. Maybe adding an AC_CHECK_TYPE(intptr_t,long) to configure.ac
would be better solution?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39065
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug target/39065] libiberty hashtab.c:hash_pointer() needs intptr_t
2009-02-01 16:59 [Bug target/39065] New: libiberty hashtab.c:hash_pointer() needs intptr_t sezeroz at gmail dot com
` (2 preceding siblings ...)
2009-02-02 22:59 ` sezeroz at gmail dot com
@ 2009-02-21 8:06 ` sezeroz at gmail dot com
2009-02-21 9:55 ` ktietz at gcc dot gnu dot org
` (4 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: sezeroz at gmail dot com @ 2009-02-21 8:06 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from sezeroz at gmail dot com 2009-02-21 08:06 -------
Created an attachment (id=17337)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=17337&action=view)
intptr_t type check patch for libiberty configure
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39065
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug target/39065] libiberty hashtab.c:hash_pointer() needs intptr_t
2009-02-01 16:59 [Bug target/39065] New: libiberty hashtab.c:hash_pointer() needs intptr_t sezeroz at gmail dot com
` (3 preceding siblings ...)
2009-02-21 8:06 ` sezeroz at gmail dot com
@ 2009-02-21 9:55 ` ktietz at gcc dot gnu dot org
2009-03-14 15:58 ` nightstrike at gmail dot com
` (3 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: ktietz at gcc dot gnu dot org @ 2009-02-21 9:55 UTC (permalink / raw)
To: gcc-bugs
--
ktietz at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |ktietz at gcc dot gnu dot
| |org
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2009-02-21 09:55:04
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39065
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug target/39065] libiberty hashtab.c:hash_pointer() needs intptr_t
2009-02-01 16:59 [Bug target/39065] New: libiberty hashtab.c:hash_pointer() needs intptr_t sezeroz at gmail dot com
` (4 preceding siblings ...)
2009-02-21 9:55 ` ktietz at gcc dot gnu dot org
@ 2009-03-14 15:58 ` nightstrike at gmail dot com
2009-09-03 16:46 ` hjl at gcc dot gnu dot org
` (2 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: nightstrike at gmail dot com @ 2009-03-14 15:58 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from nightstrike at gmail dot com 2009-03-14 15:57 -------
http://gcc.gnu.org/ml/gcc-patches/2009-03/msg00640.html
--
nightstrike at gmail dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |nightstrike at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39065
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug target/39065] libiberty hashtab.c:hash_pointer() needs intptr_t
2009-02-01 16:59 [Bug target/39065] New: libiberty hashtab.c:hash_pointer() needs intptr_t sezeroz at gmail dot com
` (5 preceding siblings ...)
2009-03-14 15:58 ` nightstrike at gmail dot com
@ 2009-09-03 16:46 ` hjl at gcc dot gnu dot org
2009-09-04 6:26 ` sezeroz at gmail dot com
2009-09-04 14:33 ` hjl at gcc dot gnu dot org
8 siblings, 0 replies; 10+ messages in thread
From: hjl at gcc dot gnu dot org @ 2009-09-03 16:46 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from hjl at gcc dot gnu dot org 2009-09-03 16:46 -------
Subject: Bug 39065
Author: hjl
Date: Thu Sep 3 16:46:00 2009
New Revision: 151386
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=151386
Log:
2009-09-03 Ozkan Sezer <sezeroz@gmail.com>
PR target/39065
* configure.ac: Also check for intptr_t.
* config.h.in: Regenerated.
* configure: Regenerated.
* hashtab.c (hash_pointer): Cast the pointer argument to intptr_t
instead of of long.
Modified:
trunk/libiberty/ChangeLog
trunk/libiberty/config.in
trunk/libiberty/configure
trunk/libiberty/configure.ac
trunk/libiberty/hashtab.c
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39065
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug target/39065] libiberty hashtab.c:hash_pointer() needs intptr_t
2009-02-01 16:59 [Bug target/39065] New: libiberty hashtab.c:hash_pointer() needs intptr_t sezeroz at gmail dot com
` (6 preceding siblings ...)
2009-09-03 16:46 ` hjl at gcc dot gnu dot org
@ 2009-09-04 6:26 ` sezeroz at gmail dot com
2009-09-04 14:33 ` hjl at gcc dot gnu dot org
8 siblings, 0 replies; 10+ messages in thread
From: sezeroz at gmail dot com @ 2009-09-04 6:26 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from sezeroz at gmail dot com 2009-09-04 06:26 -------
fixed on the trunk now.
--
sezeroz at gmail dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39065
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug target/39065] libiberty hashtab.c:hash_pointer() needs intptr_t
2009-02-01 16:59 [Bug target/39065] New: libiberty hashtab.c:hash_pointer() needs intptr_t sezeroz at gmail dot com
` (7 preceding siblings ...)
2009-09-04 6:26 ` sezeroz at gmail dot com
@ 2009-09-04 14:33 ` hjl at gcc dot gnu dot org
8 siblings, 0 replies; 10+ messages in thread
From: hjl at gcc dot gnu dot org @ 2009-09-04 14:33 UTC (permalink / raw)
To: gcc-bugs
------- Comment #8 from hjl at gcc dot gnu dot org 2009-09-04 14:33 -------
Subject: Bug 39065
Author: hjl
Date: Fri Sep 4 14:33:16 2009
New Revision: 151423
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=151423
Log:
2009-09-04 Ozkan Sezer <sezeroz@gmail.com>
PR target/39065
* configure.ac: Replace AC_CHECK_TYPE() for intptr_t and uintptr_t
with AC_TYPE_INTPTR_T and AC_TYPE_UINTPTR_T.
* config.in: Regenerated.
* configure: Regenerated.
Modified:
trunk/libiberty/ChangeLog
trunk/libiberty/config.in
trunk/libiberty/configure
trunk/libiberty/configure.ac
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39065
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2009-09-04 14:33 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-02-01 16:59 [Bug target/39065] New: libiberty hashtab.c:hash_pointer() needs intptr_t sezeroz at gmail dot com
2009-02-01 17:00 ` [Bug target/39065] " sezeroz at gmail dot com
2009-02-02 21:52 ` dj at redhat dot com
2009-02-02 22:59 ` sezeroz at gmail dot com
2009-02-21 8:06 ` sezeroz at gmail dot com
2009-02-21 9:55 ` ktietz at gcc dot gnu dot org
2009-03-14 15:58 ` nightstrike at gmail dot com
2009-09-03 16:46 ` hjl at gcc dot gnu dot org
2009-09-04 6:26 ` sezeroz at gmail dot com
2009-09-04 14:33 ` hjl at gcc dot gnu dot org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).