"indirection requires pointer operand ('%0' invalid)")
DIAG(err_typecheck_deref_incomplete_type, ERROR,
"dereferencing pointer to incomplete type '%0'")
-DIAG(ext_typecheck_deref_ptr_to_void, EXTENSION,
+DIAG(ext_typecheck_deref_ptr_to_void, WARNING,
"dereferencing '%0' pointer")
DIAG(err_typecheck_invalid_operands, ERROR,
"invalid operands to binary expression ('%0' and '%1')")
-DIAG(ext_typecheck_comparison_of_pointer_integer, EXTENSION,
+DIAG(ext_typecheck_comparison_of_pointer_integer, WARNING,
"comparison between pointer and integer")
DIAG(err_typecheck_assign_const, ERROR,
"read-only variable is not assignable")
DIAG(err_typecheck_assign_incompatible, ERROR,
"incompatible types assigning '%1' to '%0'")
-DIAG(ext_typecheck_assign_pointer_int, EXTENSION,
+DIAG(ext_typecheck_assign_pointer_int, WARNING,
"incompatible types assigning '%1' to '%0'")
-DIAG(ext_typecheck_assign_incompatible_pointer, EXTENSION,
+DIAG(ext_typecheck_assign_incompatible_pointer, WARNING,
"incompatible pointer types assigning '%1' to '%0'")
-DIAG(ext_typecheck_assign_discards_qualifiers, EXTENSION,
+DIAG(ext_typecheck_assign_discards_qualifiers, WARNING,
"assigning '%1' to '%0' discards qualifiers")
DIAG(err_typecheck_array_not_modifiable_lvalue, ERROR,
"array type '%0' is not assignable")
"too many arguments to function")
DIAG(err_typecheck_passing_incompatible, ERROR,
"incompatible types passing '%0' to function expecting '%1'")
-DIAG(ext_typecheck_passing_incompatible_pointer, EXTENSION,
+DIAG(ext_typecheck_passing_incompatible_pointer, WARNING,
"incompatible pointer types passing '%0' to function expecting '%1'")
-DIAG(ext_typecheck_passing_pointer_int, EXTENSION,
+DIAG(ext_typecheck_passing_pointer_int, WARNING,
"incompatible types passing '%1' to function expecting '%0'")
-DIAG(ext_typecheck_passing_discards_qualifiers, EXTENSION,
+DIAG(ext_typecheck_passing_discards_qualifiers, WARNING,
"passing '%0' to '%1' discards qualifiers")
DIAG(err_typecheck_cond_expect_scalar, ERROR,
"used type '%0' where arithmetic or pointer type is required")
"operand of type '%0' where arithmetic or pointer type is required")
DIAG(err_typecheck_cond_incompatible_operands, ERROR,
"incompatible operand types ('%0' and '%1')")
-DIAG(ext_typecheck_cond_incompatible_pointers, EXTENSION,
+DIAG(ext_typecheck_cond_incompatible_pointers, WARNING,
"pointer type mismatch ('%0' and '%1')")
DIAG(warn_unused_expr, WARNING,
"'case' statement not in switch statement")
DIAG(err_typecheck_return_incompatible, ERROR,
"incompatible type returning '%1', expected '%0'")
-DIAG(ext_typecheck_return_pointer_int, EXTENSION,
+DIAG(ext_typecheck_return_pointer_int, WARNING,
"incompatible type returning '%1', expected '%0'")
-DIAG(ext_typecheck_return_incompatible_pointer, EXTENSION,
+DIAG(ext_typecheck_return_incompatible_pointer, WARNING,
"incompatible pointer type returning '%1', expected '%0'")
-DIAG(ext_typecheck_return_discards_qualifiers, EXTENSION,
+DIAG(ext_typecheck_return_discards_qualifiers, WARNING,
"returning '%1' from function expecting '%0' discards qualifiers")
DIAG(err_typecheck_statement_requires_scalar, ERROR,
"statement requires expression of scalar type ('%0' invalid)")
-// RUN: clang -parse-ast-check %s -pedantic
+// RUN: clang -parse-ast-check %s
typedef int TInt;
static void test() {
int *pi;
- int typeof (int) aIntInt; // expected-error{{cannot combine with previous 'int' declaration specifier}} expected-warning{{extension used}}
- short typeof (int) aShortInt; // expected-error{{'short typeof' is invalid}} expected-warning{{extension used}}
+ int typeof (int) aIntInt; // expected-error{{cannot combine with previous 'int' declaration specifier}}
+ short typeof (int) aShortInt; // expected-error{{'short typeof' is invalid}}
int int ttt; // expected-error{{cannot combine with previous 'int' declaration specifier}}
- typeof(TInt) anInt; // expected-warning{{extension used}}
+ typeof(TInt) anInt;
short TInt eee; // expected-error{{parse error}}
void ary[7] fff; // expected-error{{array has incomplete element type 'void'}} expected-error{{parse error}}
- typeof(void ary[7]) anIntError; // expected-warning{{extension used}} expected-error{{expected ')'}} expected-error{{to match this '('}}
- typeof(const int) aci; // expected-warning{{extension used}}
- const typeof (*pi) aConstInt; // expected-warning{{extension used}}
+ typeof(void ary[7]) anIntError; // expected-error{{expected ')'}} expected-error{{to match this '('}}
+ typeof(const int) aci;
+ const typeof (*pi) aConstInt;
int xx;
int *i;
i = aci; // expected-warning{{incompatible types assigning 'typeof(int const)' to 'int *'}}
i = anInt; // expected-warning{{incompatible types assigning 'typeof(TInt)' to 'int *'}}
- i = aConstInt; // expected-warning{{incompatible types assigning 'typeof(<expr>) const' to 'int *'}}
+ i = aConstInt; // expected-warning{{incompatible types assigning 'typeof(*pi) const' to 'int *'}}
i = xx; // expected-warning{{incompatible types assigning 'int' to 'int *'}}
}