From: Per Bothner Date: Fri, 25 Aug 1995 23:04:48 +0000 (-0400) Subject: (flag_new_for_scope): Add a new mode that follows ANSI for-scoping, but supports... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=57c0c9cac9b0ed9c6d2fdbddd85dc650c4254d96;p=gcc.git (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 --- diff --git a/gcc/cp/decl2.c b/gcc/cp/decl2.c index 041bdf28466..52055d7d5a0 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.