In both version 0.9.25 and today's git version (commit
d27ea5155f47cb0c29699ef959b52b087dfff41a), tcc crashes while compiling the
following one-line invalid program:
enum myenum { L = -1 } L;
tcc crashes after emitting an error message:
pascal@TrustInSoft-Box-VII:~/tcc-2019-02-07$ bin/tcc -c enum.i
enum.i:1: warning: storage mismatch for redefinition of 'L'
Erreur de segmentation
GCC and Clang also consider the program as invalid, and emit the following
messages:
pascal@TrustInSoft-Box-VII:~/tcc-2019-02-07$ clang -c enum.i
enum.i:1:24: error: redefinition of 'L' as different kind of symbol
enum myenum { L = -1 } L;
^
enum.i:1:15: note: previous definition is here
enum myenum { L = -1 } L;
^
1 error generated.
pascal@TrustInSoft-Box-VII:~/tcc-2019-02-07$ gcc -c enum.i
enum.i:1:24: error: 'L' redeclared as different kind of symbol
enum myenum { L = -1 } L;
^
enum.i:1:15: note: previous definition of 'L' was here
enum myenum { L = -1 } L;
^
_______________________________________________
Tinycc-devel mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/tinycc-devel