[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bug-gnulib] 03-getndelim2-c89.diff
From: |
Bruno Haible |
Subject: |
Re: [Bug-gnulib] 03-getndelim2-c89.diff |
Date: |
Thu, 24 Jul 2003 15:12:23 +0200 |
User-agent: |
KMail/1.5 |
James Youngman wrote:
> I'm not sure that's true :-
> 3 void voidargs1()
> 16 voidargs1('a');
> address@hidden:~$ gcc -Wall -W -g voidargs.c -o voidargs
> [no error message for line 16]
I think that's a bug in gcc. The relevant sections in ISO C 99 are
section 6.9.1 Function definitions
section 6.7.5.3 Function declarators
Citing 6.7.5.3:
(10) The special case of an unnamed parameter of type void as the only
item in the list specifies that the function has no parameters.
(14) An identifier list declares only the identifiers of the parameters
of the function. An empty list in a function declarator that is part
of a definition of that function specifies that the function has
no parameters. The empty list in a function declarator that is not
part of a definition of that function specifies that no information
about the number or types of the parameters is supplied.
So this means that an empty arglist in a function _definition_ is equivalent
to an arglist "(void)".
If Paul Eggert agrees that it's a gcc bug, I'll report it to the gcc people.
Bruno
- Re: [Bug-gnulib] 03-getndelim2-c89.diff, (continued)
- Re: [Bug-gnulib] 03-getndelim2-c89.diff, Derek Robert Price, 2003/07/22
- Re: [Bug-gnulib] 03-getndelim2-c89.diff, Paul Eggert, 2003/07/22
- Re: [Bug-gnulib] 03-getndelim2-c89.diff, Derek Robert Price, 2003/07/22
- Re: [Bug-gnulib] 03-getndelim2-c89.diff, Paul Eggert, 2003/07/22
- Re: [Bug-gnulib] 03-getndelim2-c89.diff, Derek Robert Price, 2003/07/23
- Re: [Bug-gnulib] 03-getndelim2-c89.diff, Bruno Haible, 2003/07/24
- Re: [Bug-gnulib] 03-getndelim2-c89.diff, James Youngman, 2003/07/24
- Re: [Bug-gnulib] 03-getndelim2-c89.diff,
Bruno Haible <=
- Re: [Bug-gnulib] 03-getndelim2-c89.diff, Derek Robert Price, 2003/07/24
- Re: [Bug-gnulib] 03-getndelim2-c89.diff, Tyler Berry, 2003/07/24
- Re: [Bug-gnulib] 03-getndelim2-c89.diff, Paul Eggert, 2003/07/24
- Re: [Bug-gnulib] 03-getndelim2-c89.diff, Derek Robert Price, 2003/07/24
- Re: [Bug-gnulib] 03-getndelim2-c89.diff, Derek Robert Price, 2003/07/24
- Re: [Bug-gnulib] 03-getndelim2-c89.diff, Paul Eggert, 2003/07/24
- Re: [Bug-gnulib] 03-getndelim2-c89.diff, Derek Robert Price, 2003/07/25
- Re: [Bug-gnulib] 03-getndelim2-c89.diff, Bruno Haible, 2003/07/22
- Re: [Bug-gnulib] 03-getndelim2-c89.diff, Derek Robert Price, 2003/07/22
Re: [Bug-gnulib] 03-getndelim2-c89.diff, Derek Robert Price, 2003/07/23