diff options
author | pommicket <pommicket@gmail.com> | 2022-02-18 12:36:57 -0500 |
---|---|---|
committer | pommicket <pommicket@gmail.com> | 2022-02-18 12:36:57 -0500 |
commit | 826d1afd58c2e064a9c8fdb09eda1b08469de1a8 (patch) | |
tree | b4fedc589a1944f6cf3f451a9db976b431e89b25 /05/tcc-0.9.27/tests/tests2/60_errors_and_warnings.c | |
parent | c42c5d94b8944e19cd17a5b540e4c70013c62b92 (diff) |
newer version of tcc almost working
Diffstat (limited to '05/tcc-0.9.27/tests/tests2/60_errors_and_warnings.c')
-rw-r--r-- | 05/tcc-0.9.27/tests/tests2/60_errors_and_warnings.c | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/05/tcc-0.9.27/tests/tests2/60_errors_and_warnings.c b/05/tcc-0.9.27/tests/tests2/60_errors_and_warnings.c new file mode 100644 index 0000000..0028caf --- /dev/null +++ b/05/tcc-0.9.27/tests/tests2/60_errors_and_warnings.c @@ -0,0 +1,51 @@ +#if defined test_56_btype_excess_1 +struct A {} int i; + +#elif defined test_57_btype_excess_2 +char int i; + +#elif defined test_58_function_redefinition +int f(void) { return 0; } +int f(void) { return 1; } + +#elif defined test_global_redefinition +int xxx = 1; +int xxx; +int xxx = 2; + +#elif defined test_59_function_array +int (*fct)[42](int x); + +#elif defined test_60_enum_redefinition +enum color { RED, GREEN, BLUE }; +enum color { R, G, B }; +enum color c; + +#elif defined test_62_enumerator_redefinition +enum color { RED, GREEN, BLUE }; +enum rgb { RED, G, B}; +enum color c = RED; + +#elif defined test_63_local_enumerator_redefinition +enum { + FOO, + BAR +}; + +int main(void) +{ + enum { + FOO = 2, + BAR + }; + + return BAR - FOO; +} + +#elif defined test_61_undefined_enum +enum rgb3 c = 42; + +#elif defined test_74_non_const_init +int i = i++; + +#endif |