diff options
-rw-r--r-- | gcc/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/genautomata.c | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 37ba76e1de1..3e70d988201 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2007-05-14 Dave Korn <dave.korn@artimi.com> + + * genautomata.c (gen_regexp_el): Allocate correct size for regexp. + 2007-05-14 Rafael Avila de Espindola <espindola@google.com> * c-common.c (warnings_for_convert_and_check): Use unsigned_type_for diff --git a/gcc/genautomata.c b/gcc/genautomata.c index 26eb281e812..5bfdf96fa43 100644 --- a/gcc/genautomata.c +++ b/gcc/genautomata.c @@ -1542,12 +1542,12 @@ gen_regexp_el (const char *str) } else if (strcmp (str, NOTHING_NAME) == 0) { - regexp = create_node (sizeof (struct decl)); + regexp = create_node (sizeof *regexp); regexp->mode = rm_nothing; } else { - regexp = create_node (sizeof (struct decl)); + regexp = create_node (sizeof *regexp); regexp->mode = rm_unit; REGEXP_UNIT (regexp)->name = str; } |