aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorVille Voutilainen <ville.voutilainen@gmail.com>2015-10-31 21:42:01 +0200
committerVille Voutilainen <ville@gcc.gnu.org>2015-10-31 21:42:01 +0200
commitffea5536df746f1863a67306dcd5df98a61a4595 (patch)
tree1bf638fea3b774111d36f3a3ec5d724cd57009f2 /gcc
parentd057afcdca7fedd93f85a7f2e8af06ed156c51bf (diff)
downloadgcc-ffea5536df746f1863a67306dcd5df98a61a4595.zip
gcc-ffea5536df746f1863a67306dcd5df98a61a4595.tar.gz
gcc-ffea5536df746f1863a67306dcd5df98a61a4595.tar.bz2
Remove support for N3994, terse range-for, which was not adopted.
/cp 2015-10-31 Ville Voutilainen <ville.voutilainen@gmail.com> Remove the implementation of N3994, terse range-for loops. * parser.c (cp_parser_for_init_statement): Remove the parsing of a terse range-for. /testsuite 2015-10-31 Ville Voutilainen <ville.voutilainen@gmail.com> Remove the implementation of N3994, terse range-for loops. * g++.dg/cpp1z/range-for1.C: Remove. From-SVN: r229632
Diffstat (limited to 'gcc')
-rw-r--r--gcc/cp/ChangeLog6
-rw-r--r--gcc/cp/parser.c16
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/g++.dg/cpp1z/range-for1.C12
4 files changed, 11 insertions, 28 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index d283cbe..ad7087e 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,9 @@
+2015-10-31 Ville Voutilainen <ville.voutilainen@gmail.com>
+
+ Remove the implementation of N3994, terse range-for loops.
+ * parser.c (cp_parser_for_init_statement): Remove the parsing
+ of a terse range-for.
+
2015-10-31 Jason Merrill <jason@redhat.com>
Implement multiple 'auto' feature from Concepts TS.
diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c
index 19e306d..24cb47f 100644
--- a/gcc/cp/parser.c
+++ b/gcc/cp/parser.c
@@ -11279,22 +11279,6 @@ cp_parser_for_init_statement (cp_parser* parser, tree *decl)
bool is_range_for = false;
bool saved_colon_corrects_to_scope_p = parser->colon_corrects_to_scope_p;
- if (cp_lexer_next_token_is (parser->lexer, CPP_NAME)
- && cp_lexer_nth_token_is (parser->lexer, 2, CPP_COLON))
- {
- /* N3994 -- for (id : init) ... */
- if (cxx_dialect < cxx1z)
- pedwarn (input_location, 0, "range-based for loop without a "
- "type-specifier only available with "
- "-std=c++1z or -std=gnu++1z");
- tree name = cp_parser_identifier (parser);
- tree type = cp_build_reference_type (make_auto (), /*rval*/true);
- *decl = build_decl (input_location, VAR_DECL, name, type);
- pushdecl (*decl);
- cp_lexer_consume_token (parser->lexer);
- return true;
- }
-
/* A colon is used in range-based for. */
parser->colon_corrects_to_scope_p = false;
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index d6956cf..0034ef2 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2015-10-31 Ville Voutilainen <ville.voutilainen@gmail.com>
+
+ Remove the implementation of N3994, terse range-for loops.
+ * g++.dg/cpp1z/range-for1.C: Remove.
+
2015-10-31 Eric Botcazou <ebotcazou@adacore.com>
* gnat.dg/discr45.adb: New test.
diff --git a/gcc/testsuite/g++.dg/cpp1z/range-for1.C b/gcc/testsuite/g++.dg/cpp1z/range-for1.C
deleted file mode 100644
index 7e6d055..0000000
--- a/gcc/testsuite/g++.dg/cpp1z/range-for1.C
+++ /dev/null
@@ -1,12 +0,0 @@
-// { dg-options "-std=c++1z -pedantic-errors" }
-
-extern "C" int printf (const char *, ...);
-#include <initializer_list>
-
-int main()
-{
- for (i : {1,2})
- {
- printf ("%d ", i);
- }
-}