ref: ebf26dca8688449f074f5304c71c1b28fa977388
parent: ca9626acadaf49449d51f8743f115ad6737691c8
author: Roberto E. Vargas Caballero <k0ga@shike2.com>
date: Wed Feb 28 07:30:30 EST 2018
[cc1] Don't allow redifinition of typedef Redifinition of typedef is a new feature added in C11, and since scc is a c99 compiler it must be an error.
--- a/cc1/decl.c
+++ b/cc1/decl.c
@@ -203,6 +203,8 @@
name);
break;
case TYPEDEF:
+ /* Only C11 allows multiple definitions of a typedef. */
+ goto redeclaration;
case EXTERN:
break;
case STATIC: