You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
constexpr auto intx=0; // c23-error {{cannot combine with previous 'auto' declaration specifier}} \
66
-
c17-error {{use of undeclared identifier 'constexpr'}}
67
-
68
-
constexpr int auto y=0; // c23-error {{cannot combine with previous 'int' declaration specifier}} \
69
-
c17-error {{use of undeclared identifier 'constexpr'}}
70
-
71
65
returnc;
72
66
}
73
67
@@ -136,3 +130,30 @@ void atomic(void) {
136
130
voidattributes(void) {
137
131
auto ident [[clang::annotate("this works")]] =12; // c17-error {{type specifier missing, defaults to 'int'; ISO C99 and later do not support implicit int}}
138
132
}
133
+
134
+
/** GH163090 */
135
+
constexpr auto inta1=0; // c23-error {{illegal storage class on file-scoped variable}} \
136
+
c23-error {{cannot combine with previous 'auto' declaration specifier}} \
137
+
c17-error {{illegal storage class on file-scoped variable}} \
138
+
c17-error {{unknown type name 'constexpr'}}
139
+
140
+
constexpr int auto a2=0; // c23-error {{cannot combine with previous 'int' declaration specifier}} \
141
+
c17-error {{illegal storage class on file-scoped variable}} \
142
+
c17-error {{unknown type name 'constexpr'}}
143
+
144
+
auto intb1=0; // c23-error {{illegal storage class on file-scoped variable}} \
145
+
c17-error {{illegal storage class on file-scoped variable}}
146
+
147
+
int auto b2=0; // c23-error {{cannot combine with previous 'int' declaration specifier}} \
148
+
c17-error {{illegal storage class on file-scoped variable}}
149
+
150
+
voidf() {
151
+
constexpr auto intc1=0; // c23-error {{cannot combine with previous 'auto' declaration specifier}} \
152
+
c17-error {{use of undeclared identifier 'constexpr'}}
153
+
154
+
constexpr int auto c2=0; // c23-error {{cannot combine with previous 'int' declaration specifier}} \
155
+
c17-error {{use of undeclared identifier 'constexpr'}}
156
+
157
+
auto intd1=0;
158
+
int auto d2=0; // c23-error {{cannot combine with previous 'int' declaration specifier}}
0 commit comments