[PATCH] [CLEANUP] Declare global functions before defining them

Richard Biener richard.guenther@gmail.com
Wed Apr 16 08:58:00 GMT 2014


On Tue, Apr 15, 2014 at 7:33 PM, Patrick Palka <patrick@parcs.ath.cx> wrote:
> On Tue, Apr 15, 2014 at 3:52 AM, Richard Biener
> <richard.guenther@gmail.com> wrote:
>> On Mon, Apr 14, 2014 at 4:52 PM, Patrick Palka <patrick@parcs.ath.cx> wrote:
>>> Hi everyone,
>>>
>>> Many source files currently define a global function that is not
>>> previously declared within that source file because the source file did
>>> not include the appropriate header file that declares said function.
>>> This patch fixes a number of these occurrences by making sure to include
>>> the appropriate header file within the offending source files.
>>>
>>> Bootstrapped and regtested on x86_64-unknown-linux-gnu.
>>
>> How did you find these?  (in the C bootstrap times -Wstrict-prototypes
>> did that)
>>
>> Thanks,
>> Richard.
>
> Like with the other two patches, the changes in this patch address a
> subset of the warnings emitted by -Wmissing-declarations.  In this
> case the subset is "extern functions that are declared inside a header
> file but whose defining source file does not include said header
> file".

Ok.  Then we should enable -Wmissing-declarations to not regress here.

The patch is ok.

Thanks,
Richard.



More information about the Gcc-patches mailing list