This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc 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]

[Bug libc/13067] New: obstack_free casts char* to int


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.


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