https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91092

--- Comment #14 from Florian Weimer <fw at gcc dot gnu.org> ---
(In reply to Vincent Lefèvre from comment #13)
> By "implicit function declarations", does this include K&R style
> declarations?

No, there is nothing implicit about them.

> I've found out a few days ago that GMP still uses K&R style declarations,
> and that's in a configure script. The issue is that there is a potential
> type mismatch between the caller (long) and the callee (unsigned int), and
> GCC fails to generate "correct" code in such a case.

GNU CC has supported an extension for many, many years where a K&R function
*definition* with a prior function prototype in scope behaves exactly as a
prototype-style function definition.  (On some targets, the two have
substantially different ABIs, beyond how parameters are handled.)

Since the GMP headers use prototypes (they have to, otherwise they would not be
compatible with C++ compilers), GMP necessarily relies on this extension today.

But that really hasn't got to do any with implicit function declarations.

Reply via email to