2017-07-21 04:21:27 +08:00
|
|
|
[test_56_btype_excess_1]
|
|
|
|
60_errors_and_warnings.c:2: error: too many basic types
|
|
|
|
|
|
|
|
[test_57_btype_excess_2]
|
|
|
|
60_errors_and_warnings.c:5: 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: redefinition of enumerator 'RED'
|
|
|
|
|
|
|
|
[test_63_local_enumerator_redefinition]
|
2020-01-18 05:58:39 +08:00
|
|
|
[returns 1]
|
2017-07-21 04:21:27 +08:00
|
|
|
|
|
|
|
[test_61_undefined_enum]
|
|
|
|
60_errors_and_warnings.c:46: error: unknown type size
|
|
|
|
|
|
|
|
[test_74_non_const_init]
|
|
|
|
60_errors_and_warnings.c:49: error: initializer element is not constant
|
2018-06-01 05:52:07 +08:00
|
|
|
|
|
|
|
[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'
|
2018-11-13 00:11:24 +08:00
|
|
|
|
2020-06-05 22:02:08 +08:00
|
|
|
[test_enum_compat_2]
|
|
|
|
60_errors_and_warnings.c:126: error: incompatible types for redefinition of 'f4'
|
|
|
|
|
2018-11-13 00:11:24 +08:00
|
|
|
[test_ptr_to_str]
|
2020-06-05 22:02:08 +08:00
|
|
|
60_errors_and_warnings.c:129: error: type 'const int **' does not match any association
|
2018-11-13 00:11:24 +08:00
|
|
|
|
|
|
|
[test_fnptr_to_str]
|
2020-06-05 22:02:08 +08:00
|
|
|
60_errors_and_warnings.c:131: error: type 'int (*(*)(float, char))(double, int)' does not match any association
|
2018-11-13 00:11:24 +08:00
|
|
|
|
|
|
|
[test_array_to_str]
|
2020-06-05 22:02:08 +08:00
|
|
|
60_errors_and_warnings.c:133: error: type 'int (*)[3]' does not match any association
|
2019-03-09 00:58:25 +08:00
|
|
|
|
|
|
|
[test_duplicate_def_1]
|
2020-06-05 22:02:08 +08:00
|
|
|
60_errors_and_warnings.c:135: error: redefinition of 'L'
|
2019-03-09 00:58:25 +08:00
|
|
|
|
|
|
|
[test_duplicate_def_2]
|
2020-06-05 22:02:08 +08:00
|
|
|
60_errors_and_warnings.c:138: error: redeclaration of 'L'
|
2019-03-13 00:27:15 +08:00
|
|
|
|
|
|
|
[test_abstract_decls]
|
2020-06-05 22:02:08 +08:00
|
|
|
60_errors_and_warnings.c:148: error: identifier expected
|
2019-03-18 10:26:19 +08:00
|
|
|
|
|
|
|
[test_invalid_1]
|
2020-06-05 22:02:08 +08:00
|
|
|
60_errors_and_warnings.c:153: error: identifier expected
|
2019-03-18 10:26:19 +08:00
|
|
|
|
|
|
|
[test_invalid_2]
|
2020-06-05 22:02:08 +08:00
|
|
|
60_errors_and_warnings.c:156: error: ';' expected (got "{")
|
2019-03-18 10:26:19 +08:00
|
|
|
|
|
|
|
[test_invalid_3]
|
2020-06-05 22:02:08 +08:00
|
|
|
60_errors_and_warnings.c:160: error: ',' expected (got "a")
|
2019-03-18 12:53:03 +08:00
|
|
|
|
2020-01-16 06:32:40 +08:00
|
|
|
[test_invalid_4]
|
2020-06-05 22:02:08 +08:00
|
|
|
60_errors_and_warnings.c:164: error: division by zero in constant
|
2020-01-16 06:32:40 +08:00
|
|
|
|
2019-03-18 12:53:03 +08:00
|
|
|
[test_conflicting_types]
|
2020-06-05 22:02:08 +08:00
|
|
|
60_errors_and_warnings.c:170: error: incompatible types for redefinition of 'i'
|
2019-04-07 09:15:05 +08:00
|
|
|
|
|
|
|
[test_nested_types]
|
2020-06-05 22:02:08 +08:00
|
|
|
60_errors_and_warnings.c:177: error: struct/union/enum already defined
|
2019-04-07 10:09:25 +08:00
|
|
|
|
|
|
|
[test_vla_1]
|
2020-06-05 22:02:08 +08:00
|
|
|
60_errors_and_warnings.c:184: error: need explicit inner array size in VLAs
|
2019-04-09 02:58:49 +08:00
|
|
|
|
|
|
|
[test_invalid_alignas]
|
2020-06-05 22:02:08 +08:00
|
|
|
60_errors_and_warnings.c:188: error: identifier expected
|
2019-04-28 14:27:33 +08:00
|
|
|
|
|
|
|
[test_static_assert]
|
2020-06-05 22:02:08 +08:00
|
|
|
60_errors_and_warnings.c:194: error: ONE is not 1
|
2020-02-29 08:24:35 +08:00
|
|
|
|
|
|
|
[test_static_assert_2]
|
2020-06-05 22:02:08 +08:00
|
|
|
60_errors_and_warnings.c:198: error: 0 is 0
|
2019-06-24 16:28:36 +08:00
|
|
|
|
2020-02-29 08:55:11 +08:00
|
|
|
[test_static_assert_c2x]
|
2020-06-05 22:02:08 +08:00
|
|
|
60_errors_and_warnings.c:202: error: _Static_assert fail
|
2020-02-29 08:55:11 +08:00
|
|
|
|
2022-11-30 02:45:05 +08:00
|
|
|
[test_static_assert_empty_string]
|
|
|
|
60_errors_and_warnings.c:205: error:
|
|
|
|
|
2019-06-24 16:28:36 +08:00
|
|
|
[test_void_array]
|
2022-11-30 02:45:05 +08:00
|
|
|
60_errors_and_warnings.c:208: error: declaration of an array of incomplete type elements
|
2019-06-24 16:28:36 +08:00
|
|
|
|
|
|
|
[test_incomplete_enum_array]
|
2022-11-30 02:45:05 +08:00
|
|
|
60_errors_and_warnings.c:211: error: declaration of an array of incomplete type elements
|
2019-06-24 16:28:36 +08:00
|
|
|
|
|
|
|
[test_incomplete_struct_array]
|
2022-11-30 02:45:05 +08:00
|
|
|
60_errors_and_warnings.c:214: error: declaration of an array of incomplete type elements
|
2019-06-24 16:28:36 +08:00
|
|
|
|
|
|
|
[test_const_fun_array]
|
2022-11-30 02:45:05 +08:00
|
|
|
60_errors_and_warnings.c:218: error: declaration of an array of functions
|
2019-06-24 16:28:36 +08:00
|
|
|
|
|
|
|
[test_incomplete_array_array]
|
2019-06-22 10:00:52 +08:00
|
|
|
|
|
|
|
[test_extern_array]
|
2022-11-30 02:45:05 +08:00
|
|
|
60_errors_and_warnings.c:234: error: incompatible types for redefinition of 'x'
|
2019-06-22 10:00:52 +08:00
|
|
|
|
|
|
|
[test_func_1]
|
|
|
|
hello: a = 123
|
|
|
|
|
|
|
|
[test_func_2]
|
|
|
|
hello: a = 123
|
|
|
|
|
|
|
|
[test_func_3]
|
2022-11-30 02:45:05 +08:00
|
|
|
60_errors_and_warnings.c:264: warning: static storage ignored for redefinition of 'hello'
|
2019-06-22 10:00:52 +08:00
|
|
|
hello: a = 123
|
|
|
|
|
|
|
|
[test_func_4]
|
|
|
|
hello: a = 123
|
|
|
|
|
|
|
|
[test_func_5]
|
2022-11-30 02:45:05 +08:00
|
|
|
60_errors_and_warnings.c:264: error: incompatible types for redefinition of 'hello'
|
2019-12-16 13:54:18 +08:00
|
|
|
|
|
|
|
[test_func_6]
|
2022-11-30 02:45:05 +08:00
|
|
|
60_errors_and_warnings.c:252: error: function without file scope cannot be static
|
2019-06-22 10:00:52 +08:00
|
|
|
|
|
|
|
[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]
|
2022-11-30 02:45:05 +08:00
|
|
|
60_errors_and_warnings.c:296: error: incompatible types for redefinition of 'xxx'
|
2019-07-16 23:30:04 +08:00
|
|
|
|
|
|
|
[test_var_4]
|
2020-02-23 07:11:03 +08:00
|
|
|
|
|
|
|
[test_long_double_type_for_win32]
|
2022-11-30 02:45:05 +08:00
|
|
|
60_errors_and_warnings.c:327: warning: assignment from incompatible pointer type
|
2020-06-04 00:38:11 +08:00
|
|
|
|
|
|
|
[test_stray_backslash]
|
2022-11-30 02:45:05 +08:00
|
|
|
60_errors_and_warnings.c:333: error: stray '\' in program
|
2020-05-14 05:52:48 +08:00
|
|
|
|
|
|
|
[test_stray_backslash2]
|
|
|
|
\n
|
2020-07-05 20:01:50 +08:00
|
|
|
|
|
|
|
[test_var_array]
|
2022-11-30 02:45:05 +08:00
|
|
|
60_errors_and_warnings.c:348: error: flexible array has zero size in this context
|
tccgen: flex arrays etc.
Fixes potential writes past the allocated space with mostly
illegal flex array initializers. (60_errors_and_warnings.c
:test_var_array)
In exchange suspicious precautions such as section_reserve
or checks with sec->data_allocated were removed. (There is
an hard check 'init_assert()' for now but it's meant to be
just temporary)
Also, instead of filling holes, always memset(0) structures
& arrays on stack. Sometimes more efficient, sometimes isn't.
At least we can omit putting null initializers.
About array range inititializers: Reparsing tokens has a
small problem with sideeffects, for example
int c = 0, dd[] = { [0 ... 1] = ++c, [2 ... 3] = ++c };
Also, instead of 'squeeze_multi_relocs()', delete pre-existing
relocations in advance. This works even if secondary initializers
don't even have relocations, as with
[0 ... 7] = &stuff,
[4] = NULL
Also, in tcc.h: new macro "tcc_internal_error()"
2020-09-23 18:03:59 +08:00
|
|
|
|
|
|
|
[test_var_array2]
|
2022-11-30 02:45:05 +08:00
|
|
|
60_errors_and_warnings.c:358: error: flexible array has zero size in this context
|
2020-10-24 03:38:53 +08:00
|
|
|
|
2021-02-16 06:58:18 +08:00
|
|
|
[test_var_array3]
|
2022-11-30 02:45:05 +08:00
|
|
|
60_errors_and_warnings.c:365: error: flexible array has zero size in this context
|
2021-02-16 06:58:18 +08:00
|
|
|
|
2020-10-24 03:38:53 +08:00
|
|
|
[test_default_int_type]
|
2022-11-30 02:45:05 +08:00
|
|
|
60_errors_and_warnings.c:368: warning: type defaults to int
|
2020-10-24 03:38:53 +08:00
|
|
|
|
|
|
|
[test_invalid_global_stmtexpr]
|
2022-11-30 02:45:05 +08:00
|
|
|
60_errors_and_warnings.c:372: error: statement expression outside of function
|
2020-10-24 03:38:53 +08:00
|
|
|
|
|
|
|
[test_invalid_tokckill]
|
2022-11-30 02:45:05 +08:00
|
|
|
60_errors_and_warnings.c:375: error: ';' expected (got "3")
|
2020-12-03 14:53:44 +08:00
|
|
|
|
|
|
|
[test_duplicate_member]
|
2022-11-30 02:45:05 +08:00
|
|
|
60_errors_and_warnings.c:381: error: duplicate member 'a'
|
2020-12-03 14:53:44 +08:00
|
|
|
|
|
|
|
[test_duplicate_member_anon]
|
2022-11-30 02:45:05 +08:00
|
|
|
60_errors_and_warnings.c:394: error: duplicate member 'd'
|
2021-02-14 10:37:25 +08:00
|
|
|
|
|
|
|
[test_conflicting_array_definition]
|
2022-11-30 02:45:05 +08:00
|
|
|
60_errors_and_warnings.c:399: error: incompatible types for redefinition of 'array'
|
2021-01-27 05:25:53 +08:00
|
|
|
|
2023-02-23 00:59:31 +08:00
|
|
|
[test_incompatible_local_redef]
|
|
|
|
60_errors_and_warnings.c:406: error: incompatible redefinition of 'localfunctype'
|
|
|
|
|
2021-01-27 05:25:53 +08:00
|
|
|
[test_cast_from_void]
|
2023-02-23 00:59:31 +08:00
|
|
|
60_errors_and_warnings.c:411: error: cannot convert 'void' to 'int'
|
2021-08-01 02:44:51 +08:00
|
|
|
|
|
|
|
[test_switch_W1]
|
2023-02-23 00:59:31 +08:00
|
|
|
60_errors_and_warnings.c:427: warning: implicit declaration of function 'fink'
|
2021-08-01 02:44:51 +08:00
|
|
|
|
|
|
|
[test_switch_W2]
|
2023-02-23 00:59:31 +08:00
|
|
|
60_errors_and_warnings.c:418: warning: unsupported option '-Wstuff'
|
|
|
|
60_errors_and_warnings.c:429: warning: 'stuff' attribute ignored
|
2021-08-01 02:44:51 +08:00
|
|
|
|
|
|
|
[test_switch_W3]
|
2023-02-23 00:59:31 +08:00
|
|
|
60_errors_and_warnings.c:426: error: assignment discards qualifiers from pointer target type
|
2021-08-01 02:44:51 +08:00
|
|
|
|
|
|
|
[test_switch_W4]
|
2023-02-23 00:59:31 +08:00
|
|
|
60_errors_and_warnings.c:427: warning: implicit declaration of function 'fink'
|
|
|
|
60_errors_and_warnings.c:429: error: 'stuff' attribute ignored
|
2022-03-02 05:00:42 +08:00
|
|
|
|
|
|
|
[test_invalid_funcparam_1]
|
2023-02-23 00:59:31 +08:00
|
|
|
60_errors_and_warnings.c:432: error: redeclaration of 'a'
|
2022-03-02 05:00:42 +08:00
|
|
|
|
|
|
|
[test_invalid_funcparam_2]
|
2023-02-23 00:59:31 +08:00
|
|
|
60_errors_and_warnings.c:435: error: identifier expected
|
2022-03-02 05:00:42 +08:00
|
|
|
|
|
|
|
[test_array_funcparam]
|
|
|
|
arg[0] = "X"
|
|
|
|
arg[1] = "Y"
|
|
|
|
|
|
|
|
[test_return_from_statement_expr]
|
|
|
|
[returns 78]
|
2022-05-12 17:18:37 +08:00
|
|
|
|
|
|
|
[test_illegal_unicode]
|
2023-02-23 00:59:31 +08:00
|
|
|
60_errors_and_warnings.c:459: error: 0xffffffff is not a valid universal character
|
2022-08-18 16:43:28 +08:00
|
|
|
|
|
|
|
[test_error_string]
|
2023-02-23 00:59:31 +08:00
|
|
|
60_errors_and_warnings.c:464: error: #error \123\456
|