home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / gnu / gcc / help / 2523 < prev    next >
Encoding:
Text File  |  1992-11-14  |  1.2 KB  |  44 lines

  1. Newsgroups: gnu.gcc.help
  2. Path: sparky!uunet!charon.amdahl.com!pacbell.com!sgiblab!spool.mu.edu!agate!stanford.edu!EE.Stanford.EDU!loading-zone!sahul
  3. From: sahul@loading-zone.Stanford.EDU (Zakir H. Sahul)
  4. Subject: Function Prototyping Problem
  5. Message-ID: <1992Nov14.040207.29571@EE.Stanford.EDU>
  6. Sender: sahul@loading-zone (Zakir H. Sahul)
  7. Organization: Stanford University
  8. Date: Sat, 14 Nov 92 04:02:07 GMT
  9. Lines: 33
  10.  
  11. I have the following problem with using the -Wmissing-prototypes flag:
  12.  
  13. o All my function prototypes are in header files
  14. o When I have more than one such header file included in the .c file,
  15.   gcc forgets the function prototypes declared in the earlier header files.
  16.  
  17.   For example:
  18.  
  19.   #include "function_decl.h"
  20.   #include "memory_func_decl.h"
  21.  
  22.   main()
  23.   {
  24.    ...
  25.  
  26.   }
  27.  
  28.   makes gcc forget the prototypes that are in "function_decl.h".  It gives me a
  29.  
  30.     warning: no previous prototype for `FunctionName'
  31.     
  32.   But there is a prototype for it in the file "function_decl.h".  If I remove
  33.   the second #include, it does not give me the warning.  
  34.  
  35. It has been completely frustrating to get this to work.  Could someone PLEASE 
  36. point me in the right direction??
  37.  
  38. Thanks in advance for all replies.
  39.  
  40. -Zak
  41.  (sahul@gloworm.stanford.edu)
  42.  
  43.   
  44.