diff options
author | Jason Merrill <jason@yorick.cygnus.com> | 1999-09-22 19:16:37 +0000 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 1999-09-22 15:16:37 -0400 |
commit | b0a1da1950ff19fcc32497a416c29d4f3998d19a (patch) | |
tree | 5ba6d46e47be8c38664f0123f234c6cb075b6dbc /gcc | |
parent | bad1e2ac25ca6a18ef11b747d9af4f4e6191d703 (diff) | |
download | gcc-b0a1da1950ff19fcc32497a416c29d4f3998d19a.zip gcc-b0a1da1950ff19fcc32497a416c29d4f3998d19a.tar.gz gcc-b0a1da1950ff19fcc32497a416c29d4f3998d19a.tar.bz2 |
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
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/cp/ChangeLog | 8 | ||||
-rw-r--r-- | gcc/cp/decl.c | 8 | ||||
-rw-r--r-- | gcc/cp/decl2.c | 17 | ||||
-rw-r--r-- | gcc/cp/lang-options.h | 10 |
4 files changed, 21 insertions, 22 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index d7b70c6..25f9057 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,11 @@ +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. diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index 4371372..a6706b5 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -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; diff --git a/gcc/cp/decl2.c b/gcc/cp/decl2.c index a348fe8..262d6a1 100644 --- a/gcc/cp/decl2.c +++ b/gcc/cp/decl2.c @@ -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")) { diff --git a/gcc/cp/lang-options.h b/gcc/cp/lang-options.h index f5bf2bb..4b743c0 100644 --- a/gcc/cp/lang-options.h +++ b/gcc/cp/lang-options.h @@ -1,5 +1,5 @@ /* 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" }, |