home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / std / c / 2482 < prev    next >
Encoding:
Internet Message Format  |  1992-08-19  |  2.1 KB

  1. Path: sparky!uunet!dtix!darwin.sura.net!convex!news.utdallas.edu!corpgate!crchh327!davisonj
  2. From: davisonj@bnr.ca (John Davison)
  3. Newsgroups: comp.std.c
  4. Subject: Re: mixing prototyping and non-prototyping
  5. Message-ID: <1992Aug20.044426.19417@bnr.ca>
  6. Date: 20 Aug 92 04:44:26 GMT
  7. References: <spuler.713749345@coral.cs.jcu.edu.au> <28616@vedge.UUCP>
  8. Sender: news@bnr.ca (News on crchh327)
  9. Organization: Bell-Northern Research, Richardson, Tx.
  10. Lines: 44
  11. Nntp-Posting-Host: crchh7ab
  12.  
  13.  
  14. In article <28616@vedge.UUCP> hendrik@vedge.UUCP (Hendrik Boom) writes:
  15. >Here's my standard handout on this subject:
  16. ...
  17. >Please comment,
  18. >especially if you detect errors in my interpretation.
  19. >Any and all of a function
  20. >definition, declaration, and call may contain information
  21. >about the argument types, with varying significan[c]e.
  22. ...
  23. >ANSI defines the old-stype functions to worl [sic] as follows.
  24. ...
  25. >The old-style rules apply whenever a function has neither
  26. >been declared with prototype syntax
  27. >nor been defined with new-style syntax.
  28.  
  29. >To make this work at least some of the time,
  30. >a function defined using old-style syntax,
  31. >will expect its parameters to have been converted
  32. >using the standard argument promotion rules.
  33. >
  34. >A function with a single real argument, such as
  35. >    f(r)real r;{    }
  36.  
  37.         You did not define "real".
  38.  
  39. >(a)    Include parameters in function declarations
  40. >    conditional on the absence of _NO_PROTO.
  41. ...
  42. >Its use is not dictated or mentioned by the ANSI standard.
  43.  
  44.     To determine if a compiler is Standard C, the existence and value (should
  45. be 1 in standard C) of __STDC__ should be checked.
  46.  
  47.         You may also want to employ the "#error" preprocessor directive to yell
  48. at you if the configuration of compiler-supplied macros, values, etc. is such
  49. that your program will not run and/or compile correctly without modification.
  50.  
  51.  
  52. -- 
  53. NOTE: I CAN'T SEND/RECEIVE E-MAIL HERE!!!  Use --> davisonj@ecn.purdue.edu <--
  54.       During (roughly) August 20-25, I will be in transit.  Please be patient.
  55.       The opinions and other information contained herein are not necessarily
  56.       representative of Northern Telecom or any of its subsidiaries. 
  57.