(flag_new_for_scope): Add a new mode that follows ANSI for-scoping, but supports...
authorPer Bothner <bothner@kalessin.cygnus.com>
Fri, 25 Aug 1995 23:04:48 +0000 (19:04 -0400)
committerRichard Kenner <kenner@gcc.gnu.org>
Fri, 25 Aug 1995 23:04:48 +0000 (19:04 -0400)
(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

gcc/cp/decl2.c

index 041bdf28466aaf40d26dd9c476dfaa28ba49e8e1..52055d7d5a03f43a20c6398c32055757a2068cd5 100644 (file)
@@ -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.