From Jason Turner

[dcl.attr.grammar]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmppisxwcn5/{from.md → to.md} +22 -8
tmp/tmppisxwcn5/{from.md → to.md} RENAMED
@@ -111,39 +111,53 @@ contained in an *attribute-token*, it is considered an identifier. No
111
  name lookup [[basic.lookup]] is performed on any of the identifiers
112
  contained in an *attribute-token*. The *attribute-token* determines
113
  additional requirements on the *attribute-argument-clause* (if any).
114
 
115
  Each *attribute-specifier-seq* is said to *appertain* to some entity or
116
- statement, identified by the syntactic context where it appears (
117
- [[stmt.stmt]], [[dcl.dcl]], [[dcl.decl]]). If an
118
  *attribute-specifier-seq* that appertains to some entity or statement
119
  contains an *attribute* or *alignment-specifier* that is not allowed to
120
  apply to that entity or statement, the program is ill-formed. If an
121
  *attribute-specifier-seq* appertains to a friend declaration
122
  [[class.friend]], that declaration shall be a definition.
123
 
124
  [*Note 3*: An *attribute-specifier-seq* cannot appeartain to an
125
  explicit instantiation [[temp.explicit]]. — *end note*]
126
 
127
  For an *attribute-token* (including an *attribute-scoped-token*) not
128
- specified in this document, the behavior is *implementation-defined*.
129
- Any *attribute-token* that is not recognized by the implementation is
130
- ignored. An *attribute-token* is reserved for future standardization if
 
 
 
 
 
 
 
 
 
 
 
 
 
 
131
 
132
  - it is not an *attribute-scoped-token* and is not specified in this
133
  document, or
134
  - it is an *attribute-scoped-token* and its *attribute-namespace* is
135
  `std` followed by zero or more digits.
136
 
137
- [*Note 4*: Each implementation should choose a distinctive name for the
138
- *attribute-namespace* in an *attribute-scoped-token*. — *end note*]
139
 
140
  Two consecutive left square bracket tokens shall appear only when
141
  introducing an *attribute-specifier* or within the *balanced-token-seq*
142
  of an *attribute-argument-clause*.
143
 
144
- [*Note 5*: If two consecutive left square brackets appear where an
145
  *attribute-specifier* is not allowed, the program is ill-formed even if
146
  the brackets match an alternative grammar production. — *end note*]
147
 
148
  [*Example 2*:
149
 
 
111
  name lookup [[basic.lookup]] is performed on any of the identifiers
112
  contained in an *attribute-token*. The *attribute-token* determines
113
  additional requirements on the *attribute-argument-clause* (if any).
114
 
115
  Each *attribute-specifier-seq* is said to *appertain* to some entity or
116
+ statement, identified by the syntactic context where it appears
117
+ [[stmt.stmt]], [[dcl.dcl]], [[dcl.decl]]. If an
118
  *attribute-specifier-seq* that appertains to some entity or statement
119
  contains an *attribute* or *alignment-specifier* that is not allowed to
120
  apply to that entity or statement, the program is ill-formed. If an
121
  *attribute-specifier-seq* appertains to a friend declaration
122
  [[class.friend]], that declaration shall be a definition.
123
 
124
  [*Note 3*: An *attribute-specifier-seq* cannot appeartain to an
125
  explicit instantiation [[temp.explicit]]. — *end note*]
126
 
127
  For an *attribute-token* (including an *attribute-scoped-token*) not
128
+ specified in this document, the behavior is *implementation-defined*;
129
+ any such *attribute-token* that is not recognized by the implementation
130
+ is ignored.
131
+
132
+ [*Note 4*: A program is ill-formed if it contains an *attribute*
133
+ specified in [[dcl.attr]] that violates the rules specifying to which
134
+ entity or statement the attribute can apply or the syntax rules for the
135
+ attribute’s *attribute-argument-clause*, if any. — *end note*]
136
+
137
+ [*Note 5*: The *attribute*s specified in [[dcl.attr]] have optional
138
+ semantics: given a well-formed program, removing all instances of any
139
+ one of those *attribute*s results in a program whose set of possible
140
+ executions [[intro.abstract]] for a given input is a subset of those of
141
+ the original program for the same input, absent implementation-defined
142
+ guarantees with respect to that *attribute*. — *end note*]
143
+
144
+ An *attribute-token* is reserved for future standardization if
145
 
146
  - it is not an *attribute-scoped-token* and is not specified in this
147
  document, or
148
  - it is an *attribute-scoped-token* and its *attribute-namespace* is
149
  `std` followed by zero or more digits.
150
 
151
+ Each implementation should choose a distinctive name for the
152
+ *attribute-namespace* in an *attribute-scoped-token*.
153
 
154
  Two consecutive left square bracket tokens shall appear only when
155
  introducing an *attribute-specifier* or within the *balanced-token-seq*
156
  of an *attribute-argument-clause*.
157
 
158
+ [*Note 6*: If two consecutive left square brackets appear where an
159
  *attribute-specifier* is not allowed, the program is ill-formed even if
160
  the brackets match an alternative grammar production. — *end note*]
161
 
162
  [*Example 2*:
163