This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[RFA] Remove obsolete / deprecated cruft
- From: Neil Booth <neil at daikokuya dot co dot uk>
- To: gcc-patches at gcc dot gnu dot org
- Cc: Zack Weinberg <zack at codesourcery dot com>, Stan Shebs <shebs at apple dot com>,Mark Mitchell <mark at codesourcery dot com>
- Date: Tue, 17 Dec 2002 23:42:21 +0000
- Subject: [RFA] Remove obsolete / deprecated cruft
This removes various switches that have been deprecated for more than
a while. Stan, I take it you're OK with the #pragma once? Note that
#import hasn't changed (I'm inclined to un-deprecate it to be honest,
in view of its pervasiveness in Obj-C land.)
Mark, what about -fexternal-templates and falt-external-templates?
They've also been deprecated since at least 3.0. Can we kill those
too? That would get rid of some stuff in cp/.
OK to commit this to 3.4?
Neil.
* c-opts.c (COMMAND_LINE_OPTIONS, c_common_decode_option):
(OPT_fall_virtual, OPT_fenum_int_equiv,
OPT_fguiding_decls, OPT_fhonor_std, OPT_fhuge_objects,
OPT_flabels_ok, OPT_fname_mangling, OPT_fnew_abi,
OPT_fnonnull_objects, OPT_fsquangle, OPT_fstrict_prototype,
OPT_fthis_is_variable, OPT_fvtable_thunks, OPT_fxref): Remove.
(OPT_fcond_mismatch): C only.
* cpplib.c (do_pragma_once): Die.
(_cpp_init_internal_pragmas): Kill #pragma once.
* toplev.c (decode_W_option): Kill -Wid-clash.
* doc/cpp.texi: Update.
Index: c-opts.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/c-opts.c,v
retrieving revision 1.25
diff -u -p -r1.25 c-opts.c
--- c-opts.c 16 Dec 2002 18:19:02 -0000 1.25
+++ c-opts.c 17 Dec 2002 23:31:56 -0000
@@ -192,13 +192,12 @@ static void sanitize_cpp_opts PARAMS ((v
OPT("d", CL_ALL | CL_JOINED, OPT_d) \
OPT("fabi-version=", CL_CXX | CL_JOINED, OPT_fabi_version) \
OPT("faccess-control", CL_CXX, OPT_faccess_control) \
- OPT("fall-virtual", CL_CXX, OPT_fall_virtual) \
OPT("falt-external-templates",CL_CXX, OPT_falt_external_templates) \
OPT("fasm", CL_ALL, OPT_fasm) \
OPT("fbuiltin", CL_ALL, OPT_fbuiltin) \
OPT("fbuiltin-", CL_ALL | CL_JOINED, OPT_fbuiltin_) \
OPT("fcheck-new", CL_CXX, OPT_fcheck_new) \
- OPT("fcond-mismatch", CL_ALL, OPT_fcond_mismatch) \
+ OPT("fcond-mismatch", CL_C, OPT_fcond_mismatch) \
OPT("fconserve-space", CL_CXX, OPT_fconserve_space) \
OPT("fconst-strings", CL_CXX, OPT_fconst_strings) \
OPT("fconstant-string-class=", CL_OBJC | CL_JOINED, \
@@ -208,27 +207,19 @@ static void sanitize_cpp_opts PARAMS ((v
OPT("fdump-", CL_ALL | CL_JOINED, OPT_fdump) \
OPT("felide-constructors", CL_CXX, OPT_felide_constructors) \
OPT("fenforce-eh-specs", CL_CXX, OPT_fenforce_eh_specs) \
- OPT("fenum-int-equiv", CL_CXX, OPT_fenum_int_equiv) \
OPT("fexternal-templates", CL_CXX, OPT_fexternal_templates) \
OPT("ffor-scope", CL_CXX, OPT_ffor_scope) \
OPT("ffreestanding", CL_C, OPT_ffreestanding) \
OPT("fgnu-keywords", CL_CXX, OPT_fgnu_keywords) \
OPT("fgnu-runtime", CL_OBJC, OPT_fgnu_runtime) \
- OPT("fguiding-decls", CL_CXX, OPT_fguiding_decls) \
OPT("fhandle-exceptions", CL_CXX, OPT_fhandle_exceptions) \
- OPT("fhonor-std", CL_CXX, OPT_fhonor_std) \
OPT("fhosted", CL_C, OPT_fhosted) \
- OPT("fhuge-objects", CL_CXX, OPT_fhuge_objects) \
OPT("fimplement-inlines", CL_CXX, OPT_fimplement_inlines) \
OPT("fimplicit-inline-templates", CL_CXX, OPT_fimplicit_inline_templates) \
OPT("fimplicit-templates", CL_CXX, OPT_fimplicit_templates) \
- OPT("flabels-ok", CL_CXX, OPT_flabels_ok) \
OPT("fms-extensions", CL_ALL, OPT_fms_extensions) \
- OPT("fname-mangling-version-",CL_CXX | CL_JOINED, OPT_fname_mangling) \
- OPT("fnew-abi", CL_CXX, OPT_fnew_abi) \
OPT("fnext-runtime", CL_OBJC, OPT_fnext_runtime) \
OPT("fnonansi-builtins", CL_CXX, OPT_fnonansi_builtins) \
- OPT("fnonnull-objects", CL_CXX, OPT_fnonnull_objects) \
OPT("foperator-names", CL_CXX, OPT_foperator_names) \
OPT("foptional-diags", CL_CXX, OPT_foptional_diags) \
OPT("fpermissive", CL_CXX, OPT_fpermissive) \
@@ -241,19 +232,14 @@ static void sanitize_cpp_opts PARAMS ((v
OPT("fshow-column", CL_ALL, OPT_fshow_column) \
OPT("fsigned-bitfields", CL_ALL, OPT_fsigned_bitfields) \
OPT("fsigned-char", CL_ALL, OPT_fsigned_char) \
- OPT("fsquangle", CL_CXX, OPT_fsquangle) \
OPT("fstats", CL_CXX, OPT_fstats) \
- OPT("fstrict-prototype", CL_CXX, OPT_fstrict_prototype) \
OPT("ftabstop=", CL_ALL | CL_JOINED, OPT_ftabstop) \
OPT("ftemplate-depth-", CL_CXX | CL_JOINED, OPT_ftemplate_depth) \
- OPT("fthis-is-variable", CL_CXX, OPT_fthis_is_variable) \
OPT("funsigned-bitfields", CL_ALL, OPT_funsigned_bitfields) \
OPT("funsigned-char", CL_ALL, OPT_funsigned_char) \
OPT("fuse-cxa-atexit", CL_CXX, OPT_fuse_cxa_atexit) \
OPT("fvtable-gc", CL_CXX, OPT_fvtable_gc) \
- OPT("fvtable-thunks", CL_CXX, OPT_fvtable_thunks) \
OPT("fweak", CL_CXX, OPT_fweak) \
- OPT("fxref", CL_CXX, OPT_fxref) \
OPT("gen-decls", CL_OBJC, OPT_gen_decls) \
OPT("lang-asm", CL_C_ONLY, OPT_lang_asm) \
OPT("lang-objc", CL_ALL, OPT_lang_objc) \
@@ -992,28 +978,7 @@ c_common_decode_option (argc, argv)
break;
case OPT_fcond_mismatch:
- if (c_language == clk_c)
- {
- flag_cond_mismatch = on;
- break;
- }
- /* Fall through. */
-
- case OPT_fall_virtual:
- case OPT_fenum_int_equiv:
- case OPT_fguiding_decls:
- case OPT_fhonor_std:
- case OPT_fhuge_objects:
- case OPT_flabels_ok:
- case OPT_fname_mangling:
- case OPT_fnew_abi:
- case OPT_fnonnull_objects:
- case OPT_fsquangle:
- case OPT_fstrict_prototype:
- case OPT_fthis_is_variable:
- case OPT_fvtable_thunks:
- case OPT_fxref:
- warning ("switch \"%s\" is no longer supported", argv[0]);
+ flag_cond_mismatch = on;
break;
case OPT_fabi_version:
Index: cpplib.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cpplib.c,v
retrieving revision 1.327
diff -u -p -r1.327 cpplib.c
--- cpplib.c 16 Dec 2002 18:19:17 -0000 1.327
+++ cpplib.c 17 Dec 2002 23:31:57 -0000
@@ -121,7 +121,6 @@ static struct pragma_entry *lookup_pragm
static struct pragma_entry *insert_pragma_entry
PARAMS ((cpp_reader *, struct pragma_entry **, const cpp_hashnode *,
pragma_cb));
-static void do_pragma_once PARAMS ((cpp_reader *));
static void do_pragma_poison PARAMS ((cpp_reader *));
static void do_pragma_system_header PARAMS ((cpp_reader *));
static void do_pragma_dependency PARAMS ((cpp_reader *));
@@ -1076,9 +1075,6 @@ void
_cpp_init_internal_pragmas (pfile)
cpp_reader *pfile;
{
- /* Pragmas in the global namespace. */
- cpp_register_pragma (pfile, 0, "once", do_pragma_once);
-
/* New GCC-specific pragmas should be put in the GCC namespace. */
cpp_register_pragma (pfile, "GCC", "poison", do_pragma_poison);
cpp_register_pragma (pfile, "GCC", "system_header", do_pragma_system_header);
@@ -1132,21 +1128,6 @@ do_pragma (pfile)
}
pfile->state.prevent_expansion--;
-}
-
-/* Handle #pragma once. */
-static void
-do_pragma_once (pfile)
- cpp_reader *pfile;
-{
- cpp_error (pfile, DL_WARNING, "#pragma once is obsolete");
-
- if (pfile->buffer->prev == NULL)
- cpp_error (pfile, DL_WARNING, "#pragma once in main file");
- else
- _cpp_never_reread (pfile->buffer->inc);
-
- check_eol (pfile);
}
/* Handle #pragma GCC poison, to poison one or more identifiers so
Index: toplev.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/toplev.c,v
retrieving revision 1.691
diff -u -p -r1.691 toplev.c
--- toplev.c 16 Dec 2002 18:19:59 -0000 1.691
+++ toplev.c 17 Dec 2002 23:31:58 -0000
@@ -4068,9 +4068,7 @@ decode_W_option (arg)
}
}
- if ((option_value = skip_leading_substring (arg, "id-clash-")))
- warning ("-Wid-clash-LEN is no longer supported");
- else if ((option_value = skip_leading_substring (arg, "larger-than-")))
+ if ((option_value = skip_leading_substring (arg, "larger-than-")))
{
larger_than_size = read_integral_parameter (option_value, arg - 2, -1);
Index: doc/cpp.texi
===================================================================
RCS file: /cvs/gcc/gcc/gcc/doc/cpp.texi,v
retrieving revision 1.51
diff -u -p -r1.51 cpp.texi
--- doc/cpp.texi 17 Dec 2002 16:47:43 -0000 1.51
+++ doc/cpp.texi 17 Dec 2002 23:32:00 -0000
@@ -3938,15 +3938,6 @@ prevent the file from ever being read ag
@samp{#include}. You should not rely on this; do not use both
@samp{#import} and @samp{#include} to refer to the same header file.
-Another way to prevent a header file from being included more than once
-is with the @samp{#pragma once} directive. If @samp{#pragma once} is
-seen when scanning a header file, that file will never be read again, no
-matter what.
-
-@samp{#pragma once} does not have the problems that @samp{#import} does,
-but it is not recognized by all preprocessors, so you cannot rely on it
-in a portable program.
-
@node Differences from previous versions
@section Differences from previous versions
@cindex differences from previous versions