Intel® C++ Compiler
Support and discussions for creating C++ code that runs on platforms based on Intel® processors.

remark #981 - What's wrong here?

rich-kulakowski
Beginner
160 Views

Greetings,

I get the following error

1>D:\Projects\rmkIchP2\idunn\libs\ncd\Mat2p.h(122): remark #981: operands are evaluated in unspecified order
1> F32vec4 df = (v1 - v2)*(v1 - v2);
1> ^
1>

The ^ is actually right under the *. ?? on the font I guess.

v1 and v2 are both F32vec4 with values.

What does this mean? I've got a lot of them and am not sure if they indicate actual ordering problems or what.

Thanks. Rich.

0 Kudos
1 Reply
jamiecook
Beginner
160 Views
I would say that is just some verbosity to point out that you can't be sure whether the first set of brackets before the * will be evaluated first or if the second one will. This would obviously not be a problem in your case but if you had a statement such as
int a = 4;
int b = a * a++;

if the first arg to * is eval first then b would be 16, BUT if a++ was evaluated first then the answer would be 20.
and there is just no way to know which will be eval first according to the standard.

Jamie
Quoting - rich-kulakowski

Greetings,

I get the following error

1>D:ProjectsrmkIchP2idunnlibsncdMat2p.h(122): remark #981: operands are evaluated in unspecified order
1> F32vec4 df = (v1 - v2)*(v1 - v2);
1> ^
1>

The ^ is actually right under the *. ?? on the font I guess.

v1 and v2 are both F32vec4 with values.

What does this mean? I've got a lot of them and am not sure if they indicate actual ordering problems or what.

Thanks. Rich.

Reply