This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] correct handling of non-constant width and precision (pr 78521)


On Mon, Dec 05, 2016 at 11:25:02AM -0700, Jeff Law wrote:
> >>
> >>Thanks for the heads up!  I just looked at that code yesterday while
> >>analyzing bug 78608, wondering if it was safe.  Now I know it isn't.
> >>I think it might be best to simply hand code the expression instead
> >>of taking a chance on abs.  Let me take care of it today along with
> >>78608.
> >
> >I posted a bigger patch to fix this and other related problems on
> >Friday (https://gcc.gnu.org/ml/gcc-patches/2016-12/msg00262.html).
> >In hindsight, I should have probably committed the fix for this
> >on its own.  Please let me know if this is blocking you and I'll
> >commit this fix by itself today so you don't have to wait for
> >the bigger patch to get reviewed and approved.
> What's the concern with using std::abs?

We already have abs_hwi and absu_hwi where you choose the semantics you
want.  std::abs might not even have the right overload for HWI.

	Jakub


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]