diff options
author | Neil Booth <neil@daikokuya.co.uk> | 2003-06-14 12:26:36 +0000 |
---|---|---|
committer | Neil Booth <neil@gcc.gnu.org> | 2003-06-14 12:26:36 +0000 |
commit | d7b426187568d50a4ed8a14d319970f8d2c34eb2 (patch) | |
tree | c305de4bdbbe6e6f7807a99ebcbbb965f0549ad6 /gcc/treelang | |
parent | 81d2d258f5b5578131c9add593df10bd4758f219 (diff) | |
download | gcc-d7b426187568d50a4ed8a14d319970f8d2c34eb2.zip gcc-d7b426187568d50a4ed8a14d319970f8d2c34eb2.tar.gz gcc-d7b426187568d50a4ed8a14d319970f8d2c34eb2.tar.bz2 |
Makefile.in: Update to use common.opt and lang_opt_files.
* Makefile.in: Update to use common.opt and lang_opt_files.
(c-options.c, c-options.h): Remove.
(options.c, options.h): Add.
* c-opts.c: Include options.h not c-options.h.
* common.opt: New file.
* configure, configure.in: Add lang_opt_files.
* opts.c: Include flags.h and diagnostic.h.
(common_handle_option): New.
(handle_option): Update to recognize common options and all
language-dependent options.
* opts.h (CL_F77, CL_JAVA, CL_ADA, CL_COMMON, CL_TREELANG): New.
(struct cl_option): Make flags of type int.
* opts.h: Flag option with front ends to which it applies.
Handle duplicate options.
* toplev.c (filename): Remove.
(independent_decode_option): Don't handle filenames and -quiet.
(process_options, do_compile): Update.
ada:
* Make-lang.in: Update to use options.c and options.h.
* misc.c: Include options.h not aoptions.h.
(gnat_handle_option): Abort on unrecognized switch.
(gnat_init_options): Request Ada switches.
cp:
* Make-lang.in: Remove c-options.o.
f:
* Make-lang.in: Update to use options.c and options.h.
* top.c: Include options.h not f-options.h.
(gnat_handle_option): Abort on unrecognized switch.
(ffe_init_options): From com.c. Request F77 options.
(ffe_handle_options): Abort on unrecognized switch.
* com.c (ffe_init_options): Move to top.c.
* top.h (fee_init_options): New.
java:
* Make-lang.in: Update to use options.c and options.h.
* lang.c: Include options.h not j-options.h.
(java_handle_option): Abort on unrecognized option.
(java_init_options): Request Java switches.
treelang:
* Make-lang.in: Update to use options.c and options.h.
* tree1.c: Include options.h not t-options.h.
(treelang_init_options): New.
(treelang_handle_option): Abort on unrecognized switch.
* treetree.c (LANG_HOOKS_INIT_OPTIONS): Override.
* treetree.h (treelang_init_options): New.
From-SVN: r67941
Diffstat (limited to 'gcc/treelang')
-rw-r--r-- | gcc/treelang/ChangeLog | 9 | ||||
-rw-r--r-- | gcc/treelang/Make-lang.in | 13 | ||||
-rw-r--r-- | gcc/treelang/tree1.c | 11 | ||||
-rw-r--r-- | gcc/treelang/treetree.c | 2 | ||||
-rw-r--r-- | gcc/treelang/treetree.h | 1 |
5 files changed, 24 insertions, 12 deletions
diff --git a/gcc/treelang/ChangeLog b/gcc/treelang/ChangeLog index 933d8fb..710f468 100644 --- a/gcc/treelang/ChangeLog +++ b/gcc/treelang/ChangeLog @@ -1,3 +1,12 @@ +2003-06-14 Neil Booth <neil@daikokuya.co.uk> + + * Make-lang.in: Update to use options.c and options.h. + * tree1.c: Include options.h not t-options.h. + (treelang_init_options): New. + (treelang_handle_option): Abort on unrecognized switch. + * treetree.c (LANG_HOOKS_INIT_OPTIONS): Override. + * treetree.h (treelang_init_options): New. + 2003-06-12 Andreas Jaeger <aj@suse.de> * treetree.c: Remove cl_options-count and cl_options. diff --git a/gcc/treelang/Make-lang.in b/gcc/treelang/Make-lang.in index d5e96af..52106a4 100644 --- a/gcc/treelang/Make-lang.in +++ b/gcc/treelang/Make-lang.in @@ -85,11 +85,11 @@ treelang.done: tree1$(exeext) # core compiler tree1$(exeext): treelang/tree1.o treelang/treetree.o treelang/lex.o treelang/parse.o\ $(TREE_BE_LIBS) c-convert.o c-typeck.o c-common.o c-cppbuiltin.o \ - c-decl.o attribs.o treelang/t-options.o + c-decl.o attribs.o $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ \ treelang/tree1.o treelang/treetree.o treelang/lex.o treelang/parse.o \ c-convert.o c-typeck.o c-common.o c-cppbuiltin.o c-decl.o attribs.o \ - $(TREE_BE_LIBS) treelang/t-options.o + $(TREE_BE_LIBS) # # Compiling object files from source files. @@ -98,7 +98,7 @@ tree1$(exeext): treelang/tree1.o treelang/treetree.o treelang/lex.o treelang/par treelang/tree1.o: treelang/tree1.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \ flags.h toplev.h $(GGC_H) $(TREE_H) diagnostic.h treelang/treelang.h \ - input.h treelang/treetree.h treelang/t-options.h \ + input.h treelang/treetree.h options.h opts.h \ treelang/treetree.h gt-treelang-tree1.h gtype-treelang.h treelang/treetree.o: treelang/treetree.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \ @@ -112,12 +112,6 @@ treelang/parse.o: treelang/parse.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \ treelang/lex.o: treelang/lex.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \ $(TM_H) diagnostic.h $(TREE_H) treelang/treelang.h input.h treelang/parse.h -treelang/t-options.c: treelang/lang.opt opts.sh treelang/t-options.h - -treelang/t-options.h: treelang/lang.opt opts.sh - AWK=$(AWK) $(SHELL) $(srcdir)/opts.sh treelang/t-options.c \ - treelang/t-options.h $(srcdir)/treelang/lang.opt - # generated files the files from lex and yacc are put into the source # directory in case someone wants to build but does not have # lex/yacc @@ -237,7 +231,6 @@ treelang.mostlyclean: rm -f treelang/$$name$(exeext); \ fi ; \ done - -rm -f treelang/t-options.c treelang/t-options.h -rm -f treelang/*$(objext) -rm -f treelang/*$(coverageexts) -rm treelang.done diff --git a/gcc/treelang/tree1.c b/gcc/treelang/tree1.c index f4e5fa8..6be21a3 100644 --- a/gcc/treelang/tree1.c +++ b/gcc/treelang/tree1.c @@ -45,7 +45,7 @@ #include "treelang.h" #include "treetree.h" #include "opts.h" -#include "t-options.h" +#include "options.h" extern int yyparse (void); @@ -88,6 +88,13 @@ static int version_done = 0; static unsigned int work_nesting_level = 0; +/* Prepare to handle switches. */ +int +treelang_init_options (void) +{ + return CL_TREELANG; +} + /* Process a switch - called by opts.c. */ int treelang_handle_option (size_t scode, const char *arg ATTRIBUTE_UNUSED, @@ -98,7 +105,7 @@ treelang_handle_option (size_t scode, const char *arg ATTRIBUTE_UNUSED, switch (code) { default: - return 0; + abort(); case OPT__help: if (!version_done) diff --git a/gcc/treelang/treetree.c b/gcc/treelang/treetree.c index d6720cb..40db190 100644 --- a/gcc/treelang/treetree.c +++ b/gcc/treelang/treetree.c @@ -112,6 +112,8 @@ extern char **file_names; #define LANG_HOOKS_NAME "GNU treelang" #undef LANG_HOOKS_FINISH #define LANG_HOOKS_FINISH treelang_finish +#undef LANG_HOOKS_INIT_OPTIONS +#define LANG_HOOKS_INIT_OPTIONS treelang_init_options #undef LANG_HOOKS_HANDLE_OPTION #define LANG_HOOKS_HANDLE_OPTION treelang_handle_option const struct lang_hooks lang_hooks = LANG_HOOKS_INITIALIZER; diff --git a/gcc/treelang/treetree.h b/gcc/treelang/treetree.h index c87b3af..2c7aec3 100644 --- a/gcc/treelang/treetree.h +++ b/gcc/treelang/treetree.h @@ -63,6 +63,7 @@ tree tree_code_get_type (int type_num); void treelang_init_decl_processing (void); void treelang_finish (void); bool treelang_init (void); +int treelang_init_options (void); int treelang_handle_option (size_t scode, const char *arg, int value); void treelang_parse_file (int debug_flag); void push_var_level (void); |