this is allowed in C11 and 3rd-party software is relying upon this to be
accepted by the compiler.
Nevertheless warn about this if -pedantic.
ok ajacoutot@ deraadt@ millert@
if (DECL_IN_SYSTEM_HEADER (newdecl) || DECL_IN_SYSTEM_HEADER (olddecl))
return true; /* Allow OLDDECL to continue in use. */
- error ("redefinition of typedef %q+D", newdecl);
- locate_old_decl (olddecl, error);
- return false;
+ if (pedantic)
+ {
+ pedwarn ("redefinition of typedef %q+D", newdecl);
+ if (flag_pedantic_errors)
+ {
+ locate_old_decl (olddecl, error);
+ return false;
+ }
+ }
+
+ return true;
}
/* Function declarations can either be 'static' or 'extern' (no