bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#36370: 27.0.50; XFIXNAT called on negative numbers


From: Bruno Haible
Subject: bug#36370: 27.0.50; XFIXNAT called on negative numbers
Date: Fri, 28 Jun 2019 01:45:11 +0200
User-agent: KMail/5.1.3 (Linux/4.4.0-151-generic; KDE/5.18.0; x86_64; ; )

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

[Prev in Thread] Current Thread [Next in Thread]