Commit fcca588c by Mark Mitchell

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
parent 56fe39c8
...@@ -1064,10 +1064,6 @@ extern int warn_ecpp; ...@@ -1064,10 +1064,6 @@ extern int warn_ecpp;
extern int warn_sign_promo; 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. */ /* Non-zero means warn when an old-style cast is used. */
extern int warn_old_style_cast; extern int warn_old_style_cast;
...@@ -3180,10 +3176,6 @@ typedef enum instantiate_type_flags { ...@@ -3180,10 +3176,6 @@ typedef enum instantiate_type_flags {
itf_ptrmem_ok = 1 << 2, /* pointers to member ok (internal use) */ itf_ptrmem_ok = 1 << 2, /* pointers to member ok (internal use) */
} instantiate_type_flags; } 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. */ /* Nonzero means allow Microsoft extensions without a pedwarn. */
extern int flag_ms_extensions; extern int flag_ms_extensions;
......
...@@ -273,10 +273,6 @@ int warn_overloaded_virtual; ...@@ -273,10 +273,6 @@ int warn_overloaded_virtual;
int warn_nonvdtor; 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. */ /* Non-zero means warn when the compiler will reorder code. */
int warn_reorder; int warn_reorder;
...@@ -327,10 +323,6 @@ int warn_deprecated = 1; ...@@ -327,10 +323,6 @@ int warn_deprecated = 1;
#endif #endif
int dollars_in_ident = DOLLARS_IN_IDENTIFIERS; 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. */ /* Nonzero means allow Microsoft extensions without a pedwarn. */
int flag_ms_extensions; int flag_ms_extensions;
...@@ -473,7 +465,6 @@ lang_f_options[] = ...@@ -473,7 +465,6 @@ lang_f_options[] =
{"implement-inlines", &flag_implement_inlines, 1}, {"implement-inlines", &flag_implement_inlines, 1},
{"implicit-inline-templates", &flag_implicit_inline_templates, 1}, {"implicit-inline-templates", &flag_implicit_inline_templates, 1},
{"implicit-templates", &flag_implicit_templates, 1}, {"implicit-templates", &flag_implicit_templates, 1},
{"labels-ok", &flag_labels_ok, 1},
{"ms-extensions", &flag_ms_extensions, 1}, {"ms-extensions", &flag_ms_extensions, 1},
{"nonansi-builtins", &flag_no_nonansi_builtin, 0}, {"nonansi-builtins", &flag_no_nonansi_builtin, 0},
{"operator-names", &flag_operator_names, 1}, {"operator-names", &flag_operator_names, 1},
...@@ -483,10 +474,8 @@ lang_f_options[] = ...@@ -483,10 +474,8 @@ lang_f_options[] =
{"rtti", &flag_rtti, 1}, {"rtti", &flag_rtti, 1},
{"stats", &flag_detailed_statistics, 1}, {"stats", &flag_detailed_statistics, 1},
{"use-cxa-atexit", &flag_use_cxa_atexit, 1}, {"use-cxa-atexit", &flag_use_cxa_atexit, 1},
{"vtable-gc", &flag_vtable_gc, 1},
{"vtable-thunks", &flag_vtable_thunks, 1}, {"vtable-thunks", &flag_vtable_thunks, 1},
{"weak", &flag_weak, 1}, {"weak", &flag_weak, 1}
{"xref", &flag_gnu_xref, 1}
}; };
/* The list of `-f' options that we no longer support. The `-f' /* The list of `-f' options that we no longer support. The `-f'
...@@ -497,10 +486,13 @@ static const char * const unsupported_options[] = { ...@@ -497,10 +486,13 @@ static const char * const unsupported_options[] = {
"cond-mismatch", "cond-mismatch",
"enum-int-equiv", "enum-int-equiv",
"guiding-decls", "guiding-decls",
"labels-ok",
"nonnull-objects", "nonnull-objects",
"squangle", "squangle",
"strict-prototype", "strict-prototype",
"this-is-variable", "this-is-variable",
"vtable-gc",
"xref"
}; };
/* Compare two option strings, pointed two by P1 and P2, for use with /* Compare two option strings, pointed two by P1 and P2, for use with
...@@ -701,8 +693,6 @@ cxx_decode_option (argc, argv) ...@@ -701,8 +693,6 @@ cxx_decode_option (argc, argv)
warn_parentheses = setting; warn_parentheses = setting;
else if (!strcmp (p, "non-virtual-dtor")) else if (!strcmp (p, "non-virtual-dtor"))
warn_nonvdtor = setting; warn_nonvdtor = setting;
else if (!strcmp (p, "extern-inline"))
warn_extern_inline = setting;
else if (!strcmp (p, "reorder")) else if (!strcmp (p, "reorder"))
warn_reorder = setting; warn_reorder = setting;
else if (!strcmp (p, "synth")) else if (!strcmp (p, "synth"))
......
...@@ -182,10 +182,6 @@ hack_identifier (value, name) ...@@ -182,10 +182,6 @@ hack_identifier (value, name)
#endif #endif
} }
} }
if (flag_labels_ok && IDENTIFIER_LABEL_VALUE (name))
{
return IDENTIFIER_LABEL_VALUE (name);
}
return error_mark_node; return error_mark_node;
} }
......
...@@ -701,12 +701,7 @@ see_typename () ...@@ -701,12 +701,7 @@ see_typename ()
if (yychar == IDENTIFIER) if (yychar == IDENTIFIER)
{ {
lastiddecl = lookup_name (yylval.ttype, -2); lastiddecl = lookup_name (yylval.ttype, -2);
if (lastiddecl == 0) if (lastiddecl)
{
if (flag_labels_ok)
lastiddecl = IDENTIFIER_LABEL_VALUE (yylval.ttype);
}
else
yychar = identifier_type (lastiddecl); yychar = identifier_type (lastiddecl);
} }
} }
......
...@@ -1232,6 +1232,17 @@ two definitions were merged. ...@@ -1232,6 +1232,17 @@ two definitions were merged.
This option is no longer useful on most targets, now that support has This option is no longer useful on most targets, now that support has
been added for putting variables into BSS without making them common. 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 @item -fdollars-in-identifiers
Accept @samp{$} in identifiers. You can also explicitly prohibit use of Accept @samp{$} in identifiers. You can also explicitly prohibit use of
@samp{$} with the option @samp{-fno-dollars-in-identifiers}. (GNU C allows @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. ...@@ -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 Disable pedantic warnings about constructs used in MFC, such as implicit
int and getting a pointer to member function via non-standard syntax. 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 @item -fno-operator-names
Do not treat the operator name keywords @code{and}, @code{bitand}, Do not treat the operator name keywords @code{and}, @code{bitand},
@code{bitor}, @code{compl}, @code{not}, @code{or} and @code{xor} as @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 ...@@ -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 exception handling uses the same information, but it will generate it as
needed. 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} @item -ftemplate-depth-@var{n}
Set the maximum instantiation depth for template classes to @var{n}. Set the maximum instantiation depth for template classes to @var{n}.
A limit on the template instantiation depth is needed to detect A limit on the template instantiation depth is needed to detect
...@@ -1379,6 +1399,13 @@ those. ...@@ -1379,6 +1399,13 @@ those.
Like all options that change the ABI, all C++ code, @emph{including Like all options that change the ABI, all C++ code, @emph{including
libgcc.a} must be built with the same setting of this option. 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++ @item -nostdinc++
Do not search for header files in the standard directories specific to Do not search for header files in the standard directories specific to
C++, but do still search the other standard directories. (This option C++, but do still search the other standard directories. (This option
......
// { dg-do compile } // { dg-do compile }
// { dg-options "-fvtable-gc" } // { dg-options "-fvtable-gc" }
// { dg-excess-errors "-fvtable-gc unsupported" { xfail *-*-* } }
// Origin: Hans-Peter Nilsson <hp@bitrange.com> // Origin: Hans-Peter Nilsson <hp@bitrange.com>
class Base0 class Base0
...@@ -118,16 +119,29 @@ void x3 (Multivs1 *ii) { ii->f2();} ...@@ -118,16 +119,29 @@ void x3 (Multivs1 *ii) { ii->f2();}
void x4 (Multiss2 *ii) { ii->f2();} void x4 (Multiss2 *ii) { ii->f2();}
void x5 (Multivv3 *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 { 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 { 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 { 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 { 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 { 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 { 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 { 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 { 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 { 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 { 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 { 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 { 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" } } // { dg-final { scan-assembler-dem vtgc1.C "\.vtable_inherit\[ \t\]*vtable for Base0, 0" } }
// Build don't link: // Build don't link:
// Special g++ Options: -fvtable-gc // Special g++ Options: -fvtable-gc
// Origin: Mark Mitchell <mitchell@codesourcery.com> // Origin: Mark Mitchell <mitchell@codesourcery.com>
// excess errors test - XFAIL *-*-coff *-*-aout *-*-hms mips*-sgi-irix* // excess errors test - XFAIL *-*-*
struct S { struct S {
virtual void f (); virtual void f ();
......
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