summaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorvries <vries@138bc75d-0d04-0410-961f-82ee72b054a4>2013-06-11 22:23:18 +0000
committervries <vries@138bc75d-0d04-0410-961f-82ee72b054a4>2013-06-11 22:23:18 +0000
commit00275eb0bd66728a85dbee58bdb4a7ee88e8a362 (patch)
tree493914c694a05deed33171ddb23960731dce1cfa /gcc
parent99bdcd9d7f2db8937acc35ccf28744304c028ec1 (diff)
downloadgcc-00275eb0bd66728a85dbee58bdb4a7ee88e8a362.tar.gz
Add error message for mismatched parentheses in reservation string
2013-06-11 Tom de Vries <tom@codesourcery.com> * genautomata.c (gen_regexp_sequence): Handle els_num == -1. Handle sequence_vect == NULL. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@199969 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r--gcc/genautomata.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/genautomata.c b/gcc/genautomata.c
index 3665d956db9..add4624ba17 100644
--- a/gcc/genautomata.c
+++ b/gcc/genautomata.c
@@ -1672,6 +1672,10 @@ gen_regexp_sequence (const char *str)
int i;
sequence_vect = get_str_vect (str, &els_num, ',', TRUE);
+ if (els_num == -1)
+ fatal ("unbalanced parentheses in reservation `%s'", str);
+ if (sequence_vect == NULL)
+ fatal ("invalid reservation `%s'", str);
if (els_num > 1)
{
sequence = XCREATENODEVAR (struct regexp, sizeof (struct regexp)