This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: File "test.cc" demonstrating a bug in gcc 2.95 on SCO 5.0.5a
- To: "Yeracaris, Anthony" <Anthony dot Yeracaris at tfn dot com>
- Subject: Re: File "test.cc" demonstrating a bug in gcc 2.95 on SCO 5.0.5a
- From: Alexandre Oliva <oliva at lsd dot ic dot unicamp dot br>
- Date: 06 Jan 2000 20:20:32 -0200
- Cc: "'gcc-bugs at gcc dot gnu dot org'" <gcc-bugs at gcc dot gnu dot org>
- References: <FD5A602E96DCD211BC5100A0C9E57F3F01AC0636@TFSMAMSG8>
On Jan 6, 2000, "Yeracaris, Anthony" <Anthony.Yeracaris@tfn.com> wrote:
> Actually, that's incorrect: the C language specifies that a function
> declared "()" takes any arguments; one uses "(void)" to indicate no
> arguments (see K&R pp. 217-218).
If you're compiling with g++, it doesn't matter what K&R or the
ANSI/ISO C Standard says. You're compiling C++, and, in C++, you
can't declare a function without specifying its argument list. As I
said previously, `extern "C"' doesn't change the language, it just
modifies the *linkage* of declarations. And linkage has nothing to do
with typing.
--
Alexandre Oliva http://www.ic.unicamp.br/~oliva IC-Unicamp, Bra[sz]il
oliva@{lsd.ic.unicamp.br,guarana.{org,com}} aoliva@{acm,computer}.org
oliva@{gnu.org,kaffe.org,{egcs,sourceware}.cygnus.com,samba.org}
** I may forward mail about projects to mailing lists; please use them