This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [1/6] OpenMP 4.0 C FE support
- From: Jakub Jelinek <jakub at redhat dot com>
- To: "Joseph S. Myers" <joseph at codesourcery dot com>
- Cc: Richard Henderson <rth at redhat dot com>, Torvald Riegel <triegel at redhat dot com>, gcc-patches at gcc dot gnu dot org
- Date: Thu, 10 Oct 2013 20:02:52 +0200
- Subject: Re: [1/6] OpenMP 4.0 C FE support
- Authentication-results: sourceware.org; auth=none
- References: <20131008195240 dot GA30970 at tucnak dot zalov dot cz> <Pine dot LNX dot 4 dot 64 dot 1310101713410 dot 1661 at digraph dot polyomino dot org dot uk>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Thu, Oct 10, 2013 at 05:14:02PM +0000, Joseph S. Myers wrote:
> My only comment is that you change the parameters to
> c_parser_binary_expression, but don't change the comment above that
> function documenting what they are.
Thanks, here is the fix for that:
2013-10-10 Jakub Jelinek <jakub@redhat.com>
* c-parser.c (c_parser_binary_expression): Document omp_atomic_lhs
argument in function comment and drop prec argument description.
--- gcc/c/c-parser.c.jj 2013-10-10 15:51:24.000000000 +0200
+++ gcc/c/c-parser.c 2013-10-10 20:01:09.636262858 +0200
@@ -5638,8 +5638,13 @@ c_parser_conditional_expression (c_parse
/* Parse a binary expression; that is, a logical-OR-expression (C90
6.3.5-6.3.14, C99 6.5.5-6.5.14). If AFTER is not NULL then it is
an Objective-C message expression which is the primary-expression
- starting the expression as an initializer. PREC is the starting
- precedence, usually PREC_NONE.
+ starting the expression as an initializer.
+
+ OMP_ATOMIC_LHS is NULL, unless parsing OpenMP #pragma omp atomic,
+ when it should be the unfolded lhs. In a valid OpenMP source,
+ one of the operands of the toplevel binary expression must be equal
+ to it. In that case, just return a build2 created binary operation
+ rather than result of parser_build_binary_op.
multiplicative-expression:
cast-expression
Jakub