This is the mail archive of the gcc@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: FLT_ROUNDS not always 1?


Richard Henderson wrote:
> 
> On Mon, Feb 25, 2002 at 08:39:45PM -0800, Stan Shebs wrote:
> > Is it really the case that for all GCC targets, fesetround() is
> > a no-op that always returns 1?
> 
> No, it is not.
> 
> > Or is it just that systems that implement fesetround need to have
> > their own config/float-foo.h that defines FLT_ROUNDS in a non-constant
> > way, and no one has done this correctly yet?
> 
> Correct.
> 
> Actually, it would be trivial to add one that uses fegetround,
> which will work everywhere that actually has fesetround.

That's what I thought too, why is why it seemed odd that none
of the float-*.h had been touched.

> Frankly I think it's silly that FLT_ROUNDS exists at all,
> since it must represent the execution time state of rounding.

A leftover from C89, I guess.

Stan


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