Re: plugin for reference counting

2024-11-12 Thread David Malcolm via Gcc
On Tue, 2024-11-12 at 16:54 -0500, Aravind Ceyardass via Gcc wrote: > Hello all, > > I have implemented a GCC plugin that instruments code to implement > reference counted memory management instead of manually adding calls > to inc()/dec() reference counts. It is a work in progress. Any > ideas/su

plugin for reference counting

2024-11-12 Thread Aravind Ceyardass via Gcc
Hello all, I have implemented a GCC plugin that instruments code to implement reference counted memory management instead of manually adding calls to inc()/dec() reference counts. It is a work in progress. Any ideas/suggestions are welcome. Code is at https://github.com/acbits/reftrack-plugin

Re: -Wfloat-equal and comparison to zero

2024-11-12 Thread Michael Matz via Gcc
Hello, On Tue, 12 Nov 2024, Sad Clouds via Gcc wrote: > > I don't think this has anything to do with whether one operand of the > > comparison is a constant. It's still the case when comparing with 0.0 > > that it's OK if your algorithm is designed such that the other operand > > is exact, an

Re: -Wfloat-equal and comparison to zero

2024-11-12 Thread Sad Clouds via Gcc
On Tue, 12 Nov 2024 17:25:14 +0100 (CET) Michael Matz wrote: > Other values for the divisor will also produce Inf. If your goal was to > avoid getting Inf, then checking for equality with zero _won't_ do: Yes you are correct, there are many different ways to overflow and underflow a floating p

Re: -Wfloat-equal and comparison to zero

2024-11-12 Thread Marc Glisse via Gcc
On Tue, 12 Nov 2024, David Brown via Gcc wrote: On 12/11/2024 15:29, Sad Clouds via Gcc wrote: On Mon, 11 Nov 2024 21:14:43 + (UTC) Joseph Myers wrote: I don't think this has anything to do with whether one operand of the comparison is a constant. It's still the case when comparing with

Re: -Wfloat-equal and comparison to zero

2024-11-12 Thread Thomas Koenig via Gcc
Am 12.11.24 um 17:25 schrieb Michael Matz via Gcc: If you think of float as approximated reals, then yes, division by zero is undefined (not somewhat undefined!). Depends on how you look at it. IEEE 754-2008, for example, says in 7.3 "The default result of divideByZero shall be an ∞ correctl

Re: -Wfloat-equal and comparison to zero

2024-11-12 Thread David Brown via Gcc
On 12/11/2024 15:29, Sad Clouds via Gcc wrote: On Mon, 11 Nov 2024 21:14:43 + (UTC) Joseph Myers wrote: I don't think this has anything to do with whether one operand of the comparison is a constant. It's still the case when comparing with 0.0 that it's OK if your algorithm is designed su

Re: [RFC] Enabling SVE with offloading to nvptx

2024-11-12 Thread Andrew Stubbs
On 12/11/2024 06:01, Prathamesh Kulkarni via Gcc wrote: -Original Message- From: Jakub Jelinek Sent: 04 November 2024 21:44 To: Prathamesh Kulkarni Cc: Richard Biener ; Richard Biener ; gcc@gcc.gnu.org; Thomas Schwinge Subject: Re: [RFC] Enabling SVE with offloading to nvptx Extern

Re: -Wfloat-equal and comparison to zero

2024-11-12 Thread Sad Clouds via Gcc
On Mon, 11 Nov 2024 21:14:43 + (UTC) Joseph Myers wrote: > I don't think this has anything to do with whether one operand of the > comparison is a constant. It's still the case when comparing with 0.0 > that it's OK if your algorithm is designed such that the other operand is > exact, and

Re: FTP issue

2024-11-12 Thread Jonathan Wakely via Gcc
On Tue, 12 Nov 2024 at 03:19, 王皓冉 via Gcc wrote: > > Dear GCC > > I am running docker to build a GCC image for C++ compile. But the image > call the ftp://ftp.gnu.org/gnu/gcc, may I know the reason for this? Building GCC does not require network access, but maybe you're using somebody else's scri