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: Tue, 26 Apr 2016 13:53:32 +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 #1 from joseph at codesourcery dot com <joseph at codesourcery dot com> ---
On Tue, 26 Apr 2016, mt at debian dot org wrote:
> The unsigned -> signed conversion is implementation-defined for any values that
> cannot be represented in the signed type (as will be the case with any negative
> return value if it's two's complement). This seems to be case where relying on
> implementation-defined behaviour could be avoided.
This is fully defined in GNU C, and as far as I know in the consensus
between all normal C implementations in current use (although it's not one
of the areas covered in the Cerberus survey). I see no reason whatever to
avoid it anywhere in glibc.
--
You are receiving this mail because:
You are on the CC list for the bug.