Hi Paul,

> I'll CC: this to bug-gnulib since it's a Gnulib issue. I have not 
> installed this patch into Gnulib on savannah.

Can you please show an example code on which the change makes a difference?

I used this test program

==================================== foo.c ====================================
#include <stdio.h>

//#define assume(R) ((R) ? (void) 0 : __builtin_unreachable ())
#define assume(R) (!__builtin_constant_p (!(R) == !(R)) || (R) ? (void) 0 : 
__builtin_unreachable ())

int f_generic (int i)
{
  printf("%d\n", i & 0x80000000);
  return 0;
}

int f_condition (int i)
{
  if (i >= 0)
    printf("%d\n", i & 0x80000000);
  return 0;
}

int f_assume (int i)
{
  assume (i >= 0);
  printf("%d\n", i & 0x80000000);
  return 0;
}
===============================================================================

$ gcc -O2 -m32 -S foo.c && fgrep -v .cfi foo.s

and the code is the same, regardless of which definition of 'assume' I enable.

Bruno


Reply via email to