This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
OpenACC wait clause
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Cesar Philippidis <cesar at codesourcery dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Tue, 7 Jun 2016 13:13:07 +0200
- Subject: OpenACC wait clause
- Authentication-results: sourceware.org; auth=none
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
Hi!
I've noticed
if ((mask & OMP_CLAUSE_WAIT)
&& !c->wait
&& gfc_match ("wait") == MATCH_YES)
{
c->wait = true;
match_oacc_expr_list (" (", &c->wait_list, false);
continue;
}
which looks just weird and confusing. Why isn't this instead:
if ((mask & OMP_CLAUSE_WAIT)
&& !c->wait
&& (match_oacc_expr_list ("wait (", &c->wait_list, false)
== MATCH_YES))
{
c->wait = true;
continue;
}
? Otherwise you happily accept wait without following (, perhaps even
combined with another clause without any space in between etc.
Jakub