summaryrefslogtreecommitdiffstats
path: root/gcc/cpphash.c
diff options
context:
space:
mode:
authorneil <neil@138bc75d-0d04-0410-961f-82ee72b054a4>2001-11-15 10:01:10 +0000
committerneil <neil@138bc75d-0d04-0410-961f-82ee72b054a4>2001-11-15 10:01:10 +0000
commit9ceb1c2907775b4c7ec85297d865873057c95a76 (patch)
treecac90266aeb52525edc15fddc73e9428ce8a8556 /gcc/cpphash.c
parent3e6f9f2db90fbb87b3a62e08ec2682c7591588c2 (diff)
downloadppe42-gcc-9ceb1c2907775b4c7ec85297d865873057c95a76.tar.gz
ppe42-gcc-9ceb1c2907775b4c7ec85297d865873057c95a76.zip
* c-common.c: Include c-lex.h.
(c_common_lang_init): Change prototype. Call init_c_lex and init_pragma from here. * c-common.h (c_common_lang_init): Change prototype. * c-decl.c (init_decl_processing): Rename. Call c_parse_init. * c-lang.c (c_init): Change prototype. Update. (c_init_options): Update. * c-lex.c (cpp_filename): Remove. (init_c_lex): Update. Read the main file, and get the original file name. (yyparse): Finish the command line options. * c-parse.in (c_parse_init): Call init_reswords here. (init_parse): Remove. * c-tree.h (c_init_decl_processing): New. * cpphash.c (_cpp_init_hashtable): After initializing the hash table, populate it. * cppinit.c (read_original_filename, cpp_finish_options): New. (cpp_create_reader): New prototype. Defer hash table initialization. (cpp_start_read): Rename cpp_read_main_file. Initialize the hash table. Get the original filename. * cpplib.h (cpp_create_reader): Update. (cpp_start_read): Remove. (cpp_read_main_file, cpp_finish_options): New. * cppmain.c (main, do_preprocessing): Update. * langhooks.h (struct langhooks): Update init prototype. * toplev.c (general_init, parse_options_and_default_flags, process_options, lang_indpendent_init, lang_dependent_init, init_asm_output): New; perform the bulk of initialization. (compile_file): Move most of initialization to above functions. (debug_hooks): Initialize statically. (set_Wunused): Relocate. (toplev_main): Move most of initialization to other init functions. Have a clear logic flow. * tree.h (init_parse, init_decl_processing): Remove. ada: * misc.c (gnat_init): Change prototype. Include the functionality of the old init_parse and init_decl_processing. (gnat_init_decl_processing): New prototype. (init_parse): Remove. * utils.c (init_decl_processing): Rename gnat_init_decl_processing. cp: * cp-tree.h (init_reswords, cxx_init_decl_processing): New. (cxx_init): Update prototype. * decl.c (init_decl_processing): Rename. Move null node init to its creation time. * lex.c (cxx_init_options): Update. (cxx_init): Combine with old init_parse; also call cxx_init_decl_processing. f: * com.c (ffecom_init_decl_processing): Renamed from init_decl_processing. (init_parse): Move contents to ffe_init. (ffe_init): Update prototype. java: * decl.c (init_decl_processing): Rename java_init_decl_processing. * java-tree.h: New prototype. * lang.c (java_init): Update prototype. Combine with old init_parse. objc: * objc-act.c (objc_init): Update prototype, combine with old init_parse. (objc_init_options): Update. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@47046 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cpphash.c')
-rw-r--r--gcc/cpphash.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/gcc/cpphash.c b/gcc/cpphash.c
index def51715f43..1bb127508e1 100644
--- a/gcc/cpphash.c
+++ b/gcc/cpphash.c
@@ -53,6 +53,8 @@ _cpp_init_hashtable (pfile, table)
cpp_reader *pfile;
hash_table *table;
{
+ struct spec_nodes *s;
+
if (table == NULL)
{
pfile->our_hashtable = 1;
@@ -63,6 +65,20 @@ _cpp_init_hashtable (pfile, table)
table->pfile = pfile;
pfile->hash_table = table;
+
+ /* Now we can initialize things that use the hash table. */
+ _cpp_init_directives (pfile);
+ _cpp_init_internal_pragmas (pfile);
+
+ s = &pfile->spec_nodes;
+ s->n_L = cpp_lookup (pfile, DSC("L"));
+ s->n_defined = cpp_lookup (pfile, DSC("defined"));
+ s->n_true = cpp_lookup (pfile, DSC("true"));
+ s->n_false = cpp_lookup (pfile, DSC("false"));
+ s->n__STRICT_ANSI__ = cpp_lookup (pfile, DSC("__STRICT_ANSI__"));
+ s->n__CHAR_UNSIGNED__ = cpp_lookup (pfile, DSC("__CHAR_UNSIGNED__"));
+ s->n__VA_ARGS__ = cpp_lookup (pfile, DSC("__VA_ARGS__"));
+ s->n__VA_ARGS__->flags |= NODE_DIAGNOSTIC;
}
/* Tear down the identifier hash table. */
OpenPOWER on IntegriCloud