* typeck.c (mark_addressable): Never set TREE_USED.
* call.c (build_call): Don't abort on calls to library functions
that have been declared normally.
* typeck.c (build_binary_op): Fix grammar in warning.
* exception.cc (__eh_free): Fix prototype.
* decl2.c (finish_decl_parsing): Handle TEMPLATE_ID_EXPR.
* decl.c (pushdecl): Handle seeing an OVERLOAD in
IDENTIFIER_NAMESPACE_VALUE.
From-SVN: r35104
+2000-07-17 Jason Merrill <jason@redhat.com>
+
+ * typeck.c (mark_addressable): Never set TREE_USED.
+ * call.c (build_call): Don't abort on calls to library functions
+ that have been declared normally.
+
+ * typeck.c (build_binary_op): Fix grammar in warning.
+
+ * exception.cc (__eh_free): Fix prototype.
+
+ * decl2.c (finish_decl_parsing): Handle TEMPLATE_ID_EXPR.
+
+ * decl.c (pushdecl): Handle seeing an OVERLOAD in
+ IDENTIFIER_NAMESPACE_VALUE.
+
2000-07-14 Zack Weinberg <zack@wolery.cumb.org>
* .cvsignore: parse.h and parse.c have no cp- prefix.
if (decl && ! TREE_USED (decl))
{
- /* We invoke build_call directly for several library functions. */
- if (DECL_ARTIFICIAL (decl))
+ /* We invoke build_call directly for several library functions.
+ These may have been declared normally if we're building libgcc,
+ so we can't just check DECL_ARTIFICIAL. */
+ if (DECL_ARTIFICIAL (decl)
+ || !strncmp (IDENTIFIER_POINTER (DECL_NAME (decl)), "__", 2))
mark_used (decl);
else
my_friendly_abort (990125);
{
tree decl;
- if (IDENTIFIER_NAMESPACE_VALUE (name) != NULL_TREE
- && IDENTIFIER_NAMESPACE_VALUE (name) != error_mark_node
- && (DECL_EXTERNAL (IDENTIFIER_NAMESPACE_VALUE (name))
- || TREE_PUBLIC (IDENTIFIER_NAMESPACE_VALUE (name))))
- decl = IDENTIFIER_NAMESPACE_VALUE (name);
- else
- decl = NULL_TREE;
+ decl = IDENTIFIER_NAMESPACE_VALUE (name);
+ if (decl && TREE_CODE (decl) == OVERLOAD)
+ decl = OVL_FUNCTION (decl);
- if (decl
+ if (decl && decl != error_mark_node
+ && (DECL_EXTERNAL (decl) || TREE_PUBLIC (decl))
/* If different sort of thing, we already gave an error. */
&& TREE_CODE (decl) == TREE_CODE (x)
&& !same_type_p (TREE_TYPE (x), TREE_TYPE (decl)))
/* For attribute handling. */
TREE_VALUE (decl) = finish_decl_parsing (TREE_VALUE (decl));
return decl;
+ case TEMPLATE_ID_EXPR:
+ return decl;
default:
my_friendly_abort (5);
return NULL_TREE;
/* Exception allocate and free, defined in libgcc2. */
extern "C" void *__eh_alloc(size_t);
-extern "C" void __eh_free();
+extern "C" void __eh_free(void *);
/* Is P the type_info node for a pointer of some kind? */
signed_type (result_type)))))
/* OK */;
else
- warning ("comparison between a signed and an unsigned integer expressions");
+ warning ("comparison between signed and unsigned integer expressions");
/* Warn if two unsigned values are being compared in a size
larger than their original size, and one (and only one) is the
cp_warning ("address requested for `%D', which is declared `register'",
x);
TREE_ADDRESSABLE (x) = 1;
- TREE_USED (x) = 1;
if (cfun && expanding_p)
put_var_into_stack (x);
return 1;
case FUNCTION_DECL:
- /* We have to test both conditions here. The first may be
- non-zero in the case of processing a default function. The
- second may be non-zero in the case of a template function. */
- if (DECL_LANG_SPECIFIC (x)
- && DECL_TEMPLATE_INFO (x)
- && !DECL_TEMPLATE_SPECIALIZATION (x))
- mark_used (x);
TREE_ADDRESSABLE (x) = 1;
- TREE_USED (x) = 1;
TREE_ADDRESSABLE (DECL_ASSEMBLER_NAME (x)) = 1;
return 1;