+2004-09-29 Joseph S. Myers <jsm@polyomino.org.uk>
+
+ PR c/7425
+ * c-decl.c (merge_decls): Merge TREE_DEPRECATED.
+
2004-09-29 Eric Christopher <echristo@redhat.com>
* fold-const.c (tree_swap_operands_p): Remove duplicated code.
make_var_volatile (newdecl);
}
+ /* Merge deprecatedness. */
+ if (TREE_DEPRECATED (newdecl))
+ TREE_DEPRECATED (olddecl) = 1;
+
/* Keep source location of definition rather than declaration. */
if (DECL_INITIAL (newdecl) == 0 && DECL_INITIAL (olddecl) != 0)
DECL_SOURCE_LOCATION (newdecl) = DECL_SOURCE_LOCATION (olddecl);
+2004-09-29 Joseph S. Myers <jsm@polyomino.org.uk>
+
+ * decl.c (duplicate_decls): Merge TREE_DEPRECATED.
+
2004-09-29 Jason Merrill <jason@redhat.com>
PR tree-optimization/17697
if (TREE_NOTHROW (newdecl))
TREE_NOTHROW (olddecl) = 1;
+ /* Merge deprecatedness. */
+ if (TREE_DEPRECATED (newdecl))
+ TREE_DEPRECATED (olddecl) = 1;
+
/* Merge the initialization information. */
if (DECL_INITIAL (newdecl) == NULL_TREE
&& DECL_INITIAL (olddecl) != NULL_TREE)
+2004-09-29 Joseph S. Myers <jsm@polyomino.org.uk>
+
+ PR c/7425
+ * gcc.dg/deprecated-3.c, g++.dg/warn/deprecated-2.C: New tests.
+
2004-09-29 Jakub Jelinek <jakub@redhat.com>
* gcc.c-torture/execute/stdarg-1.c: New test.
--- /dev/null
+/* Test __attribute__((deprecated)). Test merging with multiple
+ declarations. Bug 7425 (C++ version). */
+/* { dg-do compile } */
+/* { dg-options "" } */
+
+void func(void);
+void func(void) __attribute__((deprecated));
+
+void f(void) {
+ func(); /* { dg-warning "'func' is deprecated" } */
+}
--- /dev/null
+/* Test __attribute__((deprecated)). Test merging with multiple
+ declarations. Bug 7425. */
+/* { dg-do compile } */
+/* { dg-options "" } */
+
+void func(void);
+void func(void) __attribute__((deprecated));
+
+void f(void) {
+ func(); /* { dg-warning "'func' is deprecated" } */
+}