From nobody Tue Jan 18 15:43:49 2022 X-Original-To: bugs@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 747DC196D19D for ; Tue, 18 Jan 2022 15:43:49 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4JdY391hVzz3kvd for ; Tue, 18 Jan 2022 15:43:49 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id EE54223ECB for ; Tue, 18 Jan 2022 15:43:48 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 20IFhm1v087543 for ; Tue, 18 Jan 2022 15:43:48 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 20IFhmKs087542 for bugs@FreeBSD.org; Tue, 18 Jan 2022 15:43:48 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 261310] The libgen.h sources use C11-specific features under e.g. -std=gnu99, causing a -Wc11-extensions warning Date: Tue, 18 Jan 2022 15:43:49 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: misc X-Bugzilla-Version: CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Many People X-Bugzilla-Who: avarab@gmail.com X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform bug_file_loc op_sys bug_status bug_severity priority component assigned_to reporter cc attachments.created Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-bugs@freebsd.org MIME-Version: 1.0 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1642520629; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jsOxw/JMTicy3ZRP3pYCq5Oa5t4UNMeMpCnHf+KhFJs=; b=pq37fldk887WL6SjDwMr9UiQv6OW4xqS1LNdjTtqJ5xf6EuLyhEs23SX3LmmfpnrRs9FXT s8Y5WITDoeuT75PDCS7XOZGXyFeYVcybqIEnLtOQ2zY29IwUOjqKSs0PnSCD291HPAHY+y TYA+RSGEJ9JbHsA7h/2zT6NQ/pBk8TXkfVv8/UKpmy7k+3d+8f5KqRXRRI9jea5tq39GIs N0dr4p2mq0rNEWe8ydBjHYShNp3atuRdXIeKJ9ijyko9Lx8adzq8wsomemsdUZL16T89JV 8uOyeFgZ/knHIih7AQeHe7we8o8FCwyQA94z3+GbBbC3wPlkLcrEMPE2DCIfrw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1642520629; a=rsa-sha256; cv=none; b=yO/Iv1pwEcQn9F7VamfyeehznPtou45IgGBKOAsMGAtd3f+iZAb93XX2hAxsQ4KEJGZnut DPQEI7psAk31Mb1L4Hq1wNhuedhBxVw/HYytbMxlqyaWFeyvWdHC8McIkRx5GW7int4Ib8 PSj7pcLLowJcImsvt/k6jEDeLvpWWPYbpk61fCJjxoFtyWsjmROrqLSuIO2BPWF3xCCXdL t0QGRUrlm7vvmsCz8NU5VZZeMooNSs0/Aa2oIt7R7flfThY9+a932nzmj4/xmZvVmhcQJN ARC016ltzSJDpdVJnChf3yfOO4lY4jSotcqzHOmr3SAj8pG0J4t/bHT+edfTeg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D261310 Bug ID: 261310 Summary: The libgen.h sources use C11-specific features under e.g. -std=3Dgnu99, causing a -Wc11-extensions warning Product: Base System Version: CURRENT Hardware: Any URL: https://lore.kernel.org/git/patch-1.1-06cc12be94d-2022 0118T151234Z-avarab@gmail.com/ OS: Any Status: New Severity: Affects Many People Priority: --- Component: misc Assignee: bugs@FreeBSD.org Reporter: avarab@gmail.com CC: ed@FreeBSD.org, fuz@fuz.su Created attachment 231131 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D231131&action= =3Dedit "fix" the issue with _Generic() in libgen.h by ignoring -Wc11-extension The $subject issue was encountered when testing a pre-release of git. I've submitted a workaround for it in $url. As noted in $url I think this is a regression in the 2014-era commit by ed@FreeBSD.org to sys/cdefs.h (https://github.com/freebsd/freebsd-src/commit/62b7f85d4749). Since then the __generic() wrapper for the C11-_Generic() has checked the __STDC_VERSION__ *or* __has_extension(c_generic_selections). The problem be= ing that the latter is a way to ask if the compiler supports this at all, and n= ot whether the current -std=3D* would emit a warning about it conflicting with= the currently selected C version. There's probably a less crappy way to solve this, but I can't think of one = that isn't the attached patch. I.e. the issue is that both GCC and Clang don't s= eem to have a way to request the C version in effect for the purposes of warnin= gs being emitted, so we can just quiet the relevant warning. If such a thing exists I haven't found it. I'm not sure if FreeBSD still cares about GCC, but if so the added pragma l= ines also need duplicated "#pragma GCC...". --=20 You are receiving this mail because: You are the assignee for the bug.=