From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 260413857009; Tue, 16 May 2023 19:35:08 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 260413857009 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1684265708; bh=NiH0djuxyUn/bW0qLE5PKYnglqDhbu9pzwEFJFzGEmI=; h=From:To:Subject:Date:From; b=X7k3ikVNJWnb2dv+DP+jxRMF/W6RcpZ9grvt3KuHFYZ/xQkLqBAb+Af+tC/tMWXHV NfNzh/efSWyZcjRaP8B9g4yDzsfSXDpE+1FrjRuNNPZAiAs56MolUZ7uJoSGaJ6d5V kOlgR++lz9S2GtD9MpIE69LLilXa+ZDVkZ1Xjs3M= From: "iains at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/109877] New: Support for clang-style attributes is needed to parse Darwin SDK headers properly Date: Tue, 16 May 2023 19:35:07 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: unknown X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: iains 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: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: 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=3D109877 Bug ID: 109877 Summary: Support for clang-style attributes is needed to parse Darwin SDK headers properly Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: iains at gcc dot gnu.org Target Milestone: --- clang has GNU-style attribute support, but with essentially per-attribute parsing of the attribute argument list. This extends to, for example: __attribute__((availability(macOS, introduced=3D12.3.4))) and: __attribute__((availability(macOS, message=3D"partial string" "more string"= ))) These are examples that GCC rejects; The issue actually need addressing during lexing since the first is an inva= lid token for a number (it's intended to represent a version) and we reject it before the parser has a chance to treat it specially. Ergo, we need a way to escape clang-specific attributes so that we can parse them.=