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/19995] Linux syscall return value unnecessarily relies on implementation-defined behaviour


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.

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