diff options
author | Per Bothner <bothner@kalessin.cygnus.com> | 1995-08-25 19:04:48 -0400 |
---|---|---|
committer | Richard Kenner <kenner@gcc.gnu.org> | 1995-08-25 19:04:48 -0400 |
commit | 57c0c9cac9b0ed9c6d2fdbddd85dc650c4254d96 (patch) | |
tree | b3c675f02b0ced13c743ad1f591da740532542a0 | |
parent | 2efc92ed68d47041b2c10c558c461e7689cb7a59 (diff) | |
download | gcc-57c0c9cac9b0ed9c6d2fdbddd85dc650c4254d96.zip gcc-57c0c9cac9b0ed9c6d2fdbddd85dc650c4254d96.tar.gz gcc-57c0c9cac9b0ed9c6d2fdbddd85dc650c4254d96.tar.bz2 |
(flag_new_for_scope): Add a new mode that follows ANSI for-scoping, but supports (and warns about) old programs.
(flag_new_for_scope): Add a new mode that follows ANSI
for-scoping, but supports (and warns about) old programs.
Make the new mode (with value 1) the default.
(lang_f_options): The on-value for flag_new_for_scope is now 2.
From-SVN: r10272
-rw-r--r-- | gcc/cp/decl2.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/gcc/cp/decl2.c b/gcc/cp/decl2.c index 041bdf2..52055d7 100644 --- a/gcc/cp/decl2.c +++ b/gcc/cp/decl2.c @@ -362,7 +362,11 @@ int flag_operator_names; int flag_check_new; /* Nonzero if we want the new ANSI rules for pushing a new scope for `for' - initialization variables. Default to on. */ + initialization variables. + 0: Old rules, set by -fno-for-scope. + 2: New ANSI rules, set by -ffor-scope. + 1: Try to implement new ANSI rules, but with backup compatility + (and warnings). This is the default, for now. */ int flag_new_for_scope = 1; @@ -413,7 +417,7 @@ static struct { char *string; int *variable; int on_value;} lang_f_options[] = {"operator-names", &flag_operator_names, 1}, {"check-new", &flag_check_new, 1}, {"repo", &flag_use_repository, 1}, - {"for-scope", &flag_new_for_scope, 1} + {"for-scope", &flag_new_for_scope, 2} }; /* Decode the string P as a language-specific option. |