------- Comment #6 from kgardas at objectsecurity dot com 2006-04-02 19:23
-------
After correcting abort(0) to abort() on line 9 I get:
$ /home/karel/usr/local/gcc-trunk-20060331/bin/gcc test.c
test.c: In function 'main':
test.c:9: warning: incompatible implicit declaration of built-in function
'abort'
test.c:11: warning: incompatible implicit declaration of built-in function
'exit'
$ ./a.out
$ ls -la a.out
-rwxr-xr-x 1 karel wheel 6512 Apr 2 21:20 a.out
$ ldd a.out
a.out:
Start End Type Open Ref GrpRef Name
00000000 00000000 exe 1 0 0 a.out
0149b000 214cc000 rlib 0 1 0 /usr/lib/libc.so.39.0
0bb97000 0bb97000 rtld 0 1 0 /usr/libexec/ld.so
$
At least I assumed that I should compile with 4.2, since OpenBSD's 3.3.5
complained with:
$ gcc test.c
test.c:2: warning: `__weakref__' attribute directive ignored
test.c: In function `main':
test.c:9: error: too many arguments to function `abort'
and GCC 4.2 complained about abort in the same way:
$ /home/karel/usr/local/gcc-trunk-20060331/bin/gcc test.c
test.c: In function 'main':
test.c:9: warning: incompatible implicit declaration of built-in function
'abort'
test.c:9: error: too many arguments to function 'abort'
test.c:11: warning: incompatible implicit declaration of built-in function
'exit'
So I hope I've not breaken your test code too much.
Thanks,
Karel
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26966