This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] DO_GLOBAL_CTORS_BODY needs uintptr_t


DO_GLOBAL_CTORS_BODY casts __CTOR_LIST__[0] to unsigned 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 uintptr_t, instead.  here is the
warning:
../../../gcc-svn/libgcc/../gcc/libgcc2.c: In function '__do_global_ctors':
../../../gcc-svn/libgcc/../gcc/libgcc2.c:2161: warning: cast from pointer to
integer of different size

the attached trivial patch fixes it.

--
Ozkan

PS: this was previously entered as an entry in the gcc bugzilla (39066).

Attachment: gbl-ctors-uintptr_t.patch
Description: Binary data


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]