[gecode-users] Why are my variables not constrained
Guido Tack
tack at ps.uni-sb.de
Mon Oct 6 15:01:05 CEST 2008
Denys Duchier wrote:
> Guido Tack <tack at ps.uni-sb.de> writes:
>
>> Otherwise, the post statement returns a BoolVar that is constrained
>> to
>> the truth value of the equivalence. Unfortunately, gcc doesn't warn
>> about the ignored return value (I don't know about Microsoft cl)!
>
> you can ask gcc to warn on ignored return values by adding:
>
> __attribute__ ((warn_unused_result))
>
> to the function's prototype.
Right, thanks. I thought -Wall (which includes -Wunused-value) would
detect this, but apparently not for the result of function calls (I
think this is because in ancient C all void functions returned int or
something similarly relevant today...)
Cheers,
Guido
More information about the gecode-users
mailing list