http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57489

--- Comment #3 from Jim Hand <jhand at austin dot rr.com> ---
Thanks Marc, that seems to allow the code to work properly. One thing that is
somewhat troubling, even though the code seems to work properly with the
parenthesis, is that changing the following without the parenthesis:

   if (expected_v != actual_v || expected_i != actual_i) {

to just the following:

   if (expected_v != actual_v) {

prevents the printf() from being called. Also having the following prevents the
printf() from being called:

   if (expected_t != actual_i) {

I would agree that the the missing parenthesis results in some undefined
behavior, but it also looks like the compiler isn't behaving in a predictable
manner. Perhaps a compiler warning could be useful in this situation, but
nothing seems to be generated with the -Wall flag.

Reply via email to