Article View: gnu.gcc.bug
Article #1094Possible Problem with -ansi vs -fno-builtin
From: Frank P. Bresz
Date: Tue, 08 Sep 1992 20:33
Date: Tue, 08 Sep 1992 20:33
43 lines
2173 bytes
2173 bytes
GCC version 2.2.2 just built from UUnet sources, On a Sun4 SunOS 4.1.1 I
noticed the following, minor problem, which is of course because sun has
old style <stdlib.h> but there does appear to be some problem with switches
that I am not good enough with gcc yet to figure out.
According to the man page
-fno-builtin
(Ignored for C++.) Don't recognize non-ANSI built-in
functions. `-ansi' also has this effect. Currently,
the only function affected is alloca.
It would seem that it also affects abort and exit.
fpb(kkl)@ittc:libw_gp 374==>cat f.c
#include <stdlib.h>
fpb(kkl)@ittc:libw_gp 375==>gcc -c f.c
In file included from f.c:1:
/usr/include/stdlib.h:18: conflicting types for `abort'
<built-in>:0: previous declaration of `abort'
/usr/include/stdlib.h:26: conflicting types for `exit'
<built-in>:0: previous declaration of `exit'
fpb(kkl)@ittc:libw_gp 376==>gcc -ansi -c f.c
In file included from f.c:1:
/usr/include/stdlib.h:18: conflicting types for `abort'
<built-in>:0: previous declaration of `abort'
/usr/include/stdlib.h:26: conflicting types for `exit'
<built-in>:0: previous declaration of `exit'
fpb(kkl)@ittc:libw_gp 377==>gcc -fno-builtin -c f.c
I care not that gcc without any switches complains about this (I
agree it should) since it points me at nonsensical (not doing anything ANSI
in the standard .h files) things Sun has done. Nor do I mind that I needed
to type -fno-builtin to get it to work (I can live with this). The only
minor problem I have is that it claims that -ansi should also have this
affect and as you can see from the above it doesn't. No big deal just
thought I'd let you know.
Frank P. Bresz }*{
ITTC Network Administrator
Technical Details
Message-ID:
<9209082033.AA03203@ittc.wec.com>Path:
arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!ittc.wec.COM!fpbShow Full Headers
Complete Article Headers
Newsgroups: gnu.gcc.bug Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!ittc.wec.COM!fpb From: fpb@ittc.wec.COM (Frank P. Bresz) Subject: Possible Problem with -ansi vs -fno-builtin Message-ID: <9209082033.AA03203@ittc.wec.com> Sender: gnulists@ai.mit.edu Organization: Westinghouse, ITTC, Pgh, PA. Distribution: gnu Date: Tue, 8 Sep 1992 20:33:14 GMT Approved: bug-gcc@prep.ai.mit.edu Lines: 44