🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

1 total messages Started by Scott Humphreys Thu, 13 Aug 1992 02:27
Is "...", instead of ",..." legal ?
#934
Author: Scott Humphreys
Date: Thu, 13 Aug 1992 02:27
23 lines
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 |      /__/__(__(_) (___<__  
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads