Denys Duchier wrote:
> Guido Tack <[EMAIL PROTECTED]> 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
_______________________________________________
Gecode users mailing list
[EMAIL PROTECTED]
https://www.gecode.org/mailman/listinfo/gecode-users