+2019-09-20 Eric Botcazou <ebotcazou@adacore.com>
+
+ PR c/91815
+ * c-decl.c (pushdecl): In C detect duplicate declarations across scopes
+ of identifiers in the external scope only for variables and functions.
+
2019-09-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
PR c/78736
detecting duplicate declarations of the same object, no matter
what scope they are in; this is what we do here. (C99 6.2.7p2:
All declarations that refer to the same object or function shall
- have compatible type; otherwise, the behavior is undefined.) */
- if (DECL_EXTERNAL (x) || scope == file_scope)
+ have compatible type; otherwise, the behavior is undefined.)
+ However, in Objective-C, we also want to detect declarations
+ conflicting with those of the basic types. */
+ if ((DECL_EXTERNAL (x) || scope == file_scope)
+ && (VAR_OR_FUNCTION_DECL_P (x) || c_dialect_objc ()))
{
tree type = TREE_TYPE (x);
tree vistype = NULL_TREE;
+2019-09-20 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gcc.dg/typedef-var-1.c: New test.
+ * gcc.dg/typedef-var-2.c: Likewise.
+
2019-09-20 Martin Jambor <mjambor@suse.cz>
* g++.dg/ipa/pr81248.C: Adjust dg-options and dump-scan.