From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 9BFA93858298; Tue, 19 Dec 2023 08:13:21 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9BFA93858298 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1702973601; bh=iDaUKiX2kCmwMgoIAk76jYBUdpXE13yKYM6GEwcjMUA=; h=From:To:Subject:Date:In-Reply-To:References:From; b=NonFgDOnx48Fkcnpjempu2kyZmQH8Dh1sTMTgbhUrEZL8nregv6F8yMh1xIG4l7qz tMg66/J0hCRqEwdlsEluSWSIJv+mC32xl59IN9Ias4TtB1LUYyXZUzCRDowjcRWTYj obCqwgsbmZFGLJXAWXsPsYb46czggWeR5oo3VCXg= From: "fw at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/113082] builtin transforms do not honor errno Date: Tue, 19 Dec 2023 08:13:19 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: middle-end X-Bugzilla-Version: 13.2.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: fw at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D113082 --- Comment #2 from Florian Weimer --- (In reply to Richard Biener from comment #1) > Joseph - I wonder if the standard folks can be convinced to amend most > library function documentation as to not altering 'errno' (like memcpy, > strlen, etc.)? >=20 > Should we simply document our constraints on supported library > implementations? We can add attributes to the glibc headers, similar to the throw and leaf annotation we have today. It would act as a reminder that if we clobber err= no in these functions due to some implementation detail, we need to save/resto= re errno.=