From 0b6f2917cfcbfbaccca804e0f038ac8c4457f772 Mon Sep 17 00:00:00 2001 From: Neil Booth Date: Wed, 7 Aug 2002 18:32:13 +0000 Subject: Makefile.in (c-opts.o, [...]): Update. * Makefile.in (c-opts.o, c-common.o, C_AND_OBJC_OBJS): Update. * c-common.c: Don't include tree-inline.h. (c_common_init_options, c_common_post_options): Move to c-opts.c. * c-common.h (c_common_decode_option): New. * c-decl.c (c_decode_option): Remove. * c-lang.c (LANG_HOOKS_DECODE_OPTION): Use c_common_decode_option. * c-opts.c: New file. * c-tree.h (c_decode_option): Remove. * doc/passes.texi: Update. * objc/objc-act.c (objc_decode_option): Remove. * objc/objc-act.h (objc_decode_option): Remove. * objc/ojbc-lang.c (LANG_HOOKS_DECODE_OPTION): Use c_common_decode_option. cp: * Make-lang.in (CXX_C_OBJS): Update. * cp-lang.c (LANG_HOOKS_DECODE_OPTION): Use c_common_decode_option. * cp-tree.h (cxx_decode_option): Remove. * decl2.c (compare_options, lang_f_options, unsupported_options, cxx_decode_option): Remove. testsuite: * objc.dg/const-str-2.m: Update. * gcc.dg/cpp/c++98.c: Change to C extension. * gcc.dg/cpp/c++98-pedantic.c: Similarly. * gcc.dg/cpp/cpp.exp: Process .C extensions too. From-SVN: r56105 --- gcc/objc/objc-act.c | 41 ----------------------------------------- gcc/objc/objc-act.h | 1 - gcc/objc/objc-lang.c | 2 +- 3 files changed, 1 insertion(+), 43 deletions(-) (limited to 'gcc/objc') diff --git a/gcc/objc/objc-act.c b/gcc/objc/objc-act.c index 8216d97..7ebb9f2 100644 --- a/gcc/objc/objc-act.c +++ b/gcc/objc/objc-act.c @@ -495,47 +495,6 @@ finish_file () if (gen_declaration_file) fclose (gen_declaration_file); } - -int -objc_decode_option (argc, argv) - int argc; - char **argv; -{ - const char *p = argv[0]; - - if (!strcmp (p, "-gen-decls")) - flag_gen_declaration = 1; - else if (!strcmp (p, "-Wselector")) - warn_selector = 1; - else if (!strcmp (p, "-Wno-selector")) - warn_selector = 0; - else if (!strcmp (p, "-Wprotocol")) - warn_protocol = 1; - else if (!strcmp (p, "-Wno-protocol")) - warn_protocol = 0; - else if (!strcmp (p, "-fgnu-runtime")) - flag_next_runtime = 0; - else if (!strcmp (p, "-fno-next-runtime")) - flag_next_runtime = 0; - else if (!strcmp (p, "-fno-gnu-runtime")) - flag_next_runtime = 1; - else if (!strcmp (p, "-fnext-runtime")) - flag_next_runtime = 1; - else if (!strcmp (p, "-print-objc-runtime-info")) - print_struct_values = 1; -#define CSTSTRCLASS "-fconstant-string-class=" - else if (!strncmp (p, CSTSTRCLASS, sizeof(CSTSTRCLASS) - 2)) { - if (strlen (argv[0]) <= strlen (CSTSTRCLASS)) - error ("no class name specified as argument to -fconstant-string-class"); - constant_string_class_name = xstrdup(argv[0] + sizeof(CSTSTRCLASS) - 1); - } -#undef CSTSTRCLASS - else - return c_decode_option (argc, argv); - - return 1; -} - static tree define_decl (declarator, declspecs) diff --git a/gcc/objc/objc-act.h b/gcc/objc/objc-act.h index 13b3e63..aebccf8 100644 --- a/gcc/objc/objc-act.h +++ b/gcc/objc/objc-act.h @@ -24,7 +24,6 @@ Boston, MA 02111-1307, USA. */ /*** Public Interface (procedures) ***/ const char *objc_init PARAMS ((const char *)); -int objc_decode_option PARAMS ((int, char **)); const char *objc_printable_name PARAMS ((tree, int)); /* used by yyparse */ diff --git a/gcc/objc/objc-lang.c b/gcc/objc/objc-lang.c index 1922a63..111428a 100644 --- a/gcc/objc/objc-lang.c +++ b/gcc/objc/objc-lang.c @@ -40,7 +40,7 @@ static void objc_init_options PARAMS ((void)); #undef LANG_HOOKS_INIT_OPTIONS #define LANG_HOOKS_INIT_OPTIONS objc_init_options #undef LANG_HOOKS_DECODE_OPTION -#define LANG_HOOKS_DECODE_OPTION objc_decode_option +#define LANG_HOOKS_DECODE_OPTION c_common_decode_option #undef LANG_HOOKS_POST_OPTIONS #define LANG_HOOKS_POST_OPTIONS c_common_post_options #undef LANG_HOOKS_GET_ALIAS_SET -- cgit v1.1