bug-gnulib
[Top][All Lists]
Advanced

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

Re: New warnings on emacs-26 branch with gcc 8.2.0


From: Eli Zaretskii
Subject: Re: New warnings on emacs-26 branch with gcc 8.2.0
Date: Sat, 18 Aug 2018 21:41:26 +0300

> From: Bruno Haible <address@hidden>
> Date: Sat, 18 Aug 2018 18:09:27 +0200
> Cc: Paul Eggert <address@hidden>, Andy Moreton <address@hidden>,
>       address@hidden
> 
> So, there are 4 options:
>   1) Use static reference to Windows API functions.
>   2) Use '#pragma GCC diagnostic ignored "-Wcast-function-type"'
>   3) Remove -Wcast-function-type from the compiler options.
>   4) Live with the warning.
> 
> I'm opposed to 1), since it removes either features or portability.
> 
> I could do 2), but it does not feel like the right thing, to silence
> a compiler warning when the user has explicitly requested a warning.
> 
> So, please choose among 3) and 4).

There's also this additional option:

  5) Cast through (void *).  Like this:

      GetSystemTimePreciseAsFileTimeFunc =
        (GetSystemTimePreciseAsFileTimeFuncType) (void (*) (void)) 
GetProcAddress (kernel32, "GetSystemTimePreciseAsFileTime");




reply via email to

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