bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-gnulib] 03-getndelim2-c89.diff


From: Tyler Berry
Subject: Re: [Bug-gnulib] 03-getndelim2-c89.diff
Date: Thu, 24 Jul 2003 18:42:10 -0600
User-agent: Mutt/1.4.1i

On Thu, Jul 24, 2003 at 09:52:55AM -0400, Derek Robert Price wrote:
> Bruno Haible wrote:
>
> >So this means that an empty arglist in a function _definition_ is
> >equivalent
> >
> >to an arglist "(void)".
>
> Even if it is a gcc bug, as long as the (void) means the same thing and
> thus shouldn't hurt with other compilers according to the C89 spec,
> perhaps GNULIB should cater to the bug until it has been fixed in gcc
> for awhile.

First of all, hi everybody, I've been reading the list for a couple days now in
the background; I've been using Gnulib in my packages and joined the list with
the advent of regular internet to help its growth.

Second a small excerpt from the C Programming Langage, Second Edition (the ANSI
C update), page 72:

... Furthermore, if a function declaration does not include arguments, as in

   double atof();

that too is taken to mean that nothing is to be assumed about the arguments of
atof; all parameter checking is turned off. ... it's a bad idea to use it with
new programs. If the function takes arguments, declare them; if it takes no
arguments, use void.

Bruno's quote is correct as far as C99 goes; for C89 compatibility, there's a
difference, albeit one that's unlikely to come up in practice.

Pleased to make your acquaintance,

-- 
Tyler Berry

Attachment: pgp6c1BinaPT9.pgp
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]