This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/17573] redefinition of builtin generates error when K&R fn def used
- From: "jsm at polyomino dot org dot uk" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 20 Sep 2004 23:11:34 -0000
- Subject: [Bug c/17573] redefinition of builtin generates error when K&R fn def used
- References: <20040920220021.17573.bowdidge@apple.com>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From jsm at polyomino dot org dot uk 2004-09-20 23:11 -------
Subject: Re: New: redefinition of builtin generates error when
K&R fn def used
On Mon, 20 Sep 2004, bowdidge at apple dot com wrote:
> The following code generates an error if a function is defined in K&R
> style, but not if the function is defined in ANSI C style:
>
> extern float dremf ( float, float );
>
> float
> dremf(x, y)
> float x;
> float y;
> {
> return 1.0;
> }
This seems the same as bug 16666. The code is invalid (prototypes for a
function with an old-style definition must contain the argument types
after default promotions), but is a documented GNU extension.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17573