🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.help
Article #626

Function Prototyping Problem

#626
From: Zakir H. Sahul
Date: Sat, 14 Nov 1992 04:02
33 lines
1293 bytes
I have the following problem with using the -Wmissing-prototypes flag:

o All my function prototypes are in header files
o When I have more than one such header file included in the .c file,
  gcc forgets the function prototypes declared in the earlier header files.

  For example:

  #include "function_decl.h"
  #include "memory_func_decl.h"

  main()
  {
   ...

  }

  makes gcc forget the prototypes that are in "function_decl.h".  It gives me a

	warning: no previous prototype for `FunctionName'
	
  But there is a prototype for it in the file "function_decl.h".  If I remove
  the second #include, it does not give me the warning.  

It has been completely frustrating to get this to work.  Could someone PLEASE 
point me in the right direction??

Thanks in advance for all replies.

-Zak
 (sahul@gloworm.stanford.edu)

  
Technical Details
Message-ID: <1992Nov14.040207.29571@EE.Stanford.EDU>
Path: arc1-ca.pugleaf.net!sparky!uunet!charon.amdahl.com!pacbell.com!sgiblab!spool.mu.edu!agate!stanford.edu!EE.Stanford.EDU!loading-zone!sahul

Show Full Headers
Complete Article Headers
Newsgroups: gnu.gcc.help
Path: arc1-ca.pugleaf.net!sparky!uunet!charon.amdahl.com!pacbell.com!sgiblab!spool.mu.edu!agate!stanford.edu!EE.Stanford.EDU!loading-zone!sahul
From: sahul@loading-zone.Stanford.EDU (Zakir H. Sahul)
Subject: Function Prototyping Problem
Message-ID: <1992Nov14.040207.29571@EE.Stanford.EDU>
Sender: sahul@loading-zone (Zakir H. Sahul)
Organization: Stanford University
Date: Sat, 14 Nov 92 04:02:07 GMT
Lines: 33