🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.help
Article #50879

fixincludes problem on Sparc 2 (?), faulty stdio.h (?)

#50879
From: Ted Cox
Date: Thu, 22 Jul 1993 13:06
48 lines
2166 bytes
I have just installed gcc 2.4.5 on my Sparc 2 running sunos 4.1.3.
Everything seemed to go well, but when I compile a simple hello.c
file with
	gcc -Wall -o hello hello.c
I get
	hello.c: In function `main':
	hello.c:5 warning: implicit declaration of function `printf'
	hello.c:5 warning: implicit declaration of function `puts'

The file hello.c is
-----------------
#include <stdio.h>

int main(void)
{
  printf("Hello, world.\n");
  puts("Hello, world.\n");
  
  return(0);
}
-----------------
The compiled program works fine.  But I found that the stdio.h file
that gcc created does not have a printf or sprintf function prototype,
ditto for puts.  I also found this to be the case for gcc installed
on several other suns.  I am worried about these missing, and many
other (!), prototypes.

It seems to me this is a problem.  Can anyone help me out, especially
Sparc 2 users?

Here is a summary of my install procedure, which went smoothly.
    36	configure --target=sparc-sun-sunos4.1.3
    37	make LANGUAGES=c
    38	make stage1
    39	make CC="stage1/xgcc -Bstage1/" CFLAGS="-g -O" LANGUAGES=c
    40	make stage2
    41	rm -rf stage1
    42	make CC="stage2/xgcc -Bstage/" CFLAGS="-g -O" LANGUAGES=c
    43	pwd
    44	make CC="stage2/xgcc -Bstage2/" CFLAGS="-g -O" LANGUAGES=c
    45	make compare
    46	make install CC="stage2/xgcc -Bstage2/" CFLAGS=-g -O" LANGUAGES=c
    47	make install CC="stage2/xgcc -Bstage2/" CFLAGS="-g -O" LANGUAGES=c

Line 46 was just a typo.

Ted Cox
jtcox@gumby.syr.edu
Technical Details
Message-ID: <1993Jul22.090658.2653@newstand.syr.edu>
Path: arc1-ca.pugleaf.net!gmd.de!newsserver.jvnc.net!yale.edu!nigel.msen.com!sdd.hp.com!cs.utexas.edu!uunet!psinntp!newstand.syr.edu!gumby.syr.edu!jtcox

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 11318c,9aa3b27ff1235b06,start
X-Google-Attributes: gid11318c,public
X-Google-ArrivalTime: 1993-07-22 06:29:27 PST
Newsgroups: gnu.gcc.help
Path: arc1-ca.pugleaf.net!gmd.de!newsserver.jvnc.net!yale.edu!nigel.msen.com!sdd.hp.com!cs.utexas.edu!uunet!psinntp!newstand.syr.edu!gumby.syr.edu!jtcox
From: jtcox@gumby.syr.edu (Ted Cox)
Subject: fixincludes problem on Sparc 2 (?), faulty stdio.h (?)
Message-ID: <1993Jul22.090658.2653@newstand.syr.edu>
Keywords: gcc 2.4.5 problem on Sparc 2
Organization: Syracuse University
Date: Thu, 22 Jul 93 09:06:58 EDT
Lines: 50