The expression is not evaluated
. If the converted expression would evaluate to
true
at the point where the assumption appears,
the assumption has no effect
. Otherwise, the behavior is undefined
. [
Note 1:
The use of assumptions is intended to allow implementations
to analyze the form of the expression and
deduce information used to optimize the program
. Implementations are not required to deduce
any information from any particular assumption
. It is expected that the value of
a
has-attribute-expression for the
assume attribute
is
0
if an implementation does not attempt to deduce
any such information from assumptions
. —
end note]
[
Example 1:
int divide_by_32(int x) {
[[assume(x >= 0)]];
return x/32;
}
int f(int y) {
[[assume(++y == 43)]];
return y;
}
—
end example]