Commit 9aaabf8a by Zack Weinberg

c-decl.c (struct c_binding): Remove contour field; add depth, invisible, nested fields.

	* c-decl.c (struct c_binding): Remove contour field; add
	depth, invisible, nested fields.
	(B_IN_SCOPE, B_IN_CURRENT_SCOPE, B_IN_FILE_SCOPE)
	(B_IN_EXTERNAL_SCOPE): New convenience macros.
	(bind): Add invisible and nested arguments. Initialize
	new fields of struct c_binding; adjust loop scanning for
	insertion point.
	(free_binding_and_advance): Clear structure with memset.
	(pop_scope): Adjust to match.  Set DECL_CONTEXT on everything
	in file scope, even if it's in external scope too.
	(pushdecl): Adjust to match.  Create invisible file-scope
	declarations for block-scope forward declarations of static functions.
	(pushtag, warn_if_shadowing, pushdecl_top_level, implicitly_declare)
	(undeclared_variable, lookup_label, declare_label, define_label)
	(lookup_tag, lookup_name, lookup_name_in_scope, builtin_function)
	(c_make_fname_decl, store_parm_decls_newstyle, identifier_global_value)
	(store_parm_decls_oldstyle): Adjust to match.
	(diagnose_mismatched_decls): Correct handling of linkage clashes.
	(merge_decls): No need to copy C_DECL_IN_EXTERNAL_SCOPE.

	* c-tree.h (C_DECL_IN_EXTERNAL_SCOPE): Delete.
	(C_DECL_DECLARED_BUILTIN, C_DECL_REGISTER): Slide down one.

From-SVN: r84046
parent ece95d90
2004-07-02 Zack Weinberg <zack@codesourcery.com>
* c-decl.c (struct c_binding): Remove contour field; add
depth, invisible, nested fields.
(B_IN_SCOPE, B_IN_CURRENT_SCOPE, B_IN_FILE_SCOPE)
(B_IN_EXTERNAL_SCOPE): New convenience macros.
(bind): Add invisible and nested arguments. Initialize
new fields of struct c_binding; adjust loop scanning for
insertion point.
(free_binding_and_advance): Clear structure with memset.
(pop_scope): Adjust to match. Set DECL_CONTEXT on everything
in file scope, even if it's in external scope too.
(pushdecl): Adjust to match. Create invisible file-scope
declarations for block-scope forward declarations of static functions.
(pushtag, warn_if_shadowing, pushdecl_top_level, implicitly_declare)
(undeclared_variable, lookup_label, declare_label, define_label)
(lookup_tag, lookup_name, lookup_name_in_scope, builtin_function)
(c_make_fname_decl, store_parm_decls_newstyle, identifier_global_value)
(store_parm_decls_oldstyle): Adjust to match.
(diagnose_mismatched_decls): Correct handling of linkage clashes.
(merge_decls): No need to copy C_DECL_IN_EXTERNAL_SCOPE.
* c-tree.h (C_DECL_IN_EXTERNAL_SCOPE): Delete.
(C_DECL_DECLARED_BUILTIN, C_DECL_REGISTER): Slide down one.
2004-07-02 Richard Henderson <rth@redhat.com> 2004-07-02 Richard Henderson <rth@redhat.com>
* c-decl.c (grokdeclarator): Don't frob current_function_decl * c-decl.c (grokdeclarator): Don't frob current_function_decl
......
...@@ -94,18 +94,14 @@ struct lang_type GTY(()) ...@@ -94,18 +94,14 @@ struct lang_type GTY(())
/* For a FUNCTION_DECL, nonzero if it was an implicit declaration. */ /* For a FUNCTION_DECL, nonzero if it was an implicit declaration. */
#define C_DECL_IMPLICIT(EXP) DECL_LANG_FLAG_2 (EXP) #define C_DECL_IMPLICIT(EXP) DECL_LANG_FLAG_2 (EXP)
/* For any decl, nonzero if it is bound in the externals scope and
pop_scope mustn't chain it into any higher block. */
#define C_DECL_IN_EXTERNAL_SCOPE(EXP) DECL_LANG_FLAG_3 (EXP)
/* For FUNCTION_DECLs, evaluates true if the decl is built-in but has /* For FUNCTION_DECLs, evaluates true if the decl is built-in but has
been declared. */ been declared. */
#define C_DECL_DECLARED_BUILTIN(EXP) DECL_LANG_FLAG_4 (EXP) #define C_DECL_DECLARED_BUILTIN(EXP) DECL_LANG_FLAG_3 (EXP)
/* Record whether a decl was declared register. This is strictly a /* Record whether a decl was declared register. This is strictly a
front-end flag, whereas DECL_REGISTER is used for code generation; front-end flag, whereas DECL_REGISTER is used for code generation;
they may differ for structures with volatile fields. */ they may differ for structures with volatile fields. */
#define C_DECL_REGISTER(EXP) DECL_LANG_FLAG_5 (EXP) #define C_DECL_REGISTER(EXP) DECL_LANG_FLAG_4 (EXP)
/* Nonzero for a decl which either doesn't exist or isn't a prototype. /* Nonzero for a decl which either doesn't exist or isn't a prototype.
N.B. Could be simplified if all built-in decls had complete prototypes N.B. Could be simplified if all built-in decls had complete prototypes
......
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