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]
Other format: [Raw text]

[Bug c/17573] redefinition of builtin generates error when K&R fn def used


------- 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


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