🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.bug
Article #2566

Re: gcc 1.35 conflicting types message?

#2566
From: David Keppel
Date: Fri, 05 May 1989 19:00
36 lines
1634 bytes
An answer and a question:

ado@elsie.UUCP (Arthur David Olson) writes: (paraphrased)
>gcc v. 1.35 generates a "conflicting types" message
>and refuses to compile when confronted with code such as. . .
>
>	extern int	whatever();
>	extern int	whatever(char * format, ...);

You can generate old and new-style functions declarations by doing
something like

    #ifdef __STDC__
	#define PROTO(x)	x
    #else
	#define PROTO(x)	()
    #endif

    extern int	whatever PROTO((char *format, ...));

Now the question:  I have asserted several times that you cannot
(portably) call between prototyped and non-prototyped code.  Thus, if
a library is compiled without prototypes, you can call it where a
prototyped declaration is in scope.  Similarly, if the thing (library)
was compiled with prototypes, it cannot be called from code that does
not have prototypes in scope.

Thus, the above macros (based on using __STDC__) are broke if you ever
use them to call across compiler types.

Yes?  No?  Maybe so?

	;-D on  ( Your local dime store philosipher )  Pardo
-- 
		    pardo@cs.washington.edu
    {rutgers,cornell,ucsd,ubc-cs,tektronix}!uw-beaver!june!pardo
Technical Details
Message-ID: <8124@june.cs.washington.edu>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cornell!uw-beaver!uw-june!pardo
References: <9101@elsie.UUCP>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cornell!uw-beaver!uw-june!pardo
From: pardo@june.cs.washington.edu (David Keppel)
Newsgroups: gnu.gcc.bug,gnu.gcc,comp.std.c
Subject: Re: gcc 1.35 conflicting types message?
Message-ID: <8124@june.cs.washington.edu>
Date: 5 May 89 19:00:41 GMT
References: <9101@elsie.UUCP>
Reply-To: pardo@uw-june.UUCP (David Keppel)
Organization: U of Washington, Computer Science, Seattle
Lines: 36