home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c
- Path: sparky!uunet!munnari.oz.au!mel.dit.csiro.au!mineng.dmpe.CSIRO.AU!dmssyd.syd.dms.CSIRO.AU!megadata!scott
- From: scott@megadata.mega.oz.au (Scott Humphreys)
- Subject: Is "...", instead of ",..." legal ?
- Message-ID: <1992Aug13.002717.18476@megadata.mega.oz.au>
- Keywords: variable arguments
- Sender: news@megadata.mega.oz.au
- Organization: Megadata P/L, North Ryde, Sydney, Aust.
- Date: Thu, 13 Aug 1992 00:27:17 GMT
- Lines: 23
-
- In various books describing the expansion to ANSI-C,
- one of the differences is described as the inclusion
- of the ",..." operator for function prototypes
- [ meaning that a variable number of arguments follow-
- e.g. int printf (const char *, ...); ]
-
- My question is: is this legal : int foo (...);
-
- That is - can I legally declare a function
- with none or many arguments, or does it HAVE to have
- at least one argument.
-
- This came up because gcc version 2.2.2 let me do it,
- but gave a warning when used with the -pedantic option.
- Another tool I used (gnu GCT version 1.3) bombed on this construct.
-
- Thanks for your time - I trust this isn't a FAQ...
- [cross-posted to comp.lang.c - my mailer means I have to do it individually].
- --
- Dad to Jill (6), Hugh (3), Rhett (1), ? (find out in Dec).
- email: scott@megadata.mega.oz.au | /\ _/_ _/_
- fax: (Int'l +61) (02) 887-4847 | / ) _. ____/ /
- voice: (Int'l +61) (02) 805-0899 | /__/__(__(_) (___<__
-