Re: [AD] Problems with gcc 3.1 |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
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...
> 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 know there's the problem with methods, but `fsqrt' is _much_ less
likely to conflict than `clear'. Yes, the problem will disappear with
the prefixed API, but this has to do with keeping 4.0 around forever.