[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] hurd: Add shared mig declarations

From: Simon Marchi
Subject: Re: [PATCH] hurd: Add shared mig declarations
Date: Sat, 30 May 2020 21:51:35 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.1

On 2020-05-30 2:23 p.m., Samuel Thibault wrote:
> Fixes
> exc_request_S.c:177:24: error: no previous declaration for ‘exc_server’ 
> [-Werror=missing-declarations]
>   177 | mig_external boolean_t exc_server
> gdb/ChangeLog:
>       * config/i386/i386gnu.mn [%_S.o %_U.o] (COMPILE.post): Add
>       "-include gnu-nat-mig.h".
>       * gnu-nat-mig.h: New file.
>       * gnu-nat.c: Include "gnu-nat-mig.h".
>       (exc_server, msg_reply_server, notify_server,
>       process_reply_server): Remove declarations.

It took me a while to understand the underlying problem.  My understanding is 
gnu-nat.c calls this function exc_server, that is defined in the generated 
file.  The
generated file does not provide a header with declarations, so gnu-nat.c had 
its own
local declaration.  Since we now use the -Wmissing-declarations warning flag, 
and the
definition in the generated exc_request_S.c didn't see a corresponding 
it caused that build failure.  Is that correct?  If so, please add that 
or equivalent to the commit log.

My question now is: that MIG tool appears to generate both a header (%_S.h) and 
file (%_S.c) from defs files.  What is this header file used for, if it doesn't 
the declaration for the functions in the source file?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]