|
@@ -59,8 +59,8 @@ void __attribute__((returns_twice)) returns_twice_test();
|
|
|
|
|
|
int aligned(int);
|
|
|
int __attribute__((vec_type_hint(char, aligned(16) )) missing_rparen_1; // expected-error 2{{expected ')'}} expected-note {{to match}} expected-warning {{does not declare anything}}
|
|
|
-int __attribute__((mode(x aligned(16) )) missing_rparen_2; // expected-error {{expected ')'}}
|
|
|
-int __attribute__((format(printf, 0 aligned(16) )) missing_rparen_3; // expected-error {{expected ')'}}
|
|
|
+int __attribute__((mode(x aligned(16) )) missing_rparen_2; // expected-error 2{{expected ')'}}
|
|
|
+int __attribute__((format(printf, 0 aligned(16) )) missing_rparen_3; // expected-error 2{{expected ')'}}
|
|
|
|
|
|
|
|
|
|
|
@@ -105,3 +105,11 @@ struct s {
|
|
|
// specifier.
|
|
|
struct s
|
|
|
__attribute__((used)) bar;
|
|
|
+
|
|
|
+// Ensure that attributes must be separated by a comma (PR38352).
|
|
|
+__attribute__((const const)) int PR38352(void); // expected-error {{expected ')'}}
|
|
|
+// Also ensure that we accept spurious commas.
|
|
|
+__attribute__((,,,const)) int PR38352_1(void);
|
|
|
+__attribute__((const,,,)) int PR38352_2(void);
|
|
|
+__attribute__((const,,,const)) int PR38352_3(void);
|
|
|
+__attribute__((,,,const,,,const,,,)) int PR38352_4(void);
|