From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 785A53858C54; Thu, 1 Dec 2022 14:51:48 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 785A53858C54 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1669906308; bh=Z465NN++e8/1ebv8JwVb5oH9fhOD7PkrshWc3UH/x00=; h=From:To:Subject:Date:In-Reply-To:References:From; b=b/nQld/DZUxyEQc1VvDq376QoVF7nYmpiH9zB73bSmVZpSU/ym08y9o8Vn8pRs9dY 4zdL3NNgTVQskCkDbVGnBdaXtGqqOAteWySvjtGtOAmQzUkonN1OxNJDIDwVueQuLO M7kcSVh+LwnjFO7lwgzWiLLgKVBK7gJdUTHligQw= From: "redi at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/107947] __has_c_attribute incorrectly identifies attribute as supported Date: Thu, 01 Dec 2022 14:51:48 +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: 13.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: redi at gcc dot gnu.org X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: INVALID 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=3D107947 --- Comment #3 from Jonathan Wakely --- (In reply to WANG Xuerui from comment #0) > I haven't bisected yet but can help doing so if necessary. Bisection shows that it changed with r13-2976 which is the commit that added support for the [[noreturn]] attribute. So it's totally correct that __has_c_attribute starts to be non-zero then, because it started to be supported then. c: C2x noreturn attribute C2x adds a standard [[noreturn]] attribute (which can also be spelt [[_Noreturn]] for use with ), so allowing non-returning functions to be declared in a manner compatible with C++; the _Noreturn function specifier remains available but is marked obsolescent.=