diff options
author | Zack Weinberg <zack@gcc.gnu.org> | 2004-07-08 19:49:08 +0000 |
---|---|---|
committer | Zack Weinberg <zack@gcc.gnu.org> | 2004-07-08 19:49:08 +0000 |
commit | 5b02f0e0046d946792d7e05b569cb6d2c54442ee (patch) | |
tree | 4da42eccc0c6c979a20a5bd52c246aa67107bf03 /gcc/tree.c | |
parent | 95bcca470502e25b79b4b7820732d706bc7317aa (diff) | |
download | gcc-5b02f0e0046d946792d7e05b569cb6d2c54442ee.zip gcc-5b02f0e0046d946792d7e05b569cb6d2c54442ee.tar.gz gcc-5b02f0e0046d946792d7e05b569cb6d2c54442ee.tar.bz2 |
c-decl.c (pop_scope): Do not set DECL_CONTEXT on file-scope decls when...
* c-decl.c (pop_scope): Do not set DECL_CONTEXT on file-scope
decls when there is only one input translation unit.
* langhooks.c (lhd_set_decl_assembler_name): Partially revert
change of 2004-07-05; do not treat declarations with
DECL_CONTEXT a TRANSLATION_UNIT_DECL specially.
* opts.c (cur_in_fname): Delete.
* opts.h: Likewise.
* tree.c: Revert changes of 2004-07-05; no special treatment
for TRANSLATION_UNIT_DECLs.
* Makefile.in (tree.o): Update dependencies.
From-SVN: r84306
Diffstat (limited to 'gcc/tree.c')
-rw-r--r-- | gcc/tree.c | 16 |
1 files changed, 2 insertions, 14 deletions
@@ -48,7 +48,6 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA #include "tree-iterator.h" #include "basic-block.h" #include "tree-flow.h" -#include "opts.h" /* obstack.[ch] explicitly declined to prototype this. */ extern int _obstack_allocated_p (struct obstack *h, void *obj); @@ -310,10 +309,7 @@ make_node_stat (enum tree_code code MEM_STAT_DECL) DECL_USER_ALIGN (t) = 0; DECL_IN_SYSTEM_HEADER (t) = in_system_header; DECL_SOURCE_LOCATION (t) = input_location; - if (code == TRANSLATION_UNIT_DECL) - DECL_UID (t) = cur_in_fname; - else - DECL_UID (t) = next_decl_uid++; + DECL_UID (t) = next_decl_uid++; /* We have not yet computed the alias set for this declaration. */ DECL_POINTER_ALIAS_SET (t) = -1; @@ -386,7 +382,7 @@ copy_node_stat (tree node MEM_STAT_DECL) TREE_VISITED (t) = 0; t->common.ann = 0; - if (TREE_CODE_CLASS (code) == 'd' && code != TRANSLATION_UNIT_DECL) + if (TREE_CODE_CLASS (code) == 'd') DECL_UID (t) = next_decl_uid++; else if (TREE_CODE_CLASS (code) == 't') { @@ -5363,14 +5359,6 @@ make_or_reuse_type (unsigned size, int unsignedp) void build_common_tree_nodes (int signed_char) { - /* This function is called after command line parsing is complete, - but before any DECL nodes should have been created. Therefore, - now is the appropriate time to adjust next_decl_uid so that the - range 0 .. num_in_fnames-1 is reserved for TRANSLATION_UNIT_DECLs. */ - if (next_decl_uid) - abort (); - next_decl_uid = num_in_fnames; - error_mark_node = make_node (ERROR_MARK); TREE_TYPE (error_mark_node) = error_mark_node; |