[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: bug#36370: 27.0.50; XFIXNAT called on negative numbers
From: |
Bruno Haible |
Subject: |
Re: 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
- Re: bug#36370: 27.0.50; XFIXNAT called on negative numbers, Paul Eggert, 2019/06/27
- Re: bug#36370: 27.0.50; XFIXNAT called on negative numbers,
Bruno Haible <=
- Re: bug#36370: 27.0.50; XFIXNAT called on negative numbers, Paul Eggert, 2019/06/27
- Re: bug#36370: 27.0.50; XFIXNAT called on negative numbers, Pip Cet, 2019/06/28
- Re: bug#36370: 27.0.50; XFIXNAT called on negative numbers, Bruno Haible, 2019/06/28
- Re: bug#36370: 27.0.50; XFIXNAT called on negative numbers, Bruno Haible, 2019/06/28
- Re: bug#36370: 27.0.50; XFIXNAT called on negative numbers, Pip Cet, 2019/06/28
- Re: bug#36370: 27.0.50; XFIXNAT called on negative numbers, Paul Eggert, 2019/06/28
- Re: bug#36370: 27.0.50; XFIXNAT called on negative numbers, Pip Cet, 2019/06/28
- Re: bug#36370: 27.0.50; XFIXNAT called on negative numbers, Bruno Haible, 2019/06/28
- Re: bug#36370: 27.0.50; XFIXNAT called on negative numbers, Pip Cet, 2019/06/28
- Re: bug#36370: 27.0.50; XFIXNAT called on negative numbers, Paul Eggert, 2019/06/29