Commit 57c0c9ca by Per Bothner Committed by Richard Kenner

(flag_new_for_scope): Add a new mode that follows ANSI for-scoping, but supports…

(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
parent 2efc92ed
......@@ -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.
......
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