This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/19995] Linux syscall return value unnecessarily relies on implementation-defined behaviour
- From: "joseph at codesourcery dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Thu, 28 Apr 2016 20:48:22 +0000
- Subject: [Bug libc/19995] Linux syscall return value unnecessarily relies on implementation-defined behaviour
- Auto-submitted: auto-generated
- References: <bug-19995-131 at http dot sourceware dot org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=19995
--- Comment #6 from joseph at codesourcery dot com <joseph at codesourcery dot com> ---
For such cases where the type is really "hardware register" not "integer"
(which I think is the case for syscall returns), if anything I'd say
unsigned types should be preferred, to avoid running into cases that are
undefined rather than implementation-defined with arithmetic and shifts
(signed shifts by a nonnegative amount less than the width of the type are
defined in GNU C even for the cases that are undefined in ISO C, but there
may best be avoided in most cases to facilitate potentially using
sanitizers on glibc).
--
You are receiving this mail because:
You are on the CC list for the bug.