Re: [PATCH 05/40] command.h: Include scoped_restore_command.h

Pedro Alves
2017-06-27T11:45:42Z

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