Re: [AD] Problems with gcc 3.1 |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
On Tue, 30 Oct 2001 21:46:54 +1100 Peter Wang <tjaden@xxxxxxxxxx>
wrote:
> On 29 Oct 2001, salvador <salvador@xxxxxxxxxx> wrote:
> >
> > <---------- test.c program
> > int fsqrt(int a)
> > {
> > return 1;
> > }
> > <----------
> >
> > Command line: "gcc -c test.c"
> >
> > Output from gcc:
> > test.c:2: warning: conflicting types for built-in function `fsqrt'
>
> Does putting "static inline" in front make a difference?
> I suppose it wouldn't...
It solves the problem. The simple use of static also makes gcc silent.
> > I tested "gcc -V 3.01 -c test.c" and worked.
> > I also tested it with 3.0.2 and doesn't affect. So that's a problem with
the
> > 3.1 branch, but I think it is based on some standard and we should avoid
> > future problems.
>
> (*cough* Whoever standardised it should have consulted us first.
> And they should have put a prefix on it. ;-)
>
>
> We may have to resort to macros, like this: (SET: please test)
>
> fixed fixsqrt(fixed x);
>
> #ifndef ALLEGRO_NO_FIX_ALIASES
> #define fsqrt(x) ((fixsqrt)(x))
> #endif
I compiled exfixed.c without problems using it in the Allegro's header.
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