[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bug-gnulib] addition: xsize.h
From: |
Bruno Haible |
Subject: |
Re: [Bug-gnulib] addition: xsize.h |
Date: |
Wed, 19 Nov 2003 16:59:20 +0100 |
User-agent: |
KMail/1.5 |
Paul Eggert wrote:
> > /* Sum of two sizes, with overflow check. */
> > static inline size_t
> > + #if __GNUC__ >= 3
> > + __attribute__ ((__pure__))
> > + #endif
> > xsum (size_t size1, size_t size2)
>
> Why is the __pure__ attribute useful here? After all, since the
> function is inline, GCC can see for itself that it's pure.
Actually, the __pure__ attribute has no effect here - because gcc ignores
it AND is not capable of performing common-subexpression-elimination
with boolean expressions across inline functions.
I'll let in there, nevertheless, in the hope that gcc improves...
Bruno