🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

1 total messages Started by Frank P. Bresz Tue, 08 Sep 1992 20:33
Possible Problem with -ansi vs -fno-builtin
#1094
Author: Frank P. Bresz
Date: Tue, 08 Sep 1992 20:33
43 lines
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
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads