Re: [AD] Problems with gcc 3.1

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


Peter Wang wrote:

> On 23 Oct 2001, salvador <salvador@xxxxxxxxxx> wrote:
> > 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?
>
> (a) On one hand, I think we should NOT provide the aliasing, unless
> the user explicitly asks for it.  This would be done by #define'ing
> ALLEGRO_FIX_ALIASES before #include'ing allegro.h.  If you want to
> compile an older program, you can simply use gcc -D (or whatever for
> other compilers).

Yes this will be much better for the development team. But is a delicated detail
and I think you should collect opinions from various users.

> (b) On the other hand, the conflicts are kind of rare.  So we should
> rename the f* functions to fix*, but provide aliases by default.  If
> the user really needs to use the libc/m fsqrt (etc) instead of
> Allegro's fsqrt (etc), he can switch off the aliases.  The aliases
> would be static inline functions, so even if you use Allegro's fsqrt
> in one module, you can still use the system's fsqrt in another.  If
> done right, there shouldn't be any warnings or anything.
>
> I'm leaning towards (b) at present.  Five minutes ago I was leaning
> towards (a).  But (b) is better :-)

If you go for (b) just add some mechanism to automagically disable the aliases.
Example: during configure mechanism detect if aliases collide, if that's the case
disable aliases
Another example: some #if (defined(__GNUC__) && __GNUC__>=3) ||
defined(another_case) .... disable.

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/