From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 83BE13848016; Tue, 18 May 2021 12:28:51 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 83BE13848016 From: "gjover at sipwise dot com" To: glibc-bugs@sourceware.org Subject: [Bug libc/27885] New: _Static_assert fallback definition in triggers a lgtm.com alert Date: Tue, 18 May 2021 12:28:51 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: glibc X-Bugzilla-Component: libc X-Bugzilla-Version: 2.34 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: gjover at sipwise dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter cc target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: glibc-bugs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Glibc-bugs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 May 2021 12:28:51 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D27885 Bug ID: 27885 Summary: _Static_assert fallback definition in triggers a lgtm.com alert Product: glibc Version: 2.34 Status: UNCONFIRMED Severity: normal Priority: P2 Component: libc Assignee: unassigned at sourceware dot org Reporter: gjover at sipwise dot com CC: drepper.fsp at gmail dot com Target Milestone: --- The fallback definition for _Static_assert in , which is curre= ntly (as of git HEAD glibc-2.33.9000-613-g4d4bb451d5f): #if (!defined _Static_assert && !defined __cplusplus \ && (defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) < 201112 \ && (!__GNUC_PREREQ (4, 6) || defined __STRICT_ANSI__)) # define _Static_assert(expr, diagnostic) \ extern int (*__Static_assert_function (void)) \ [!!sizeof (struct { int __error_if_negative: (expr) ? 2 : -1; })] #endif causes the lgtm.com analyzer to trigger, on code using that keyword, the following alert: https://lgtm.com/rules/1506024027114/ which is described as: Ambiguously signed bit-field member Bit fields with integral types should have explicit signedness only. For= =20 example, use `unsigned int` rather than `int`. It is implementation speci= fic=20 whether an `int`-typed bit field is signed, so there could be unexpected = sign=20 extension or overflow. --=20 You are receiving this mail because: You are on the CC list for the bug.=