This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: [PATCH] Cray Pointers
> > > ! if (gfc_option.flag_cray_pointer) /* Need braces, otherwise
> >
> >ambiguous */
> >This comment should be moved inside the conditional, otherwise it looks
> > like it applies to the if. Probably also worth explicitly stating that
> > it's ambiguous with f95 pointer type declarations.
>
> Actually, I was referring to the if: the match() routine is a macro:
>
> #define match(keyword, subr, st) \
> if (match_word(keyword, subr, &old_locus) == MATCH_YES) \
> return st; \
> else \
> undo_new_statement ();
>
> The curly braces are necessary around the if. I'll clarify the
> comment in the code, though.
Better would be to fix the macro implementation so it's not ambiguous. See eg.
SCOPE_LIST_APPEND in c-decl.c for how to do this with do{...} while(0).
Paul