Bug 110345 - [C++26] P2552R3 - On the ignorability of standard attributes
Summary: [C++26] P2552R3 - On the ignorability of standard attributes
Status: UNCONFIRMED
Alias: None
Product: gcc
Classification: Unclassified
Component: c++ (show other bugs)
Version: 14.0
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks: c++26-core
  Show dependency treegraph
 
Reported: 2023-06-21 16:20 UTC by Marek Polacek
Modified: 2023-08-25 09:29 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments
gcc14-pr110345-wip.patch (1.73 KB, patch)
2023-08-25 09:29 UTC, Jakub Jelinek
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Marek Polacek 2023-06-21 16:20:53 UTC
See <https://wg21.link/P2552R3>.
Comment 1 Jakub Jelinek 2023-08-25 09:29:25 UTC
Created attachment 55791 [details]
gcc14-pr110345-wip.patch

So, parts of this paper has been already fixed in r13-3848-g05119c345797bc04c .
The fallthrough stuff is still outstanding I think and I'll have a look.
The largest nightmare is diagnostics on standard attributes which appertain to something that shouldn't allow them, I'm lost there.
I went through the grammar (except for modules) and tried to find all spots where standard allows attribute-specifier-seq and tried to write that into a testcase in the attached patch, for now for deprecated attribute and marked all -pedantic-errors diagnostics.  I've added lots of FIXMEs in there where I don't really know.  There are
even 4 spots where we don't parse the attributes at all (and clang++ does), on the other side there are 4 spots where we do parse them and clang++ doesn't.
I think to mark this paper fully resolved we'd need to resolve the FIXMEs and copy/adjust the test for all other standard attributes and verify we emit at least some diagnostics with -pedantic-errors where the standard attributes aren't allowed to appertain to.