Hi,

"6.1.6 Vector Literals" of opencl-1.0.33.pdf defines syntax of Vector literals.
But, this syntax conflicts with C99 comma operator.

For example:
"float4 f = (float4)(1.0f, 2.0f, 3.0f, 4.0f);"

This statement is interpreted as:
"float4 f = (1.0f,2.0f,3.0f, (float4)4.0f);"
in C99.


and, according to last example:
"float4 f = (float4)(1.0f, 2.0f); <- error"
this statement should be treated as error.

But, this statement is valid on C99.
This statement is interpreted as:
"float4 f = (1.0f, (float4)2.0f); <- OK"

How should I distinguish "vector literal" from operand of comma operator?


Thanks,