aboutsummaryrefslogtreecommitdiff
path: root/gcc/c-tree.h
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2010-05-23 21:47:16 +0100
committerJoseph Myers <jsm28@gcc.gnu.org>2010-05-23 21:47:16 +0100
commitdc5027f47440baef6b984b029fb5c3e5ee59e5ba (patch)
tree83fb32a9434ffd3ff6d6985dd79f64b42099c036 /gcc/c-tree.h
parent8f9e812dacef3cc9eedb9fa17111affa93454287 (diff)
downloadgcc-dc5027f47440baef6b984b029fb5c3e5ee59e5ba.zip
gcc-dc5027f47440baef6b984b029fb5c3e5ee59e5ba.tar.gz
gcc-dc5027f47440baef6b984b029fb5c3e5ee59e5ba.tar.bz2
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
Diffstat (limited to 'gcc/c-tree.h')
-rw-r--r--gcc/c-tree.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/gcc/c-tree.h b/gcc/c-tree.h
index 3090a67..1806e2c 100644
--- a/gcc/c-tree.h
+++ b/gcc/c-tree.h
@@ -506,6 +506,7 @@ extern tree c_objc_common_truthvalue_conversion (location_t, tree);
extern tree require_complete_type (tree);
extern int same_translation_unit_p (const_tree, const_tree);
extern int comptypes (tree, tree);
+extern int comptypes_check_different_types (tree, tree, bool *);
extern bool c_vla_type_p (const_tree);
extern bool c_mark_addressable (tree);
extern void c_incomplete_type_error (const_tree, const_tree);