diff options
| author | Thomas Preud'homme <robotux@celest.fr> | 2014-03-31 22:58:17 +0800 |
|---|---|---|
| committer | Thomas Preud'homme <robotux@celest.fr> | 2014-03-31 22:59:10 +0800 |
| commit | 3e56584223a67a6c2f41a43cf38e0960e9992238 (patch) | |
| tree | 6e3c4fd4ee3dce993b114170cbbcecd772336545 /tests/tests2 | |
| parent | a620b12dc18e7e40c7497dcfb976a5628c3e57f9 (diff) | |
| download | tinycc-3e56584223a67a6c2f41a43cf38e0960e9992238.tar.gz tinycc-3e56584223a67a6c2f41a43cf38e0960e9992238.tar.bz2 | |
Allow local redefinition of enumerator
Diffstat (limited to 'tests/tests2')
| -rw-r--r-- | tests/tests2/63_local_enumerator_redefinition.c | 14 | ||||
| -rw-r--r-- | tests/tests2/63_local_enumerator_redefinition.expect | 0 | ||||
| -rw-r--r-- | tests/tests2/Makefile | 3 |
3 files changed, 16 insertions, 1 deletions
diff --git a/tests/tests2/63_local_enumerator_redefinition.c b/tests/tests2/63_local_enumerator_redefinition.c new file mode 100644 index 0000000..dd4d8e0 --- /dev/null +++ b/tests/tests2/63_local_enumerator_redefinition.c @@ -0,0 +1,14 @@ +enum { + FOO, + BAR +}; + +int main(void) +{ + enum { + FOO = 2, + BAR + }; + + return BAR - FOO; +} diff --git a/tests/tests2/63_local_enumerator_redefinition.expect b/tests/tests2/63_local_enumerator_redefinition.expect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/tests/tests2/63_local_enumerator_redefinition.expect diff --git a/tests/tests2/Makefile b/tests/tests2/Makefile index fa564f9..bd6f2c1 100644 --- a/tests/tests2/Makefile +++ b/tests/tests2/Makefile @@ -74,7 +74,8 @@ TESTS = \ 59_function_array.test \ 60_enum_redefinition.test \ 61_undefined_enum.test \ - 62_enumerator_redefinition.test + 62_enumerator_redefinition.test \ + 63_local_enumerator_redefinition.test # 30_hanoi.test -- seg fault in the code, gcc as well # 34_array_assignment.test -- array assignment is not in C standard |
