tinycc/tests/tests2/60_errors_and_warnings.expect
Christopher Bazley f4d81ced3e tccgen: Minimal implementation of restrict
TCC currently recognises the restrict keyword but
discards it. Give the qualifier its own type bit and
diagnose misuse that violates constraints in ISO C.

There is (obviously) no new aliasing analysis.
2026-09-26 21:47:46 +01:00

308 lines
9.7 KiB
Plaintext

[test_56_btype_excess_1]
60_errors_and_warnings.c:4: error: too many basic types
[test_57_btype_excess_2]
60_errors_and_warnings.c:6: error: too many basic types
[test_58_function_redefinition]
60_errors_and_warnings.c:9: error: redefinition of 'f'
[test_global_redefinition]
60_errors_and_warnings.c:14: error: redefinition of 'xxx'
[test_59_function_array]
60_errors_and_warnings.c:17: error: declaration of an array of functions
[test_60_enum_redefinition]
60_errors_and_warnings.c:21: error: struct/union/enum already defined
[test_62_enumerator_redefinition]
60_errors_and_warnings.c:26: error: redeclaration of 'RED'
[test_63_local_enumerator_redefinition]
[returns 1]
[test_61_undefined_enum]
60_errors_and_warnings.c:46: error: initialization of incomplete type
[test_74_non_const_init]
60_errors_and_warnings.c:49: error: initializer element is not constant
[test_pointer_assignment]
60_errors_and_warnings.c:79: warning: assignment from incompatible pointer type
60_errors_and_warnings.c:82: warning: assignment from incompatible pointer type
60_errors_and_warnings.c:86: warning: assignment from incompatible pointer type
60_errors_and_warnings.c:88: warning: assignment from incompatible pointer type
60_errors_and_warnings.c:91: warning: assignment from incompatible pointer type
60_errors_and_warnings.c:92: warning: assignment from incompatible pointer type
60_errors_and_warnings.c:94: warning: assignment from incompatible pointer type
60_errors_and_warnings.c:95: warning: assignment from incompatible pointer type
60_errors_and_warnings.c:98: warning: assignment discards qualifiers from pointer target type
60_errors_and_warnings.c:99: warning: assignment discards qualifiers from pointer target type
60_errors_and_warnings.c:103: warning: assignment discards qualifiers from pointer target type
60_errors_and_warnings.c:104: warning: assignment discards qualifiers from pointer target type
60_errors_and_warnings.c:109: warning: assignment of read-only location
[test_enum_compat]
60_errors_and_warnings.c:119: error: incompatible types for redefinition of 'f3'
[test_enum_compat_2]
60_errors_and_warnings.c:126: error: incompatible types for redefinition of 'f4'
[test_ptr_to_str]
60_errors_and_warnings.c:129: error: type 'const int **' does not match any association
[test_fnptr_to_str]
60_errors_and_warnings.c:131: error: type 'int (*(*)(float, char))(double, int)' does not match any association
[test_array_to_str]
60_errors_and_warnings.c:133: error: type 'int (*)[3]' does not match any association
[test_duplicate_def_1]
60_errors_and_warnings.c:135: error: redefinition of 'L'
[test_duplicate_def_2]
60_errors_and_warnings.c:138: error: redeclaration of 'L'
[test_abstract_decls]
60_errors_and_warnings.c:148: error: identifier expected
[test_invalid_1]
60_errors_and_warnings.c:153: error: expression expected before ','
[test_invalid_2]
60_errors_and_warnings.c:156: error: ';' expected (got '{')
[test_invalid_3]
60_errors_and_warnings.c:160: error: ',' expected (got 'a')
[test_invalid_4]
60_errors_and_warnings.c:164: error: division by zero in constant
[test_conflicting_types]
60_errors_and_warnings.c:170: error: incompatible types for redefinition of 'i'
[test_nested_types]
60_errors_and_warnings.c:177: error: struct/union/enum already defined
[test_vla_1]
60_errors_and_warnings.c:184: error: need explicit inner array size in VLAs
[test_invalid_alignas]
60_errors_and_warnings.c:188: error: identifier expected
[test_static_assert]
60_errors_and_warnings.c:194: error: ONE is not 1
[test_static_assert_2]
60_errors_and_warnings.c:198: error: 0 is 0
[test_static_assert_c2x]
60_errors_and_warnings.c:202: error: _Static_assert fail
[test_static_assert_empty_string]
60_errors_and_warnings.c:205: error:
[test_void_array]
60_errors_and_warnings.c:208: error: declaration of an array of incomplete type elements
[test_incomplete_enum_array]
60_errors_and_warnings.c:211: error: declaration of an array of incomplete type elements
[test_incomplete_struct_array]
60_errors_and_warnings.c:214: error: declaration of an array of incomplete type elements
[test_const_fun_array]
60_errors_and_warnings.c:218: error: declaration of an array of functions
[test_incomplete_array_array]
[test_extern_array]
60_errors_and_warnings.c:234: error: incompatible types for redefinition of 'x'
[test_func_1]
hello: a = 123
[test_func_2]
hello: a = 123
[test_func_3]
60_errors_and_warnings.c:264: warning: static storage ignored for redefinition of 'hello'
hello: a = 123
[test_func_4]
hello: a = 123
[test_func_5]
60_errors_and_warnings.c:264: error: incompatible types for redefinition of 'hello'
[test_func_6]
60_errors_and_warnings.c:252: error: function without file scope cannot be static
[test_var_1]
main : 1 ; 1
main : 2 ; 2
bar : 3 ; 3
[test_var_2]
main : 1 ; 1
main : 2 ; 2
bar : 3 ; 3
[test_var_3]
60_errors_and_warnings.c:296: error: incompatible types for redefinition of 'xxx'
[test_var_4]
[test_long_double_type_for_win32]
60_errors_and_warnings.c:327: warning: assignment from incompatible pointer type
[test_stray_backslash]
60_errors_and_warnings.c:333: error: stray '\' in program
[test_stray_backslash2]
\n
[test_var_array]
60_errors_and_warnings.c:348: error: flexible array has zero size in this context
[test_var_array2]
60_errors_and_warnings.c:358: error: flexible array has zero size in this context
[test_var_array3]
60_errors_and_warnings.c:365: error: flexible array has zero size in this context
[test_default_int_type]
60_errors_and_warnings.c:368: warning: type defaults to int
[test_invalid_global_stmtexpr]
60_errors_and_warnings.c:372: error: statement expression outside of function
[test_invalid_tokckill]
60_errors_and_warnings.c:375: error: ';' expected (got '3')
[test_duplicate_member]
60_errors_and_warnings.c:381: error: duplicate member 'a'
[test_duplicate_member_anon]
60_errors_and_warnings.c:394: error: duplicate member 'd'
[test_conflicting_array_definition]
60_errors_and_warnings.c:399: error: too many initializers
[test_incompatible_local_redef]
60_errors_and_warnings.c:406: error: incompatible redefinition of 'localfunctype'
[test_cast_from_void]
60_errors_and_warnings.c:411: error: cannot convert 'void' to 'int'
[test_switch_W1]
60_errors_and_warnings.c:427: warning: implicit declaration of function 'fink'
[test_switch_W2]
60_errors_and_warnings.c:418: warning: unsupported option '-Wstuff'
60_errors_and_warnings.c:429: warning: 'stuff' attribute ignored
[test_switch_W3]
60_errors_and_warnings.c:426: error: assignment discards qualifiers from pointer target type
[test_switch_W4]
60_errors_and_warnings.c:427: warning: implicit declaration of function 'fink'
60_errors_and_warnings.c:429: error: 'stuff' attribute ignored
[test_invalid_funcparam_1]
60_errors_and_warnings.c:432: error: redeclaration of 'a'
[test_invalid_funcparam_2]
60_errors_and_warnings.c:435: error: identifier expected
[test_array_funcparam]
arg[0] = "X"
arg[1] = "Y"
[test_return_from_statement_expr]
[returns 78]
[test_illegal_unicode]
60_errors_and_warnings.c:459: error: 0xffffffff is not a valid universal character
[test_error_string]
60_errors_and_warnings.c:464: error: #error \123\456
[test_error_incomplete_type]
60_errors_and_warnings.c:472: error: initialization of incomplete type
[test_pp_error_1]
60_errors_and_warnings.c:480: error: #if with no expression
[test_pp_error_2]
60_errors_and_warnings.c:483: error: bad preprocessor expression: #if 0 ( 1 , 2 )
[test_pointer_plus_double]
60_errors_and_warnings.c:490: error: invalid operand types for binary operation
[test_duplicate_case]
60_errors_and_warnings.c:499: warning: empty case range
60_errors_and_warnings.c:503: error: duplicate case value
[test_normal_funcargs]
122333 1 2 3
[test_reverse_funcargs]
333221 1 2 3
[test_scope_1]
60_errors_and_warnings.c:548: warning: assignment from incompatible pointer type
foo 12 44 16
bar 15 12 34
[test_scope_2]
60_errors_and_warnings.c:539: error: incompatible types for redefinition of 'foo'
[test_scope_3]
60_errors_and_warnings.c:548: warning: assignment from incompatible pointer type
60_errors_and_warnings.c:549: error: initialization of incomplete type
[test_const_array_member_addr_ok]
[test_const_array_member_decay_ok]
[test_const_array_member_addr_bad]
60_errors_and_warnings.c:581: warning: assignment discards qualifiers from pointer target type
[test_const_array_member_decay_bad]
60_errors_and_warnings.c:591: warning: assignment discards qualifiers from pointer target type
[test_const_array_member_write_bad]
60_errors_and_warnings.c:601: warning: assignment of read-only location
[test_const_struct_array_member_write_bad]
60_errors_and_warnings.c:611: warning: assignment of read-only location
[test_volatile_array_member_addr_ok]
[test_volatile_array_member_decay_ok]
[test_volatile_array_member_addr_bad]
60_errors_and_warnings.c:641: warning: assignment discards qualifiers from pointer target type
[test_volatile_array_member_decay_bad]
60_errors_and_warnings.c:651: warning: assignment discards qualifiers from pointer target type
[test_volatile_array_member_write_ok]
[test_conditional_array_qualifiers]
60_errors_and_warnings.c:676: warning: assignment of read-only location
60_errors_and_warnings.c:677: warning: assignment of read-only location
60_errors_and_warnings.c:678: warning: assignment of read-only location
60_errors_and_warnings.c:679: warning: assignment of read-only location
[test_restrict_scalar]
60_errors_and_warnings.c:684: error: restrict-qualified type must be a pointer to object or incomplete type
[test_restrict_function_pointer]
60_errors_and_warnings.c:688: error: restrict-qualified type must be a pointer to object or incomplete type
[test_discarded_restrict]
60_errors_and_warnings.c:699: warning: assignment discards qualifiers from pointer target type