This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] [CLEANUP] Declare global functions before defining them
- From: Richard Biener <richard dot guenther at gmail dot com>
- To: Patrick Palka <patrick at parcs dot ath dot cx>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 16 Apr 2014 10:43:54 +0200
- Subject: Re: [PATCH] [CLEANUP] Declare global functions before defining them
- Authentication-results: sourceware.org; auth=none
- References: <1397487134-30090-1-git-send-email-patrick at parcs dot ath dot cx> <CAFiYyc2pRGqf8vnHXnOzheNZgNfQnvABT85T28=ZAZC6kRNtEQ at mail dot gmail dot com> <CA+C-WL9y-94E=Kvyf9-04arvxAaWBA2bt8ia0bPnLM-6D-bQZA at mail dot gmail dot com>
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.