[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: ntohl a macro?



> All of the other archs(well, little endian ones) seem to treat this as a
> function and do the float->int cast, yet ia-64 seems to have this call

Are you sure?

tausq@gluck:~$ uname -a
Linux gluck 2.4.19-rc2 #1 SMP Sat Jul 27 19:16:01 EDT 2002 i686 unknown
tausq@gluck:~$ gcc -v
Reading specs from /usr/lib/gcc-lib/i386-linux/2.95.4/specs
gcc version 2.95.4 20011002 (Debian prerelease)
tausq@gluck:~$ cat f.c
#include <netinet/in.h>

int main(int argc, char **argv)
{
    float f = argc;

    return ntohl(f);
}
tausq@gluck:~$ gcc -O2 -c f.c
f.c: In function `main':
f.c:7: invalid operands to binary &
f.c:7: invalid operands to binary &
f.c:7: invalid operands to binary &
f.c:7: invalid operands to binary &

SuSv3 specially mentions that ntonl may be implemented as a macro...

randolph
-- 
Randolph Chung
Debian GNU/Linux Developer, hppa/ia64 ports
http://www.tausq.org/

Attachment: pgpGw7kly5YiU.pgp
Description: PGP signature


Reply to: