invoke.texi: Document more C++ command-line options.

* invoke.texi: Document more C++ command-line options.

	Remove support for -Wextern-inline, -flabels-ok, -fvtable-gc, -fxref
	* cp-tree.h (warn_extern_inline): Remove.
	(flag_labels_ok): Likewise.
	* decl2.c (warn_extern_inline): Remove.
	(flag_labels_ok): Likewise.
	(lang_f_options): Remove labels-ok, vtable-gc, xref.
	(unsupported_options): Add them.
	(cxx_decode_option): Don't accept -Wextern-inline.
	* method.c (hack_identifier): Remove -flabels-ok support.
	* spew.c (see_typename): Likewise.

	* g++.dg/vtgc1.C: XFAIL.
	* g++.old-deja/g++.other/crash18.C: Likewise.

From-SVN: r41609
This commit is contained in:
Mark Mitchell 2001-04-26 20:05:34 +00:00
parent 56fe39c809
commit fcca588c94
7 changed files with 47 additions and 33 deletions

View File

@ -1064,10 +1064,6 @@ extern int warn_ecpp;
extern int warn_sign_promo;
/* Non-zero means warn when a function is declared extern and later inline. */
extern int warn_extern_inline;
/* Non-zero means warn when an old-style cast is used. */
extern int warn_old_style_cast;
@ -3180,10 +3176,6 @@ typedef enum instantiate_type_flags {
itf_ptrmem_ok = 1 << 2, /* pointers to member ok (internal use) */
} instantiate_type_flags;
/* Non-zero means that if a label exists, and no other identifier
applies, use the value of the label. */
extern int flag_labels_ok;
/* Nonzero means allow Microsoft extensions without a pedwarn. */
extern int flag_ms_extensions;

View File

