https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87379

Eric Gallager <egallager at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |egallager at gcc dot gnu.org

--- Comment #2 from Eric Gallager <egallager at gcc dot gnu.org> ---
(In reply to Martin Sebor from comment #1)
> Confirmed.  The handling of variadic functions was discussed during the
> design of the -Wcast-function-type warning
> (https://gcc.gnu.org/ml/gcc-patches/2017-10/msg00131.html).  The assumption
> was that such conversions may be common and the idea was to avoid warning
> when they're safe.  I don't think the warning implementation considers the
> nuances between different ABIs.  Rather than customizing the warning to each
> ABI it might be better to simply tighten it up across the board as suggested.
> 
> Not sure if making the warning "smarter" by having it track pointer
> conversions across assignments (to detect incompatible function conversions
> via void*) is worth exploring.  It would still not detect the problem in the
> dlsym() case (and others like it) but could lead to a fair amount of noise.

It might be worth making it a separate flag (-Wcast-variadic-function-type
perhaps?) that's enabled by -Wcast-function-type but can still be disabled from
it independently to help users focus on just one variety of warnings at a time

Reply via email to