home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / lang / c / 11410 < prev    next >
Encoding:
Text File  |  1992-07-21  |  1.1 KB  |  47 lines

  1. Path: sparky!uunet!newsstand.cit.cornell.edu!vax5.cit.cornell.edu!rdw
  2. From: rdw@vax5.cit.cornell.edu
  3. Newsgroups: comp.lang.c
  4. Subject: Error in MS C 6.0 ?
  5. Message-ID: <1992Jul21.175215.13891@vax5.cit.cornell.edu>
  6. Date: 21 Jul 92 17:52:15 EDT
  7. Distribution: comp
  8. Organization: Cornell University
  9. Lines: 36
  10.  
  11. Dear Microsoft 6.0 C programmers:
  12.  
  13.      Has anybody noticed a possible error in the Microsoft C 6.0 compiler in
  14. the way it handles function prototyping?  When passing single-precision float
  15. arguments to a function, I get compilation errors when I try to use the
  16. following together:   
  17. prototyping in the function allusion but 'old-style' argument declarations when
  18. defining the function.
  19.  
  20. For example:
  21.  
  22. extern int func( int a, float x, int b);
  23.  
  24. with
  25. The prototyping works fine when I declare the arguments with the new method:
  26. int func( a, x, b )
  27.      int a, b;
  28.      float x;
  29. {
  30.  
  31.  
  32.  
  33. int func( int a, float x, int b )
  34. {
  35.  
  36. If I use the old method, the compiler gives me a Parameter 2 mismatch error.
  37. Does anybody know what's going on?
  38.  
  39.         Baffled,
  40.  
  41.         Aaron S. Chou
  42.         Cornell University
  43.  
  44.  
  45.  
  46.  
  47.