This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Patch to document non-support for -fcond-mismatch for C++
- To: <gcc-patches at gcc dot gnu dot org>
- Subject: Patch to document non-support for -fcond-mismatch for C++
- From: "Joseph S. Myers" <jsm28 at cam dot ac dot uk>
- Date: Fri, 5 Jan 2001 18:39:44 +0000 (GMT)
When looking at the many C/C++ common options that ought to go in
c-common.[ch] (even if the implementation is separate for the front
ends, I think it is worthwhile to put the flag variable in common code
where the meaning of the flag is the same, and initialise it in
lang_init_options if different values are needed in the different
front ends), I noticed that -fcond-mismatch now has no effect in the
C++ front end. Accordingly, this patch makes it explicitly
unsupported for C++.
Bootstrapped with no regressions on i686-pc-linux-gnu. OK to commit?
2001-01-05 Joseph S. Myers <jsm28@cam.ac.uk>
* invoke.texi: Document that -fcond-mismatch isn't supported for
C++.
2001-01-05 Joseph S. Myers <jsm28@cam.ac.uk>
* cp-tree.h (flag_cond_mismatch): Don't declare.
* decl2.c (flag_cond_mismatch): Don't define.
(lang_f_options): Remove cond-mismatch.
(unsupported_options): Add cond-mismatch.
--- invoke.texi.orig Wed Jan 3 18:58:45 2001
+++ invoke.texi Fri Jan 5 12:08:12 2001
@@ -1061,7 +1061,8 @@
@item -fcond-mismatch
Allow conditional expressions with mismatched types in the second and
-third arguments. The value of such an expression is void.
+third arguments. The value of such an expression is void. This option
+is not supported for C++.
@item -funsigned-char
Let the type @code{char} be unsigned, like @code{unsigned char}.
--- cp/cp-tree.h.orig Thu Jan 4 23:32:31 2001
+++ cp/cp-tree.h Fri Jan 5 12:06:09 2001
@@ -990,11 +990,6 @@
extern int dollars_in_ident;
-/* Nonzero means allow type mismatches in conditional expressions;
- just make their values `void'. */
-
-extern int flag_cond_mismatch;
-
/* Nonzero means don't recognize the keyword `asm'. */
extern int flag_no_asm;
--- cp/decl2.c.orig Thu Jan 4 23:32:02 2001
+++ cp/decl2.c Fri Jan 5 12:09:08 2001
@@ -139,11 +139,6 @@ static tree decl_namespace_list;
/* C (and C++) language-specific option variables. */
-/* Nonzero means allow type mismatches in conditional expressions;
- just make their values `void'. */
-
-int flag_cond_mismatch;
-
/* Nonzero means don't recognize the keyword `asm'. */
int flag_no_asm;
@@ -492,7 +487,6 @@ lang_f_options[] =
{"short-enums", &flag_short_enums, 1},
{"short-double", &flag_short_double, 1},
{"short-wchar", &flag_short_wchar, 1},
- {"cond-mismatch", &flag_cond_mismatch, 1},
{"asm", &flag_no_asm, 0},
{"builtin", &flag_no_builtin, 0},
@@ -536,6 +530,7 @@ lang_f_options[] =
listed here. This table must be kept in alphabetical order. */
static const char * const unsupported_options[] = {
"all-virtual",
+ "cond-mismatch",
"enum-int-equiv",
"guiding-decls",
"nonnull-objects",
--
Joseph S. Myers
jsm28@cam.ac.uk