Commit b0a1da19 by Jason Merrill Committed by Jason Merrill

decl.c (define_case_label): Don't crash if we're not in a switch.

	* decl.c (define_case_label): Don't crash if we're not in a switch.

	* decl2.c (lang_decode_option): Don't bother explicitly ignoring flags.
	* lang-options.h: Restore -fthis-is-variable.  Remove help strings
	for unsupported flags.
	* decl2.c (lang_decode_option): Accept and ignore -finit-priority.
	Accept and warn about -fthis-is-variable.

From-SVN: r29594
parent bad1e2ac
1999-09-22 Jason Merrill <jason@yorick.cygnus.com>
* decl.c (define_case_label): Don't crash if we're not in a switch.
* decl2.c (lang_decode_option): Don't bother explicitly ignoring flags.
* lang-options.h: Restore -fthis-is-variable. Remove help strings
for unsupported flags.
1999-09-21 Jason Merrill <jason@yorick.cygnus.com>
* decl2.c (lang_decode_option): Accept and ignore -finit-priority.
......
......@@ -4879,8 +4879,8 @@ pop_switch ()
switch_stack = switch_stack->next;
}
/* Same, but for CASE labels. If DECL is NULL_TREE, it's the default. */
/* XXX Note decl is never actually used. (bpk) */
/* Note that we've seen a definition of a case label, and complain if this
is a bad place for one. */
void
define_case_label ()
......@@ -4889,6 +4889,10 @@ define_case_label ()
struct binding_level *b = current_binding_level;
int identified = 0;
if (! switch_stack)
/* Don't crash; we'll complain in do_case. */
return;
if (cleanup)
{
static int explained = 0;
......
......@@ -567,25 +567,10 @@ lang_decode_option (argc, argv)
if (!strcmp (p, "handle-exceptions")
|| !strcmp (p, "no-handle-exceptions"))
warning ("-fhandle-exceptions has been renamed to -fexceptions (and is now on by default)");
if (!strcmp (p, "memoize-lookups")
|| !strcmp (p, "no-memoize-lookups")
|| !strcmp (p, "save-memoized")
|| !strcmp (p, "no-save-memoized")
|| !strcmp (p, "no-all-virtual")
|| !strcmp (p, "no-enum-int-equiv")
|| !strcmp (p, "init-priority")
|| !strcmp (p, "no-init-priority")
|| !strcmp (p, "nonnull-objects")
|| !strcmp (p, "no-this-is-variable")
|| !strcmp (p, "ansi-overloading"))
/* ignore */
;
else if (!strcmp (p, "all-virtual")
|| !strcmp (p, "enum-int-equiv")
|| !strcmp (p, "no-nonnull-objects")
|| !strcmp (p, "this-is-variable")
|| !strcmp (p, "no-ansi-overloading"))
|| !strcmp (p, "this-is-variable"))
warning ("-f%s is no longer supported", p);
else if (! strcmp (p, "alt-external-templates"))
{
......
/* Definitions for switches for C++.
Copyright (C) 1995, 96-97, 1998 Free Software Foundation, Inc.
Copyright (C) 1995, 96-98, 1999 Free Software Foundation, Inc.
This file is part of GNU CC.
......@@ -25,7 +25,7 @@ DEFINE_LANG_NAME ("C++")
{ "-faccess-control", "" },
{ "-fno-access-control", "Do not obey access control semantics" },
{ "-fall-virtual", "Make all member functions virtual" },
{ "-fall-virtual", "" },
{ "-fno-all-virtual", "" },
{ "-falt-external-templates", "Change when template instances are emitted" },
{ "-fno-alt-external-templates", "" },
......@@ -66,7 +66,7 @@ DEFINE_LANG_NAME ("C++")
{ "-fno-implicit-templates", "Only emit explicit template instatiations" },
{ "-fimplicit-inline-templates", "" },
{ "-fno-implicit-inline-templates", "Only emit explicit instatiations of inline templates" },
{ "-finit-priority", "Handle the init_priority attribute" },
{ "-finit-priority", "" },
{ "-fno-init-priority", "" },
{ "-flabels-ok", "Labels can be used as first class objects" },
{ "-fno-labels-ok", "" },
......@@ -78,7 +78,7 @@ DEFINE_LANG_NAME ("C++")
{ "-fnew-abi", "Enable experimental ABI changes" },
{ "-fno-new-abi", "" },
{ "-fnonnull-objects", "" },
{ "-fno-nonnull-objects", "Do not assume that a reference is always valid" },
{ "-fno-nonnull-objects", "" },
{ "-foperator-names", "Recognise and/bitand/bitor/compl/not/or/xor" },
{ "-fno-operator-names", "" },
{ "-foptional-diags", "" },
......@@ -96,6 +96,8 @@ DEFINE_LANG_NAME ("C++")
{ "-fstrict-prototype", "" },
{ "-fno-strict-prototype", "Do not assume that empty prototype means no args" },
{ "-ftemplate-depth-", "Specify maximum template instantiation depth"},
{ "-fthis-is-variable", "Make 'this' not be type '* const'" },
{ "-fno-this-is-variable", "" },
{ "-fvtable-gc", "Discard unused virtual functions" },
{ "-fno-vtable-gc", "" },
{ "-fvtable-thunks", "Implement vtables using thunks" },
......
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