This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: File "test.cc" demonstrating a bug in gcc 2.95 on SCO 5.0.5a


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]