[PATCH] PR libgcc/83112, Fix warnings on libgcc float128-ifunc.c

Andreas Schwab schwab@suse.de
Tue Dec 12 17:18:00 GMT 2017


On Dez 12 2017, Segher Boessenkool <segher@kernel.crashing.org> wrote:

> On Mon, Dec 11, 2017 at 03:57:51PM -0500, Michael Meissner wrote:
>> > > +extern KCtype __divkc3 (KFtype, KFtype, KFtype, KFtype);
>> > > +
>> > >  KCtype
>> > >  __divkc3 (KFtype a, KFtype b, KFtype c, KFtype d)
>> > >  {
>> > 
>> > How does this warn?  -Wmissing-declarations?  Should this declaration be
>> > in a header then?
>> 
>> The compiler creates the call to __mulkc3 and __divkc3, and internally it has
>> the appropriate prototype like it does for all built-in functions (in this
>> case, returning an _Float128 _Complex type, and taking 4 _Float128 arguments).
>> 
>> So before adding ifunc support, we never noticed it didn't have a prototype,
>> because the compiler already has a prototype.
>
> I still don't get it.  A function definition is also a declaration.
>
> Something very non-intuitive is happening?

`-Wmissing-prototypes (C and Objective-C only)'
     Warn if a global function is defined without a previous prototype
     declaration.  This warning is issued even if the definition itself
     provides a prototype.

Andreas.

-- 
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."



More information about the Gcc-patches mailing list