Created on2015-02-03.00:00:00 last changed109 months ago
Proposed resolution (September, 2015):
Change 9.13.1 [dcl.attr.grammar] paragraph 6 as follows:
Two consecutive left square bracket tokens shall appear only whenintroducing anattribute-specifieror withinthebalanced-token-seq ofanattribute-argument-clause. [Note: If two consecutiveleft square brackets appear where anattribute-specifier is notallowed, the program is ill-formed even if the brackets match analternative grammar production. —end note][Example:
int p[10]; void f() { int x = 42, y[5]; int(p[[x] { return x; }()]); // error: invalid attribute on a nested // declarator-id and not a function-style cast of // an element ofp. y[[] { return 2; }()] = 2; // error even though attributes are not allowed // in this context. int i [[vendor::attr([[]])]]; // well-formed implementation-defined attribute. }—end example]
[Adopted at the February, 2016 meeting.]
According to 9.13.1 [dcl.attr.grammar] paragraph 6,
Two consecutive left square bracket tokens shall appear onlywhen introducinganattribute-specifier. [Note: If twoconsecutive left square brackets appear whereanattribute-specifier is not allowed, the program isill-formed even if the brackets match an alternative grammarproduction. —end note]
In order to allow program fragments to appeae withinattributes, this restriction should not apply within thebalanced-token-seq of an attribute.
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2017-02-06 00:00:00 | admin | set | status: tentatively ready -> cd4 |
| 2015-11-10 00:00:00 | admin | set | messages: +msg5600 |
| 2015-11-10 00:00:00 | admin | set | status: drafting -> tentatively ready |
| 2015-02-03 00:00:00 | admin | create | |