This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 05/40] command.h: Include scoped_restore_command.h
- From: Pedro Alves <palves at redhat dot com>
- To: Yao Qi <qiyaoltc at gmail dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Tue, 27 Jun 2017 12:45:03 +0100
- Subject: Re: [PATCH 05/40] command.h: Include scoped_restore_command.h
- Authentication-results: sourceware.org; auth=none
- Authentication-results: ext-mx09.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com
- Authentication-results: ext-mx09.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=palves at redhat dot com
- Dkim-filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 9231C3A18D
- Dmarc-filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 9231C3A18D
- References: <1496406158-12663-1-git-send-email-palves@redhat.com> <1496406158-12663-6-git-send-email-palves@redhat.com> <86bmp9fz0z.fsf@gmail.com>
On 06/27/2017 12:30 PM, Yao Qi wrote:
> Pedro Alves <palves@redhat.com> writes:
>
>> This file depends on scoped_restore:
>>
>> extern scoped_restore_tmpl<int> prevent_dont_repeat (void);
>>
>> But doesn't include the corresponding header.
>
> It is a function declaration, so why does it need scoped_restore?
I don't understand. Why wouldn't it? If the compiler doesn't
know what scoped_restore_tmpl is, how can that compile?
>
> $ make check-headers CHECK_HEADERS="command.h"
>
> The command above doesn't complain anything. I tried gcc-5, 6, and 7.
Odd. Let me take another look.
I ran into this because at some point I added "#include "command.h"
somewhere, which then failed to compile.
Thanks,
Pedro Alves