Re: [AD] Problems with gcc 3.1

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


Peter Wang wrote:

> On 11 Oct 2001, salvador <salvador@xxxxxxxxxx> wrote:
> > 2) The "fsqrt" function is a built-in function. I saw this name gives
> > problems for Watcom and SGI too. I suggest renaming it to something
> > like fixsqrt. For it I'm not sending patches because I don't know what
> > exactly is the best.
>
> Maybe rename, and then pull out the static inline trick?
> Something like:
>
> #ifndef ALLEGRO_NO_FIX_ALIASES
>
> static inline fixed fsqrt(fixed x) { return fixsqrt(x); }
> /* and the same thing for fhypot, fcos, fsin, etc. */
>
> #endif
>
> Implementation details would be like for `clear'.

I'm not familiarized with the clear case.
Let me see if I understand the idea: by default the headers define fsqrt as
an alias to fixsqrt. If it generates problems for the user then defining
ALLEGRO_NO_FIX_ALIASES the alias goes away. Right?
My doubt is about who will do it: the user or some conditionals in the
header?
If gcc 3.1 still defining fsqrt when is labeled as stable (and all indicates
that's the case) all the people using gcc will need it.
I know breaking old programs isn't nice. So I think the header itself should
avoid defining fsqrt if the target will collide. Is that what you say?

SET

--
Salvador Eduardo Tropea (SET). (Electronics Engineer)
Visit my home page: http://welcome.to/SetSoft or
http://www.geocities.com/SiliconValley/Vista/6552/
Alternative e-mail: set@xxxxxxxxxx set@xxxxxxxxxx
Address: Curapaligue 2124, Caseros, 3 de Febrero
Buenos Aires, (1678), ARGENTINA Phone: +(5411) 4759 0013





Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/