diff options
author | Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org> | 2015-05-23 19:36:32 +0000 |
---|---|---|
committer | Prathamesh Kulkarni <prathamesh3492@gcc.gnu.org> | 2015-05-23 19:36:32 +0000 |
commit | b78be01498988d08713eaaf3c28c568d33e33db3 (patch) | |
tree | 6986c900c863f2a09e7b47cd9432c5608fbe6ef5 | |
parent | b727ba74fbfb4fd944755de3a1f413d55ee8fbf1 (diff) | |
download | gcc-b78be01498988d08713eaaf3c28c568d33e33db3.zip gcc-b78be01498988d08713eaaf3c28c568d33e33db3.tar.gz gcc-b78be01498988d08713eaaf3c28c568d33e33db3.tar.bz2 |
genmatch.c (parser::parse_operator_list): Check for CPP_CLOSE_PAREN after end of id-list.
2015-05-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
* genmatch.c (parser::parse_operator_list): Check for CPP_CLOSE_PAREN after end of id-list.
From-SVN: r223609
-rw-r--r-- | gcc/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/genmatch.c | 5 |
2 files changed, 9 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 92bb91e..b82d946 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2015-05-23 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org> + + * genmatch.c (parser::parse_operator_list): Check for CPP_CLOSE_PAREN after end of id-list. + 2015-05-22 Jan Hubicka <hubicka@ucw.cz> * tree.c (gimple_canonical_types_compatible_p): Sanity check that diff --git a/gcc/genmatch.c b/gcc/genmatch.c index bca7909..4ea1cc9 100644 --- a/gcc/genmatch.c +++ b/gcc/genmatch.c @@ -3427,6 +3427,11 @@ parser::parse_operator_list (source_location) op->substitutes.safe_push (idb); } + // Check that there is no junk after id-list + token = peek(); + if (token->type != CPP_CLOSE_PAREN) + fatal_at (token, "expected identifier got %s", cpp_type2name (token->type, 0)); + if (op->substitutes.length () == 0) fatal_at (token, "operator-list cannot be empty"); |