From 3272db82faf87eb82c5b56586dffb5b4b675501d Mon Sep 17 00:00:00 2001 From: neil Date: Sat, 14 Jun 2003 12:26:36 +0000 Subject: * 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@67941 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/treelang/tree1.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'gcc/treelang/tree1.c') diff --git a/gcc/treelang/tree1.c b/gcc/treelang/tree1.c index f4e5fa84cb5..6be21a34095 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) -- cgit v1.2.1