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