Commit 0b6f2917 by Neil Booth Committed by Neil Booth

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
parent e49ec17d
2002-08-07 Neil Booth <neil@daikokuya.co.uk>
* 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.
2002-08-07 Chris Demetriou <cgd@broadcom.com> 2002-08-07 Chris Demetriou <cgd@broadcom.com>
* config/mips/mips.md (sunlt_sf, suneq_sf, sunle_sf): Remove * config/mips/mips.md (sunlt_sf, suneq_sf, sunle_sf): Remove
......
...@@ -714,7 +714,7 @@ CXX_TARGET_OBJS=@cxx_target_objs@ ...@@ -714,7 +714,7 @@ CXX_TARGET_OBJS=@cxx_target_objs@
# Language-specific object files for C and Objective C. # Language-specific object files for C and Objective C.
C_AND_OBJC_OBJS = attribs.o c-errors.o c-lex.o c-pragma.o c-decl.o c-typeck.o \ C_AND_OBJC_OBJS = attribs.o c-errors.o c-lex.o c-pragma.o c-decl.o c-typeck.o \
c-convert.o c-aux-info.o c-common.o c-format.o c-semantics.o \ c-convert.o c-aux-info.o c-common.o c-opts.o c-format.o c-semantics.o \
c-objc-common.o c-dump.o libcpp.a $(C_TARGET_OBJS) c-objc-common.o c-dump.o libcpp.a $(C_TARGET_OBJS)
# Language-specific object files for C. # Language-specific object files for C.
...@@ -1229,10 +1229,13 @@ s-under: $(GCC_PASSES) ...@@ -1229,10 +1229,13 @@ s-under: $(GCC_PASSES)
c-common.o : c-common.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(OBSTACK_H) \ c-common.o : c-common.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(OBSTACK_H) \
$(C_COMMON_H) flags.h toplev.h output.h c-pragma.h $(RTL_H) $(GGC_H) \ $(C_COMMON_H) flags.h toplev.h output.h c-pragma.h $(RTL_H) $(GGC_H) \
$(EXPR_H) $(TM_P_H) builtin-types.def builtin-attrs.def $(TARGET_H) \ $(EXPR_H) $(TM_P_H) builtin-types.def builtin-attrs.def $(TARGET_H) \
diagnostic.h tree-inline.h except.h gt-c-common.h real.h langhooks.h diagnostic.h except.h gt-c-common.h real.h langhooks.h
c-pretty-print.o : c-pretty-print.c c-pretty-print.h pretty-print.h \ c-pretty-print.o : c-pretty-print.c c-pretty-print.h pretty-print.h \
$(C_COMMON_H) $(CONFIG_H) $(SYSTEM_H) real.h $(C_COMMON_H) $(CONFIG_H) $(SYSTEM_H) real.h
c-opts.o : c-opts.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(C_COMMON_H) \
c-pragma.h flags.h toplev.h langhooks.h tree-inline.h diagnostic.h
# A file used by all variants of C and some other languages. # A file used by all variants of C and some other languages.
attribs.o : attribs.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(OBSTACK_H) flags.h \ attribs.o : attribs.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(OBSTACK_H) flags.h \
......
...@@ -31,7 +31,6 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA ...@@ -31,7 +31,6 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
#include "ggc.h" #include "ggc.h"
#include "expr.h" #include "expr.h"
#include "c-common.h" #include "c-common.h"
#include "tree-inline.h"
#include "diagnostic.h" #include "diagnostic.h"
#include "tm_p.h" #include "tm_p.h"
#include "obstack.h" #include "obstack.h"
...@@ -4669,73 +4668,6 @@ boolean_increment (code, arg) ...@@ -4669,73 +4668,6 @@ boolean_increment (code, arg)
return val; return val;
} }
/* Common initialization before parsing options. */
void
c_common_init_options (lang)
enum c_language_kind lang;
{
c_language = lang;
parse_in = cpp_create_reader (lang == clk_c || lang == clk_objective_c
? CLK_GNUC89 : CLK_GNUCXX);
if (lang == clk_objective_c)
cpp_get_options (parse_in)->objc = 1;
flag_const_strings = (lang == clk_cplusplus);
warn_pointer_arith = (lang == clk_cplusplus);
if (lang == clk_c)
warn_sign_compare = -1;
/* Mark as "unspecified" (see c_common_post_options). */
flag_bounds_check = -1;
}
/* Post-switch processing. */
bool
c_common_post_options ()
{
cpp_post_options (parse_in);
flag_inline_trees = 1;
/* Use tree inlining if possible. Function instrumentation is only
done in the RTL level, so we disable tree inlining. */
if (! flag_instrument_function_entry_exit)
{
if (!flag_no_inline)
flag_no_inline = 1;
if (flag_inline_functions)
{
flag_inline_trees = 2;
flag_inline_functions = 0;
}
}
/* If still "unspecified", make it match -fbounded-pointers. */
if (flag_bounds_check == -1)
flag_bounds_check = flag_bounded_pointers;
/* Special format checking options don't work without -Wformat; warn if
they are used. */
if (warn_format_y2k && !warn_format)
warning ("-Wformat-y2k ignored without -Wformat");
if (warn_format_extra_args && !warn_format)
warning ("-Wformat-extra-args ignored without -Wformat");
if (warn_format_zero_length && !warn_format)
warning ("-Wformat-zero-length ignored without -Wformat");
if (warn_format_nonliteral && !warn_format)
warning ("-Wformat-nonliteral ignored without -Wformat");
if (warn_format_security && !warn_format)
warning ("-Wformat-security ignored without -Wformat");
if (warn_missing_format_attribute && !warn_format)
warning ("-Wmissing-format-attribute ignored without -Wformat");
/* If an error has occurred in cpplib, note it so we fail
immediately. */
errorcount += cpp_errors (parse_in);
return flag_preprocess_only;
}
/* Hook that registers front end and target-specific built-ins. */ /* Hook that registers front end and target-specific built-ins. */
static void static void
cb_register_builtins (pfile) cb_register_builtins (pfile)
......
...@@ -851,6 +851,7 @@ extern tree handle_format_attribute PARAMS ((tree *, tree, tree, ...@@ -851,6 +851,7 @@ extern tree handle_format_attribute PARAMS ((tree *, tree, tree,
extern tree handle_format_arg_attribute PARAMS ((tree *, tree, tree, extern tree handle_format_arg_attribute PARAMS ((tree *, tree, tree,
int, bool *)); int, bool *));
extern void c_common_insert_default_attributes PARAMS ((tree)); extern void c_common_insert_default_attributes PARAMS ((tree));
extern int c_common_decode_option PARAMS ((int, char **));
extern tree c_common_type_for_mode PARAMS ((enum machine_mode, extern tree c_common_type_for_mode PARAMS ((enum machine_mode,
int)); int));
extern tree c_common_type_for_size PARAMS ((unsigned int, int)); extern tree c_common_type_for_size PARAMS ((unsigned int, int));
......
...@@ -295,268 +295,6 @@ enum deprecated_states { ...@@ -295,268 +295,6 @@ enum deprecated_states {
static enum deprecated_states deprecated_state = DEPRECATED_NORMAL; static enum deprecated_states deprecated_state = DEPRECATED_NORMAL;
/* Decode the string P as a language-specific option for C.
Return the number of strings consumed. Should not complain
if it does not recognise the option. */
int
c_decode_option (argc, argv)
int argc ATTRIBUTE_UNUSED;
char **argv;
{
int strings_processed;
char *p = argv[0];
static const struct {
/* The name of the option. */
const char *option;
/* A pointer to a flag variable to set to 0 or 1. */
int *flag;
} warn_options[] = {
/* This list is in alphabetical order. Keep it like that. */
{ "bad-function-cast", &warn_bad_function_cast },
{ "cast-qual", &warn_cast_qual },
{ "char-subscripts", &warn_char_subscripts },
{ "conversion", &warn_conversion },
{ "div-by-zero", &warn_div_by_zero },
{ "float-equal", &warn_float_equal },
{ "format-extra-args", &warn_format_extra_args },
{ "format-zero-length", &warn_format_zero_length },
{ "format-nonliteral", &warn_format_nonliteral },
{ "format-security", &warn_format_security },
{ "format-y2k", &warn_format_y2k },
{ "implicit-function-declaration", &mesg_implicit_function_declaration },
{ "implicit-int", &warn_implicit_int },
{ "long-long", &warn_long_long },
{ "main", &warn_main },
{ "missing-braces", &warn_missing_braces },
{ "missing-declarations", &warn_missing_declarations },
{ "missing-format-attribute", &warn_missing_format_attribute },
{ "missing-prototypes", &warn_missing_prototypes },
{ "multichar", &warn_multichar },
{ "nested-externs", &warn_nested_externs },
{ "nonnull", &warn_nonnull },
{ "parentheses", &warn_parentheses },
{ "pointer-arith", &warn_pointer_arith },
{ "redundant-decls", &warn_redundant_decls },
{ "return-type", &warn_return_type },
{ "sequence-point", &warn_sequence_point },
{ "sign-compare", &warn_sign_compare },
{ "strict-prototypes", &warn_strict_prototypes },
{ "traditional", &warn_traditional },
{ "write-strings", &flag_const_strings }
};
strings_processed = cpp_handle_option (parse_in, argc, argv);
if (!strcmp (p, "-fhosted") || !strcmp (p, "-fno-freestanding"))
{
flag_hosted = 1;
flag_no_builtin = 0;
}
else if (!strcmp (p, "-ffreestanding") || !strcmp (p, "-fno-hosted"))
{
flag_hosted = 0;
flag_no_builtin = 1;
/* warn_main will be 2 if set by -Wall, 1 if set by -Wmain */
if (warn_main == 2)
warn_main = 0;
}
else if (!strncmp (p, "-std=", 5))
{
/* Select the appropriate language standard. We currently
recognize:
-std=iso9899:1990 same as -ansi
-std=iso9899:199409 ISO C as modified in amend. 1
-std=iso9899:1999 ISO C 99
-std=c89 same as -std=iso9899:1990
-std=c99 same as -std=iso9899:1999
-std=gnu89 default, iso9899:1990 + gnu extensions
-std=gnu99 iso9899:1999 + gnu extensions
*/
const char *const argstart = &p[5];
if (!strcmp (argstart, "iso9899:1990")
|| !strcmp (argstart, "c89"))
{
iso_1990:
flag_isoc94 = 0;
iso_1994:
flag_writable_strings = 0;
flag_no_asm = 1;
flag_no_nonansi_builtin = 1;
flag_noniso_default_format_attributes = 0;
flag_isoc99 = 0;
flag_iso = 1;
}
else if (!strcmp (argstart, "iso9899:199409"))
{
flag_isoc94 = 1;
goto iso_1994;
}
else if (!strcmp (argstart, "iso9899:199x")
|| !strcmp (argstart, "iso9899:1999")
|| !strcmp (argstart, "c9x")
|| !strcmp (argstart, "c99"))
{
flag_writable_strings = 0;
flag_no_asm = 1;
flag_no_nonansi_builtin = 1;
flag_noniso_default_format_attributes = 0;
flag_isoc99 = 1;
flag_isoc94 = 1;
flag_iso = 1;
}
else if (!strcmp (argstart, "gnu89"))
{
flag_writable_strings = 0;
flag_no_asm = 0;
flag_no_nonansi_builtin = 0;
flag_noniso_default_format_attributes = 1;
flag_isoc99 = 0;
flag_isoc94 = 0;
}
else if (!strcmp (argstart, "gnu9x") || !strcmp (argstart, "gnu99"))
{
flag_writable_strings = 0;
flag_no_asm = 0;
flag_no_nonansi_builtin = 0;
flag_noniso_default_format_attributes = 1;
flag_isoc99 = 1;
flag_isoc94 = 1;
}
else if (!strcmp (argstart, "c++98"))
; /* Handled by cpplib. */
else
error ("unknown C standard `%s'", argstart);
}
else if (!strcmp (p, "-fdollars-in-identifiers"))
dollars_in_ident = 1;
else if (!strcmp (p, "-fno-dollars-in-identifiers"))
dollars_in_ident = 0;
else if (!strcmp (p, "-fsigned-char"))
flag_signed_char = 1;
else if (!strcmp (p, "-funsigned-char"))
flag_signed_char = 0;
else if (!strcmp (p, "-fno-signed-char"))
flag_signed_char = 0;
else if (!strcmp (p, "-fno-unsigned-char"))
flag_signed_char = 1;
else if (!strcmp (p, "-fsigned-bitfields")
|| !strcmp (p, "-fno-unsigned-bitfields"))
{
flag_signed_bitfields = 1;
explicit_flag_signed_bitfields = 1;
}
else if (!strcmp (p, "-funsigned-bitfields")
|| !strcmp (p, "-fno-signed-bitfields"))
{
flag_signed_bitfields = 0;
explicit_flag_signed_bitfields = 1;
}
else if (!strcmp (p, "-fshort-enums"))
flag_short_enums = 1;
else if (!strcmp (p, "-fno-short-enums"))
flag_short_enums = 0;
else if (!strcmp (p, "-fshort-wchar"))
flag_short_wchar = 1;
else if (!strcmp (p, "-fno-short-wchar"))
flag_short_wchar = 0;
else if (!strcmp (p, "-fcond-mismatch"))
flag_cond_mismatch = 1;
else if (!strcmp (p, "-fno-cond-mismatch"))
flag_cond_mismatch = 0;
else if (!strcmp (p, "-fshort-double"))
flag_short_double = 1;
else if (!strcmp (p, "-fno-short-double"))
flag_short_double = 0;
else if (!strcmp (p, "-fasm"))
flag_no_asm = 0;
else if (!strcmp (p, "-fno-asm"))
flag_no_asm = 1;
else if (!strcmp (p, "-fms-extensions"))
flag_ms_extensions = 1;
else if (!strcmp (p, "-fno-ms-extensions"))
flag_ms_extensions = 0;
else if (!strcmp (p, "-fbuiltin"))
flag_no_builtin = 0;
else if (!strcmp (p, "-fno-builtin"))
flag_no_builtin = 1;
else if (!strncmp (p, "-fno-builtin-", strlen ("-fno-builtin-")))
disable_builtin_function (p + strlen ("-fno-builtin-"));
else if (p[0] == '-' && p[1] == 'f' && dump_switch_p (p + 2))
;
else if (!strcmp (p, "-ansi"))
goto iso_1990;
else if (!strcmp (p, "-undef"))
flag_undef = 1;
else if (!strcmp (p, "-Werror-implicit-function-declaration"))
mesg_implicit_function_declaration = 2;
else if (!strncmp (p, "-Wformat=", 9))
set_Wformat (atoi (p + 9));
else if (!strcmp (p, "-Wformat"))
set_Wformat (1);
else if (!strcmp (p, "-Wno-format"))
set_Wformat (0);
else if (!strcmp (p, "-Wimplicit"))
{
warn_implicit_int = 1;
if (mesg_implicit_function_declaration != 2)
mesg_implicit_function_declaration = 1;
}
else if (!strcmp (p, "-Wno-implicit"))
warn_implicit_int = 0, mesg_implicit_function_declaration = 0;
else if (!strcmp (p, "-Wno-main"))
warn_main = -1;
else if (!strcmp (p, "-Wunknown-pragmas"))
/* Set to greater than 1, so that even unknown pragmas in system
headers will be warned about. */
warn_unknown_pragmas = 2;
else if (!strcmp (p, "-Wno-unknown-pragmas"))
warn_unknown_pragmas = 0;
else if (!strcmp (p, "-Wall"))
{
/* We save the value of warn_uninitialized, since if they put
-Wuninitialized on the command line, we need to generate a
warning about not using it without also specifying -O. */
if (warn_uninitialized != 1)
warn_uninitialized = 2;
warn_implicit_int = 1;
mesg_implicit_function_declaration = 1;
warn_return_type = 1;
set_Wunused (1);
warn_switch = 1;
set_Wformat (1);
warn_char_subscripts = 1;
warn_parentheses = 1;
warn_sequence_point = 1;
warn_missing_braces = 1;
/* We set this to 2 here, but 1 in -Wmain, so -ffreestanding can turn
it off only if it's not explicit. */
warn_main = 2;
/* Only warn about unknown pragmas that are not in system headers. */
warn_unknown_pragmas = 1;
}
else if (!strcmp (p, "-E"))
flag_preprocess_only = 1;
else
{
size_t i;
for (i = 0; i < ARRAY_SIZE (warn_options); i++)
if (strncmp (p, "-W", 2) == 0
&& (strcmp (p+2, warn_options[i].option) == 0
|| (strncmp (p+2, "no-", 3) == 0
&& strcmp (p+5, warn_options[i].option) == 0)))
{
*(warn_options[i].flag) = strncmp (p+2, "no-", 3) != 0;
return 1;
}
return strings_processed;
}
return 1;
}
void void
c_print_identifier (file, node, indent) c_print_identifier (file, node, indent)
FILE *file; FILE *file;
......
...@@ -43,7 +43,7 @@ static void c_init_options PARAMS ((void)); ...@@ -43,7 +43,7 @@ static void c_init_options PARAMS ((void));
#undef LANG_HOOKS_INIT_OPTIONS #undef LANG_HOOKS_INIT_OPTIONS
#define LANG_HOOKS_INIT_OPTIONS c_init_options #define LANG_HOOKS_INIT_OPTIONS c_init_options
#undef LANG_HOOKS_DECODE_OPTION #undef LANG_HOOKS_DECODE_OPTION
#define LANG_HOOKS_DECODE_OPTION c_decode_option #define LANG_HOOKS_DECODE_OPTION c_common_decode_option
#undef LANG_HOOKS_POST_OPTIONS #undef LANG_HOOKS_POST_OPTIONS
#define LANG_HOOKS_POST_OPTIONS c_common_post_options #define LANG_HOOKS_POST_OPTIONS c_common_post_options
#undef LANG_HOOKS_GET_ALIAS_SET #undef LANG_HOOKS_GET_ALIAS_SET
......
This diff is collapsed. Click to expand it.
...@@ -195,7 +195,6 @@ extern void c_dup_lang_specific_decl PARAMS ((tree)); ...@@ -195,7 +195,6 @@ extern void c_dup_lang_specific_decl PARAMS ((tree));
extern void c_print_identifier PARAMS ((FILE *, tree, int)); extern void c_print_identifier PARAMS ((FILE *, tree, int));
extern tree build_array_declarator PARAMS ((tree, tree, int, int)); extern tree build_array_declarator PARAMS ((tree, tree, int, int));
extern tree build_enumerator PARAMS ((tree, tree)); extern tree build_enumerator PARAMS ((tree, tree));
extern int c_decode_option PARAMS ((int, char **));
extern void check_for_loop_decls PARAMS ((void)); extern void check_for_loop_decls PARAMS ((void));
extern void clear_parm_order PARAMS ((void)); extern void clear_parm_order PARAMS ((void));
extern int complete_array_type PARAMS ((tree, tree, int)); extern int complete_array_type PARAMS ((tree, tree, int));
......
2002-08-07 Neil Booth <neil@daikokuya.co.uk>
* 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.
2002-08-06 Gabriel Dos Reis <gdr@nerim.net> 2002-08-06 Gabriel Dos Reis <gdr@nerim.net>
* typeck.c (build_x_unary_op): Handle pointer-to-member. * typeck.c (build_x_unary_op): Handle pointer-to-member.
......
...@@ -96,7 +96,7 @@ $(DEMANGLER_PROG): cxxmain.o underscore.o $(LIBDEPS) ...@@ -96,7 +96,7 @@ $(DEMANGLER_PROG): cxxmain.o underscore.o $(LIBDEPS)
# The compiler itself. # The compiler itself.
# Shared with C front end: # Shared with C front end:
CXX_C_OBJS = attribs.o c-common.o c-format.o c-pragma.o c-semantics.o c-lex.o \ CXX_C_OBJS = attribs.o c-common.o c-format.o c-pragma.o c-semantics.o c-lex.o \
c-dump.o $(CXX_TARGET_OBJS) c-pretty-print.o c-dump.o $(CXX_TARGET_OBJS) c-pretty-print.o c-opts.o
# Language-specific object files. # Language-specific object files.
CXX_OBJS = cp/call.o cp/decl.o cp/expr.o cp/pt.o cp/typeck2.o \ CXX_OBJS = cp/call.o cp/decl.o cp/expr.o cp/pt.o cp/typeck2.o \
......
...@@ -44,7 +44,7 @@ static tree cp_expr_size PARAMS ((tree)); ...@@ -44,7 +44,7 @@ static tree cp_expr_size PARAMS ((tree));
#undef LANG_HOOKS_INIT_OPTIONS #undef LANG_HOOKS_INIT_OPTIONS
#define LANG_HOOKS_INIT_OPTIONS cxx_init_options #define LANG_HOOKS_INIT_OPTIONS cxx_init_options
#undef LANG_HOOKS_DECODE_OPTION #undef LANG_HOOKS_DECODE_OPTION
#define LANG_HOOKS_DECODE_OPTION cxx_decode_option #define LANG_HOOKS_DECODE_OPTION c_common_decode_option
#undef LANG_HOOKS_POST_OPTIONS #undef LANG_HOOKS_POST_OPTIONS
#define LANG_HOOKS_POST_OPTIONS c_common_post_options #define LANG_HOOKS_POST_OPTIONS c_common_post_options
#undef LANG_HOOKS_GET_ALIAS_SET #undef LANG_HOOKS_GET_ALIAS_SET
......
...@@ -3744,7 +3744,6 @@ extern bool have_extern_spec; ...@@ -3744,7 +3744,6 @@ extern bool have_extern_spec;
/* in decl2.c */ /* in decl2.c */
extern int check_java_method PARAMS ((tree)); extern int check_java_method PARAMS ((tree));
extern int cxx_decode_option PARAMS ((int, char **));
extern int grok_method_quals PARAMS ((tree, tree, tree)); extern int grok_method_quals PARAMS ((tree, tree, tree));
extern void warn_if_unknown_interface PARAMS ((tree)); extern void warn_if_unknown_interface PARAMS ((tree));
extern void grok_x_components PARAMS ((tree)); extern void grok_x_components PARAMS ((tree));
......
...@@ -109,6 +109,7 @@ The files ...@@ -109,6 +109,7 @@ The files
@file{c-common.c}, @file{c-common.c},
@file{c-common.def}, @file{c-common.def},
@file{c-format.c}, @file{c-format.c},
@file{c-opts.c},
@file{c-pragma.c}, @file{c-pragma.c},
@file{c-semantics.c}, @file{c-semantics.c},
and and
......
...@@ -495,47 +495,6 @@ finish_file () ...@@ -495,47 +495,6 @@ finish_file ()
if (gen_declaration_file) if (gen_declaration_file)
fclose (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 static tree
define_decl (declarator, declspecs) define_decl (declarator, declspecs)
......
...@@ -24,7 +24,6 @@ Boston, MA 02111-1307, USA. */ ...@@ -24,7 +24,6 @@ Boston, MA 02111-1307, USA. */
/*** Public Interface (procedures) ***/ /*** Public Interface (procedures) ***/
const char *objc_init PARAMS ((const char *)); const char *objc_init PARAMS ((const char *));
int objc_decode_option PARAMS ((int, char **));
const char *objc_printable_name PARAMS ((tree, int)); const char *objc_printable_name PARAMS ((tree, int));
/* used by yyparse */ /* used by yyparse */
......
...@@ -40,7 +40,7 @@ static void objc_init_options PARAMS ((void)); ...@@ -40,7 +40,7 @@ static void objc_init_options PARAMS ((void));
#undef LANG_HOOKS_INIT_OPTIONS #undef LANG_HOOKS_INIT_OPTIONS
#define LANG_HOOKS_INIT_OPTIONS objc_init_options #define LANG_HOOKS_INIT_OPTIONS objc_init_options
#undef LANG_HOOKS_DECODE_OPTION #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 #undef LANG_HOOKS_POST_OPTIONS
#define LANG_HOOKS_POST_OPTIONS c_common_post_options #define LANG_HOOKS_POST_OPTIONS c_common_post_options
#undef LANG_HOOKS_GET_ALIAS_SET #undef LANG_HOOKS_GET_ALIAS_SET
......
2002-08-07 Neil Booth <neil@daikokuya.co.uk>
* 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.
2002-08-06 Aldy Hernandez <aldyh@redhat.com> 2002-08-06 Aldy Hernandez <aldyh@redhat.com>
* testsuite/gcc.dg/tls/diag-3.c: New. * testsuite/gcc.dg/tls/diag-3.c: New.
......
...@@ -36,7 +36,7 @@ if ![info exists DEFAULT_CFLAGS] then { ...@@ -36,7 +36,7 @@ if ![info exists DEFAULT_CFLAGS] then {
dg-init dg-init
# Main loop. # Main loop.
dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.\[cS\]]] \ dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.\[cCS\]]] \
"" $DEFAULT_CFLAGS "" $DEFAULT_CFLAGS
# All done. # All done.
......
/* Test the -fconstant-string-class flag error. */ /* Test the -fconstant-string-class flag error. */
/* { dg-do compile } */ /* { dg-do compile } */
/* { dg-options "-fconstant-string-class" } */ /* { dg-options "-fconstant-string-class=" } */
{ dg-error "no class name specified as argument to -fconstant-string-class" "" { target *-*-* } 0 } { dg-error "no class name specified" "" { target *-*-* } 0 }
void foo () {} void foo () {}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment