From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 7A58A3858C5E; Sat, 5 Aug 2023 08:40:15 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7A58A3858C5E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1691224815; bh=DRU4WV3tFKVZxx7Not5VmGhqO5BYn+nh5mM3o+uK6Sg=; h=From:To:Subject:Date:In-Reply-To:References:From; b=ir5sX/FiZxaWFPmuE7VbXiYixoxxrKqRyyK+I9cJgIAga0rdayU8m17JhSHKqjrNq dcTaxUuG3wB/pQf1gocibAsgwFc4BKHi0dU97DiE0fQt6Lmj8Ug1SlrrkNLISgAgdN ZWWJBsD2H/iEHeVhY8OtqSAJWAfpBPq79TVvLp1U= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/97100] -Wformat checks all arms of _Generic leading to irrelevant type expectation warnings Date: Sat, 05 Aug 2023 08:40:14 +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: 10.0 X-Bugzilla-Keywords: diagnostic, patch X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit 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: 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=3D97100 --- Comment #3 from CVS Commits --- The master branch has been updated by Martin Uecker : https://gcc.gnu.org/g:54be338589ea93ad4ff53d22adde476a0582537b commit r14-3004-g54be338589ea93ad4ff53d22adde476a0582537b Author: Martin Uecker Date: Fri Aug 4 07:48:21 2023 +0200 c: _Generic should not warn in non-active branches [PR68193,PR97100,PR110703] To avoid false diagnostics, use c_inhibit_evaluation_warnings when a generic association is known to not match during parsing. We may still generate false positives if the default branch comes earler than a specific association that matches. PR c/68193 PR c/97100 PR c/110703 gcc/c/: * c-parser.cc (c_parser_generic_selection): Inhibit evaluation warnings branches that are known not be taken during parsing. gcc/testsuite/ChangeLog: * gcc.dg/pr68193.c: New test.=