Commit 97ba1e3c by Mark Mitchell Committed by Mark Mitchell

cp-tree.h (DECL_ANTICIPATED): Don't require a FUNCTION_DECL.

	* cp-tree.h (DECL_ANTICIPATED): Don't require a FUNCTION_DECL.
	* decl.c (select_decl): Don't return declarations that are
	DECL_ANTICIPATED.

From-SVN: r36953
parent 3cf37281
2000-10-19 Mark Mitchell <mark@codesourcery.com>
* cp-tree.h (DECL_ANTICIPATED): Don't require a FUNCTION_DECL.
* decl.c (select_decl): Don't return declarations that are
DECL_ANTICIPATED.
2000-10-18 Mark Mitchell <mark@codesourcery.com> 2000-10-18 Mark Mitchell <mark@codesourcery.com>
* cp-tree.h (cp_tree_index): Add CPTI_FAKE_STD. * cp-tree.h (cp_tree_index): Add CPTI_FAKE_STD.
......
...@@ -2481,7 +2481,7 @@ extern int flag_new_for_scope; ...@@ -2481,7 +2481,7 @@ extern int flag_new_for_scope;
/* Nonzero if NODE is a FUNCTION_DECL for a built-in function, and we have /* Nonzero if NODE is a FUNCTION_DECL for a built-in function, and we have
not yet seen a prototype for that function. */ not yet seen a prototype for that function. */
#define DECL_ANTICIPATED(NODE) \ #define DECL_ANTICIPATED(NODE) \
(DECL_LANG_SPECIFIC (FUNCTION_DECL_CHECK (NODE))->decl_flags.anticipated_p) (DECL_LANG_SPECIFIC (DECL_CHECK (NODE))->decl_flags.anticipated_p)
/* Record whether a typedef for type `int' was actually `signed int'. */ /* Record whether a typedef for type `int' was actually `signed int'. */
#define C_TYPEDEF_EXPLICITLY_SIGNED(exp) DECL_LANG_FLAG_1 ((exp)) #define C_TYPEDEF_EXPLICITLY_SIGNED(exp) DECL_LANG_FLAG_1 ((exp))
......
...@@ -5693,6 +5693,15 @@ select_decl (binding, flags) ...@@ -5693,6 +5693,15 @@ select_decl (binding, flags)
{ {
tree val; tree val;
val = BINDING_VALUE (binding); val = BINDING_VALUE (binding);
/* When we implicitly declare some builtin entity, we mark it
DECL_ANTICIPATED, so that we know to ignore it until it is
really declared. */
if (val && DECL_P (val)
&& DECL_LANG_SPECIFIC (val)
&& DECL_ANTICIPATED (val))
return NULL_TREE;
if (LOOKUP_NAMESPACES_ONLY (flags)) if (LOOKUP_NAMESPACES_ONLY (flags))
{ {
/* We are not interested in types. */ /* We are not interested in types. */
......
// Build don't link:
// Special g++ Options: -fhonor-std
// Origin: Mark Mitchell <mark@codesourcery.com>
extern "C" int memcmp (const void * __s1,
const void * __s2,
__SIZE_TYPE__ __n) throw ();
namespace std {
void f () {
memcmp (0, 0, 0);
}
};
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment