This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PING: Fwd: Re: [patch] implement Cilk Plus simd loops on trunk


On 10/16/2013 01:48 PM, Aldy Hernandez wrote:
On 10/02/13 16:53, Jason Merrill wrote:

Can't the step size be a value-dependent expression like a template
non-type parameter?

Jason, I'm not sure.  The standard says:

     "The conditional-expression in a simd-linear-step shall either
     satisfy the requirements of an integer constant expression, or
     be a reference to a variable with integer type."

I take this to mean, an integral expression or a plain old variable.  Is
this the case, Balaji?

Right.  An integral constant expression can be value-dependent.

If this is what you're asking, and the above standardeese allows it,
then we have a problem, because the code parsing the "j" in the linear
clause uses cp_parser_id_expression() which gets horrendously confused
with the colon, expecting a '::'.

Sounds like you need to turn off parser->colon_corrects_to_scope_p when parsing the pragma arguments.

Jason


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]