@ -273,10 +273,6 @@ int warn_overloaded_virtual;
int warn_nonvdtor;
/* Non-zero means warn when a function is declared extern and later inline. */
int warn_extern_inline;
/* Non-zero means warn when the compiler will reorder code. */
int warn_reorder;
@ -327,10 +323,6 @@ int warn_deprecated = 1;
#endif
int dollars_in_ident = DOLLARS_IN_IDENTIFIERS;
/* Nonzero means that labels can be used as first-class objects */
int flag_labels_ok;
/* Nonzero means allow Microsoft extensions without a pedwarn. */
int flag_ms_extensions;
@ -473,7 +465,6 @@ lang_f_options[] =
{"implement-inlines", &flag_implement_inlines, 1},
{"implicit-inline-templates", &flag_implicit_inline_templates, 1},
{"implicit-templates", &flag_implicit_templates, 1},
{"labels-ok", &flag_labels_ok, 1},
{"ms-extensions", &flag_ms_extensions, 1},
{"nonansi-builtins", &flag_no_nonansi_builtin, 0},
{"operator-names", &flag_operator_names, 1},
@ -483,10 +474,8 @@ lang_f_options[] =
{"rtti", &flag_rtti, 1},
{"stats", &flag_detailed_statistics, 1},
{"use-cxa-atexit", &flag_use_cxa_atexit, 1},
{"vtable-gc", &flag_vtable_gc, 1},
{"vtable-thunks", &flag_vtable_thunks, 1},
{"weak", &flag_weak, 1},
{"xref", &flag_gnu_xref, 1}
{"weak", &flag_weak, 1}
};
/* The list of `-f' options that we no longer support. The `-f'
@ -497,10 +486,13 @@ static const char * const unsupported_options[] = {
"cond-mismatch",
"enum-int-equiv",
"guiding-decls",
"labels-ok",
"nonnull-objects",
"squangle",
"strict-prototype",
"this-is-variable",
"vtable-gc",
"xref"
};
/* Compare two option strings, pointed two by P1 and P2, for use with
@ -701,8 +693,6 @@ cxx_decode_option (argc, argv)
warn_parentheses = setting;
else if (!strcmp (p, "non-virtual-dtor"))
warn_nonvdtor = setting;
else if (!strcmp (p, "extern-inline"))
warn_extern_inline = setting;
else if (!strcmp (p, "reorder"))
warn_reorder = setting;
else if (!strcmp (p, "synth"))

View File

@ -182,10 +182,6 @@ hack_identifier (value, name)
#endif
}
}
if (flag_labels_ok && IDENTIFIER_LABEL_VALUE (name))
{
return IDENTIFIER_LABEL_VALUE (name);
}
return error_mark_node;
}

View File

@ -701,12 +701,7 @@ see_typename ()
if (yychar == IDENTIFIER)
{
lastiddecl = lookup_name (yylval.ttype, -2);
if (lastiddecl == 0)
{
if (flag_labels_ok)
lastiddecl = IDENTIFIER_LABEL_VALUE (yylval.ttype);
}
else
if (lastiddecl)
yychar = identifier_type (lastiddecl);
}
}

View File

@ -1232,6 +1232,17 @@ two definitions were merged.
This option is no longer useful on most targets, now that support has
been added for putting variables into BSS without making them common.
@item -fno-const-strings
Give string constants type @code{char *} instead of type @code{const
char *}. By default, G++ uses type @code{const char *} as required by
the standard. Even if you use @samp{-fno-const-strings}, you cannot
actually modify the value of a string constant, unless you also use
@samp{-fwritable-strings}.
This option might be removed in a future release of G++. For maximum
portability, you should structure your code so that it works with
string constants that have type @code{const char *}.
@item -fdollars-in-identifiers
Accept @samp{$} in identifiers. You can also explicitly prohibit use of
@samp{$} with the option @samp{-fno-dollars-in-identifiers}. (GNU C allows
@ -1321,6 +1332,11 @@ errors if these functions are not inlined everywhere they are called.
Disable pedantic warnings about constructs used in MFC, such as implicit
int and getting a pointer to member function via non-standard syntax.
@item -fno-nonansi-builtins
Disable builtin declarations of functions that are not mandated by
ANSI/ISO C. These include @code{ffs}, @code{alloca}, @code{_exit},
@code{index}, @code{bzero}, @code{conjf}, and other related functions.
@item -fno-operator-names
Do not treat the operator name keywords @code{and}, @code{bitand},
@code{bitor}, @code{compl}, @code{not}, @code{or} and @code{xor} as
@ -1350,6 +1366,10 @@ of the language, you can save some space by using this flag. Note that
exception handling uses the same information, but it will generate it as
needed.
@item -fstats
Emit statistics about front-end processing at the end of the compilation.
This information is generally only useful to the G++ development team.
@item -ftemplate-depth-@var{n}
Set the maximum instantiation depth for template classes to @var{n}.
A limit on the template instantiation depth is needed to detect
@ -1379,6 +1399,13 @@ those.
Like all options that change the ABI, all C++ code, @emph{including
libgcc.a} must be built with the same setting of this option.
@item -fno-weak
Do not use weak symbol support, even if it is provied by the linker.
By default, G++ will use weak symbols if they are available. This
option exists only for testing, and should not be used by end-users;
it will result in inferior code and has no benefits. This option may
be removed in a future release of G++.
@item -nostdinc++
Do not search for header files in the standard directories specific to
C++, but do still search the other standard directories. (This option

View File

@ -1,5 +1,6 @@
// { dg-do compile }
// { dg-options "-fvtable-gc" }
// { dg-excess-errors "-fvtable-gc unsupported" { xfail *-*-* } }
// Origin: Hans-Peter Nilsson <hp@bitrange.com>
class Base0
@ -118,16 +119,29 @@ void x3 (Multivs1 *ii) { ii->f2();}
void x4 (Multiss2 *ii) { ii->f2();}
void x5 (Multivv3 *ii) { ii->f2();}
// { dg-final { setup_xfail *-*-* } }
// { dg-final { scan-assembler-dem vtgc1.C "\.vtable_inherit\[ \t\]*vtable for Multivv3, 0" } }
// { dg-final { setup_xfail *-*-* } }
// { dg-final { scan-assembler-dem vtgc1.C "\.vtable_inherit\[ \t\]*VTT for Multivv3, 0" } }
// { dg-final { setup_xfail *-*-* } }
// { dg-final { scan-assembler-dem vtgc1.C "\.vtable_inherit\[ \t\]*vtable for Multiss2, vtable for Base2" } }
// { dg-final { setup_xfail *-*-* } }
// { dg-final { scan-assembler-dem vtgc1.C "\.vtable_inherit\[ \t\]*vtable for Multivs1, vtable for Base2" } }
// { dg-final { setup_xfail *-*-* } }
// { dg-final { scan-assembler-dem vtgc1.C "\.vtable_inherit\[ \t\]*VTT for Multivs1, vtable for Base2" } }
// { dg-final { setup_xfail *-*-* } }
// { dg-final { scan-assembler-dem vtgc1.C "\.vtable_inherit\[ \t\]*vtable for Multisv0, vtable for Side0" } }
// { dg-final { setup_xfail *-*-* } }
// { dg-final { scan-assembler-dem vtgc1.C "\.vtable_inherit\[ \t\]*VTT for Multisv0, vtable for Side0" } }
// { dg-final { setup_xfail *-*-* } }
// { dg-final { scan-assembler-dem vtgc1.C "\.vtable_inherit\[ \t\]*vtable for Side0, 0" } }
// { dg-final { setup_xfail *-*-* } }
// { dg-final { scan-assembler-dem vtgc1.C "\.vtable_inherit\[ \t\]*vtable for VbasedA, 0" } }
// { dg-final { setup_xfail *-*-* } }
// { dg-final { scan-assembler-dem vtgc1.C "\.vtable_inherit\[ \t\]*VTT for VbasedA, 0" } }
// { dg-final { setup_xfail *-*-* } }
// { dg-final { scan-assembler-dem vtgc1.C "\.vtable_inherit\[ \t\]*vtable for Base2, vtable for Base1" } }
// { dg-final { setup_xfail *-*-* } }
// { dg-final { scan-assembler-dem vtgc1.C "\.vtable_inherit\[ \t\]*vtable for Base1, vtable for Base0" } }
// { dg-final { setup_xfail *-*-* } }
// { dg-final { scan-assembler-dem vtgc1.C "\.vtable_inherit\[ \t\]*vtable for Base0, 0" } }

View File

@ -1,7 +1,7 @@
// Build don't link:
// Special g++ Options: -fvtable-gc
// Origin: Mark Mitchell <mitchell@codesourcery.com>
// excess errors test - XFAIL *-*-coff *-*-aout *-*-hms mips*-sgi-irix*
// excess errors test - XFAIL *-*-*
struct S {
virtual void f ();