Article View: gnu.gcc.bug
Article #934Is "...", instead of ",..." legal ?
From: Scott Humphreys
Date: Thu, 13 Aug 1992 02:27
Date: Thu, 13 Aug 1992 02:27
23 lines
1441 bytes
1441 bytes
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 versxion 1.3) bombed on this construct. Thanks for your time - I trust this isn't a FAQ... [individually cross posted to comp.lang.c as well] -- 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 | /__/__(__(_) (___<__
Technical Details
Message-ID:
<1992Aug13.022751.19646@megadata.mega.oz.au>Path:
arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!megadata.mega.oz.AU!scottShow Full Headers
Complete Article Headers
Newsgroups: gnu.gcc.bug Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!megadata.mega.oz.AU!scott From: scott@megadata.mega.oz.AU (Scott Humphreys) Subject: Is "...", instead of ",..." legal ? Message-ID: <1992Aug13.022751.19646@megadata.mega.oz.au> Keywords: variable arguments Sender: gnulists@ai.mit.edu Organization: Megadata P/L, North Ryde, Sydney, Aust. Distribution: gnu Date: Thu, 13 Aug 1992 02:27:51 GMT Approved: bug-gcc@prep.ai.mit.edu Lines: 24