This is the mail archive of the libc-alpha@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]

Re: [PATCH 1/2] Avoid pointer type mismatch warning.


Roland McGrath wrote:
>> What do you think about not relying on gcc's void* arithmetic extension?
>
> Why?  We use the sensible GCC extensions freely in glibc code.

I've just built glibc with -Wpointer-arith and saw that there are already
several hundred uses of void* arithmetic, so I agree: there's no point
in trying to avoid adding this one more.

Just in case you haven't seen, there were a few other warnings
(compiling the latest from master on F16: glibc-2.15-160-ge19e83c)

clnt_unix.c:397:7: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
clnt_unix.c:402:2: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
clnt_unix.c:411:7: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
clnt_unix.c:416:2: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
clnt_tcp.c:425:7: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
clnt_tcp.c:430:2: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
clnt_tcp.c:439:7: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
clnt_tcp.c:444:2: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
pldd-xx.c:26:0: warning: "static_assert" redefined [enabled by default]


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