Xref: utzoo gnu.gcc:1217 gnu.g++:572 Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!samsung!think!mintaka!snorkelwacker!paperboy!skeptic!meissner From: meissner@skeptic.osf.org (Michael Meissner) Newsgroups: gnu.gcc,gnu.g++ Subject: Re: slight difference between gcc and g++ in handling "..." Message-ID: <2223@paperboy.OSF.ORG> Date: 21 Dec 89 23:22:05 GMT References: <89Dec20.221311est.27295@snow.white.toronto.edu> Sender: news@OSF.ORG Reply-To: meissner@skeptic.osf.org (Michael Meissner) Distribution: gnu Organization: Open Software Foundation Lines: 20 In article <89Dec20.221311est.27295@snow.white.toronto.edu> ghfeil@white.toronto.edu (Georg Feil) writes: |I've noticed that g++ will accept either | | int printf(const char*, ...); |or | int printf(const char* ...); | |But gcc likes only the first one (with the comma). Any reason for this? |Which is the preferred usage? Basically what happened is C++ came out with the 2nd syntax. The ANSI X3J11 committee decided that they liked prototypes, but that there should be a comma separating the '...' from the other arguments. I was certainly at the meeting when this was changed, but for the life of me, I can't remember why it was changed (it was around the 1st Ft. Lauderdale or the Concord Meetings). C++ version 2.0 added ANSI's syntax, and kept the old syntax as well for backward compatibility. GNU C, being an ANSI C compiler, will only allow the ANSI syntax.