* cp-tree.h (DECL_NEEDED_P): Tweak to match documentation.
authorMark Mitchell <mark@codesourcery.com>
Tue, 23 Nov 1999 08:08:53 +0000 (08:08 +0000)
committerMark Mitchell <mmitchel@gcc.gnu.org>
Tue, 23 Nov 1999 08:08:53 +0000 (08:08 +0000)
From-SVN: r30635

gcc/cp/ChangeLog
gcc/cp/cp-tree.h

index b5fdd4cc68c887e52fe4b7da10a2b585ec6447bb..6c213df420b404dae5edf18c3ea89636e4d91701 100644 (file)
@@ -1,7 +1,11 @@
+1999-11-23  Mark Mitchell  <mark@codesourcery.com>
+
+       * cp-tree.h (DECL_NEEDED_P): Tweak to match documentation.
+
 1999-11-22  Mark Mitchell  <mark@codesourcery.com>
 
        * cp-tree.def (CTOR_COMPLETE): New tree node.
-       (finish_constructor_body): Add it, to mark the end of the
+       * decl.c (finish_constructor_body): Add it, to mark the end of the
        constructor.
        (finish_function): Don't call end_protect_partials here.
        * ir.texi (CTOR_COMPLETE): Document it.
index 44d16c6b1a1846b5b4380b8a3adcac1dc2a32068..a83744e28766a049d2948e15d67603159eb411be 100644 (file)
@@ -2634,8 +2634,9 @@ extern int flag_new_for_scope;
    the symbol has been referenced in the generated code.  If, however,
    we are not generating code, then it is also true when a symbol has
    just been used somewhere, even if it's not really needed.  */
-#define DECL_NEEDED_P(DECL)                              \
-  (TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME ((DECL)))) \
+#define DECL_NEEDED_P(DECL)                                    \
+  ((TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME ((DECL))))     \
+   || (flag_syntax_only && TREE_USED ((DECL))))
 
 /* An un-parsed default argument looks like an identifier.  */
 #define DEFARG_LENGTH(NODE)  (DEFAULT_ARG_CHECK(NODE)->identifier.length)