🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.bug
Article #2618

Re: gcc 1.35 conflicting types message?

#2618
From: Arthur David Olson
Date: Thu, 11 May 1989 21:12
51 lines
2049 bytes
Thanks to everyone who replied to my question about gcc 1.35 flagging
	extern int	whatever();
and
	extern int	whatever(char * format, ...);
as having conflicting types.  The consensus is that while the presence of a
"traditional"
	extern int	whatever();
declaration tells a conforming compiler/interpreter nothing about the
parameters of the function "whatever", it *does* represent a guarantee to
the compiler/interpreter that "whatever" takes some fixed number of arguments.

Folks interested in using gcc to compile X Window System applications may wish
to make the attached change to their "fixincludes" script.
-- 
		      Space:  Canada, 0 tries ever.
	Arthur David Olson    ado@ncifcrf.gov    ADO is a trademark of Ampex.

*** 1.5/fixincludes	Thu May 11 17:02:28 1989
--- 1.6/fixincludes	Thu May 11 17:02:28 1989
***************
*** 78,83 ****
--- 78,106 ----
  EOF
  fi
  
+ # Deal with yet another challenge, this in X11/Xmu.h
+ file=X11/Xmu.h
+ if [ -r $file ]; then
+   if [ ! -r ${LIB}/$file ]; then
+     mkdir ${LIB}/X11 2>&-
+     cp $file ${LIB}/$file >/dev/null 2>&1	\
+     || echo "Can't copy $file"
+     chmod +w ${LIB}/$file
+   fi
+ fi
+ 
+ if [ -r ${LIB}/$file ]; then
+   echo Fixing $file sprintf declaration
+   ex ${LIB}/$file <<EOF
+   /^extern char \*	sprintf();$/c
+ #ifndef __STDC__
+ extern char *	sprintf();
+ #endif /* !defined __STDC__ */
+ .
+   wq
+ EOF
+ fi
+ 
  echo 'Removing unneeded directories:'
  cd $LIB
  files=`find . -type d -print | sort -r`
Technical Details
Message-ID: <9104@elsie.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!cs.utexas.edu!uunet!nih-csl!elsie!ado
References: <9101@elsie.UUCP> <8124@june.cs.washington.edu> <2867@cps3xx.UUCP> <8141@june.cs.washington.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!cs.utexas.edu!uunet!nih-csl!elsie!ado
From: ado@elsie.UUCP (Arthur David Olson)
Newsgroups: gnu.gcc.bug,gnu.gcc,comp.std.c,comp.windows.x
Subject: Re: gcc 1.35 conflicting types message?
Message-ID: <9104@elsie.UUCP>
Date: 11 May 89 21:12:08 GMT
References: <9101@elsie.UUCP> <8124@june.cs.washington.edu> <2867@cps3xx.UUCP> <8141@june.cs.washington.edu>
Followup-To: poster
Organization: NIH-LEC, Bethesda, MD
Lines: 51