diff options
| author | Thomas Preud'homme <robotux@celest.fr> | 2013-09-20 01:06:43 +0200 |
|---|---|---|
| committer | Thomas Preud'homme <robotux@celest.fr> | 2013-09-20 01:06:43 +0200 |
| commit | 0f522fb32a635dafce30f3ce3ff2cb15bcec809e (patch) | |
| tree | a37a75b9ad0716b0dda99360f3ea33831868c12b | |
| parent | a465b7f58fdea15caa1bfb81ff5e985c94c4df4a (diff) | |
| download | tinycc-0f522fb32a635dafce30f3ce3ff2cb15bcec809e.tar.gz tinycc-0f522fb32a635dafce30f3ce3ff2cb15bcec809e.tar.bz2 | |
Forbid enum redefinition.
Prevent the following code from compiling:
enum color {RED, GREEN, BLUE};
enum color {R, G, B};
int main()
{
return R;
}
Reported-by: John Haque <j.eh@mchsi.com>
| -rw-r--r-- | tccgen.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -2801,6 +2801,7 @@ static void struct_decl(CType *type, int u) if (tok == '}') break; } + s->c = type_size(&int_type, &align); skip('}'); } else { maxalign = 1; |
