diff options
Diffstat (limited to 'gcc/fortran/parse.c')
-rw-r--r-- | gcc/fortran/parse.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/gcc/fortran/parse.c b/gcc/fortran/parse.c index 2894e50..9c404d5 100644 --- a/gcc/fortran/parse.c +++ b/gcc/fortran/parse.c @@ -75,13 +75,16 @@ match_word (const char *str, match (*subr) (void), locus * old_locus) /* Figure out what the next statement is, (mostly) regardless of - proper ordering. */ + proper ordering. The do...while(0) is there to prevent if/else + ambiguity. */ #define match(keyword, subr, st) \ - if (match_word(keyword, subr, &old_locus) == MATCH_YES) \ - return st; \ - else \ - undo_new_statement (); + do { \ + if (match_word(keyword, subr, &old_locus) == MATCH_YES) \ + return st; \ + else \ + undo_new_statement (); \ + } while (0); static gfc_statement decode_statement (void) |