diff options
author | Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org> | 2015-05-23 21:22:18 +0000 |
---|---|---|
committer | Prathamesh Kulkarni <prathamesh3492@gcc.gnu.org> | 2015-05-23 21:22:18 +0000 |
commit | 94cbafd1737a6e0a395e5dabca880ba1b0be10d2 (patch) | |
tree | 14ceffca2b21c0b5c2e41611cea2bde484223553 /gcc/genmatch.c | |
parent | 7f0c6bad05d54493cfbadc70b893cee737930270 (diff) | |
download | gcc-94cbafd1737a6e0a395e5dabca880ba1b0be10d2.zip gcc-94cbafd1737a6e0a395e5dabca880ba1b0be10d2.tar.gz gcc-94cbafd1737a6e0a395e5dabca880ba1b0be10d2.tar.bz2 |
genmatch.c (parser::parse_operation): Reject expanding operator-list inside 'for'.
2015-05-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
* genmatch.c (parser::parse_operation): Reject expanding operator-list inside 'for'.
From-SVN: r223612
Diffstat (limited to 'gcc/genmatch.c')
-rw-r--r-- | gcc/genmatch.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/gcc/genmatch.c b/gcc/genmatch.c index d1cf872..03947ba 100644 --- a/gcc/genmatch.c +++ b/gcc/genmatch.c @@ -2913,7 +2913,12 @@ parser::parse_operation () user_id *p = dyn_cast<user_id *> (op); if (p && p->is_oper_list) - record_operlist (id_tok->src_loc, p); + { + if (active_fors.length() == 0) + record_operlist (id_tok->src_loc, p); + else + fatal_at (id_tok, "operator-list %s cannot be exapnded inside 'for'", id); + } return op; } |