c-decl.c (diagnose_mismatched_decls): Give error for duplicate typedefs with…
c-decl.c (diagnose_mismatched_decls): Give error for duplicate typedefs with different but compatible types. * c-decl.c (diagnose_mismatched_decls): Give error for duplicate typedefs with different but compatible types. Allow duplicate typedefs with the same type except for pedantic non-C1X, but give warning for variably modified types. * c-typeck.c (tagged_types_tu_compatible_p, function_types_compatible_p, type_lists_compatible_p, comptypes_internal): Add parameter different_types_p; set *different_types_p for different but compatible types. All callers changed. (comptypes_check_different_types): New. * c-tree.h (comptypes_check_different_types): Declare. testsuite: * gcc.dg/c1x-typedef-1.c, gcc.dg/c1x-typedef-2.c, gcc.dg/c90-typedef-1.c, gcc.dg/c99-typedef-1.c: New tests. * gcc.dg/decl-8.c: Use -std=gnu89 -pedantic-errors. From-SVN: r159767
Showing
This diff is collapsed.
Click to expand it.
gcc/testsuite/gcc.dg/c1x-typedef-1.c
0 → 100644
gcc/testsuite/gcc.dg/c1x-typedef-2.c
0 → 100644
gcc/testsuite/gcc.dg/c90-typedef-1.c
0 → 100644
gcc/testsuite/gcc.dg/c99-typedef-1.c
0 → 100644
Please
register
or
sign in
to comment