diff options
Diffstat (limited to 'gcc/c-decl.c')
-rw-r--r-- | gcc/c-decl.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/c-decl.c b/gcc/c-decl.c index 0f190e12be8..89430cbf3e1 100644 --- a/gcc/c-decl.c +++ b/gcc/c-decl.c @@ -1258,7 +1258,10 @@ diagnose_mismatched_decls (tree newdecl, tree olddecl, header. (Conflicting redeclarations were handled above.) */ if (TREE_CODE (newdecl) == TYPE_DECL) { - if (DECL_IN_SYSTEM_HEADER (newdecl) || DECL_IN_SYSTEM_HEADER (olddecl)) + if (DECL_IN_SYSTEM_HEADER (newdecl) + || DECL_IN_SYSTEM_HEADER (olddecl) + || TREE_NO_WARNING (newdecl) + || TREE_NO_WARNING (olddecl)) return true; /* Allow OLDDECL to continue in use. */ error ("redefinition of typedef %q+D", newdecl); |