unsigned saved_inline : 1;
unsigned use_template : 2;
- unsigned c_static : 1;
unsigned nonconverting : 1;
unsigned declared_inline : 1;
unsigned not_really_extern : 1;
- unsigned dummy : 4;
+ unsigned dummy : 5;
tree access;
tree context;
/* We know what we're doing with this decl now. */
#define DECL_INTERFACE_KNOWN(NODE) DECL_LANG_FLAG_5 (NODE)
-/* This decl was declared or deduced to have internal linkage. This is
- only meaningful if TREE_PUBLIC is set. */
-#define DECL_C_STATIC(NODE) \
- (DECL_LANG_SPECIFIC (NODE)->decl_flags.c_static)
-
/* This function was declared inline. This flag controls the linkage
semantics of 'inline'; whether or not the function is inlined is
controlled by DECL_INLINE. */
#define DECL_REALLY_EXTERN(NODE) \
(DECL_EXTERNAL (NODE) && ! DECL_NOT_REALLY_EXTERN (NODE))
-#define DECL_PUBLIC(NODE) \
- (TREE_CODE (NODE) == FUNCTION_DECL \
- ? ! DECL_C_STATIC (NODE) : TREE_PUBLIC (NODE))
-
#define THUNK_DELTA(DECL) ((DECL)->decl.frame_size.i)
/* ...and for unexpanded-parameterized-type nodes. */
/* If you declare a built-in or predefined function name as static,
the old definition is overridden, but optionally warn this was a
bad choice of name. Ditto for overloads. */
- if (! DECL_PUBLIC (newdecl)
+ if (! TREE_PUBLIC (newdecl)
|| (TREE_CODE (newdecl) == FUNCTION_DECL
&& DECL_LANGUAGE (newdecl) != DECL_LANGUAGE (olddecl)))
{
if (! DECL_EXTERNAL (olddecl))
DECL_EXTERNAL (newdecl) = 0;
- if (TREE_CODE (newdecl) == FUNCTION_DECL)
- DECL_C_STATIC (newdecl) |= DECL_C_STATIC (olddecl);
-
if (DECL_LANG_SPECIFIC (newdecl))
{
DECL_INTERFACE_KNOWN (newdecl) |= DECL_INTERFACE_KNOWN (olddecl);
/* If the first global decl has external linkage,
warn if we later see static one. */
- if (IDENTIFIER_GLOBAL_VALUE (name) == NULL_TREE && DECL_PUBLIC (x))
+ if (IDENTIFIER_GLOBAL_VALUE (name) == NULL_TREE && TREE_PUBLIC (x))
TREE_PUBLIC (name) = 1;
/* Don't install an artificial TYPE_DECL if we already have
&& current_function_decl
&& DECL_CONTEXT (decl) == current_function_decl
&& DECL_THIS_INLINE (current_function_decl)
- && DECL_PUBLIC (current_function_decl))
+ && TREE_PUBLIC (current_function_decl))
{
if (DECL_INTERFACE_KNOWN (current_function_decl))
{
decl = build_lang_decl (FUNCTION_DECL, declarator, type);
/* propagate volatile out from type to decl */
if (TYPE_VOLATILE (type))
- TREE_THIS_VOLATILE (decl) = 1;
+ TREE_THIS_VOLATILE (decl) = 1;
/* Should probably propagate const out from type to decl I bet (mrs). */
if (staticp)
if (ctype)
DECL_CLASS_CONTEXT (decl) = ctype;
- /* All function decls start out public; we'll fix their linkage later (at
- definition or EOF) if appropriate. */
- TREE_PUBLIC (decl) = 1;
-
if (ctype == NULL_TREE && ! strcmp (IDENTIFIER_POINTER (declarator), "main"))
{
if (inlinep)
publicp = 1;
}
+ TREE_PUBLIC (decl) = publicp;
if (! publicp)
- DECL_C_STATIC (decl) = 1;
+ {
+ DECL_INTERFACE_KNOWN (decl) = 1;
+ DECL_NOT_REALLY_EXTERN (decl) = 1;
+ }
if (inlinep)
DECL_THIS_INLINE (decl) = DECL_INLINE (decl) = 1;
grok_op_properties (decl, virtualp, check < 0);
if (ctype && hack_decl_function_context (decl))
- DECL_NO_STATIC_CHAIN (decl) = 1;
+ DECL_NO_STATIC_CHAIN (decl) = 1;
for (t = TYPE_ARG_TYPES (TREE_TYPE (decl)); t; t = TREE_CHAIN (t))
if (TREE_PURPOSE (t)
= (interface_only
|| (DECL_THIS_INLINE (decl1) && ! flag_implement_inlines));
else
- {
- DECL_EXTERNAL (decl1) = 0;
- if (DECL_C_STATIC (decl1))
- TREE_PUBLIC (decl1) = 0;
- }
+ DECL_EXTERNAL (decl1) = 0;
DECL_NOT_REALLY_EXTERN (decl1) = 0;
DECL_INTERFACE_KNOWN (decl1) = 1;
}
&& ! hack_decl_function_context (decl1))
DECL_DEFER_OUTPUT (decl1) = 1;
else
- {
- DECL_INTERFACE_KNOWN (decl1) = 1;
- if (DECL_C_STATIC (decl1))
- TREE_PUBLIC (decl1) = 0;
- }
+ DECL_INTERFACE_KNOWN (decl1) = 1;
}
if (ctype != NULL_TREE && DECL_STATIC_FUNCTION_P (decl1))
}
}
name_mangling_version = atoi (p + 22);
- mangling_version_lose:
+ mangling_version_lose: ;
}
else for (j = 0;
!found && j < sizeof (lang_f_options) / sizeof (lang_f_options[0]);
else
comdat_linkage (decl);
}
- else if (DECL_C_STATIC (decl))
- TREE_PUBLIC (decl) = 0;
else
comdat_linkage (decl);
walk_vtables ((void (*) PROTO((tree, tree))) 0,
prune_vtable_vardecl);
- for (vars = getdecls (); vars; vars = TREE_CHAIN (vars))
- {
- if (TREE_CODE (vars) == FUNCTION_DECL
- && ! DECL_INTERFACE_KNOWN (vars)
- && DECL_C_STATIC (vars))
- TREE_PUBLIC (vars) = 0;
- }
-
if (write_virtuals == 2)
{
/* Now complain about an virtual function tables promised