[Bug c++/92521] New: [[deprecated(("string-literal"))]] accepted with extra parentheses
jsm28 at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Nov 14 23:25:00 GMT 2019
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92521
Bug ID: 92521
Summary: [[deprecated(("string-literal"))]] accepted with extra
parentheses
Product: gcc
Version: 10.0
Status: UNCONFIRMED
Keywords: accepts-invalid
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: jsm28 at gcc dot gnu.org
Target Milestone: ---
The C++ standard says the only valid attribute-argument-clause for the
"deprecated" attribute is (string-literal). In particular, redundantly
parenthesized string literals are not permitted. However, the C++ front end
accepts invalid code such as:
int a [[deprecated((((""))))]];
More information about the Gcc-bugs
mailing list