From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 868C5385BF81; Thu, 16 Apr 2020 10:17:55 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 868C5385BF81 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1587032275; bh=Ins1Dys33qpAWrfFajiA0fd7o/tRXRiYmVG3t+8qbt4=; h=From:To:Subject:Date:In-Reply-To:References:From; b=nIuqxVcd3rDwUNTTJGlHCYEfpSIOLVtQ9Dyizogm0G1SPci1oDluz8+kcafzHU2S3 uwcWJeneuQnHvCuN41+cTtWD3BdeQR3iSnw0i3baMmw2gvkx0lO4kODLwy+v/KhtqY rqjmtZPGPt6c9UxXpR9RyA2wY5Eh8STkOqMTBBX8= From: "fw at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/94615] -Wstringop-truncation warns on strncpy() with struct lastlog (or utmp) Date: Thu, 16 Apr 2020 10:17:55 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c X-Bugzilla-Version: 8.0 X-Bugzilla-Keywords: diagnostic X-Bugzilla-Severity: normal X-Bugzilla-Who: fw at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED 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: cc 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 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Apr 2020 10:17:55 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D94615 Florian Weimer changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fw at gcc dot gnu.org --- Comment #2 from Florian Weimer --- (In reply to Allison Karlitskaya from comment #0) > GCC 8 gives this warning, though: >=20 > /usr/include/bits/string_fortified.h:106:10: warning: '__builtin_strncpy' > specified bound 256 equals destination size [-Wstringop-truncation] >=20 > ... which on its face seems kinda funny, because the bound *should* equal > the destination size. Particularly in this case. If this is true (of which I'm not yet sure), we are missing a nonstring attribute in the glibc header. Either way, it's not a GCC bug, sorry.=