This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/13067] New: obstack_free casts char* to int
- From: "marc.glisse at normalesup dot org" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sources dot redhat dot com
- Date: Mon, 8 Aug 2011 22:26:29 +0000
- Subject: [Bug libc/13067] New: obstack_free casts char* to int
- Auto-submitted: auto-generated
http://sourceware.org/bugzilla/show_bug.cgi?id=13067
Summary: obstack_free casts char* to int
Product: glibc
Version: unspecified
Status: NEW
Severity: normal
Priority: P2
Component: libc
AssignedTo: drepper.fsp@gmail.com
ReportedBy: marc.glisse@normalesup.org
Created attachment 5885
--> http://sourceware.org/bugzilla/attachment.cgi?id=5885
Cast to char*
Hello,
in malloc/obstack.h, the version of obstack_free for non-gnu or non-stdc casts
a pointer to an int. The result is ignored, so that's not a problem, except
that it may cause compilation warnings or even errors (in C++). The cast is
done to match the type of 0 in the ?: alternative. The patch instead casts 0 to
char*.
I originally posted a similar patch for gcc's version of obstack.h and was
advised to post it here.
http://gcc.gnu.org/ml/gcc-patches/2011-08/msg00758.html
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.