home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / lang / c / 12286 < prev    next >
Encoding:
Internet Message Format  |  1992-08-13  |  996 b 

  1. Path: sparky!uunet!mcsun!news.funet.fi!hydra!klaava!wirzeniu
  2. From: wirzeniu@klaava.Helsinki.FI (Lars Wirzenius)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: Is "...", instead of ",..." legal ?
  5. Keywords: variable arguments
  6. Message-ID: <1992Aug13.171210.5669@klaava.Helsinki.FI>
  7. Date: 13 Aug 92 17:12:10 GMT
  8. References: <1992Aug13.002717.18476@megadata.mega.oz.au>
  9. Organization: University of Helsinki
  10. Lines: 16
  11.  
  12. scott@megadata.mega.oz.au (Scott Humphreys) writes:
  13. >That is - can I legally declare a function with none or many arguments,
  14. >or does it HAVE to have at least one argument. 
  15.  
  16. Not in C, possibly in C++ (I don't know).  In Standard C you must have
  17. at least one argument.  (Pre-ansi C and non-standard C may allow for no
  18. arguments.  I don't recommend doing it.)
  19.  
  20. >This came up because gcc version 2.2.2 let me do it,
  21. >but gave a warning when used with the -pedantic option.
  22.  
  23. The language gcc compiles by default is not standard C, and contains a
  24. lot of extensions.
  25.  
  26. --
  27. Lars.Wirzenius@helsinki.fi
  28.