Commit: PR 22823: Fix gcc 8 compile time warnings
Alan Modra
amodra@gmail.com
Wed Feb 14 06:56:00 GMT 2018
On Wed, Feb 14, 2018 at 02:59:34AM +0000, Maciej W. Rozycki wrote:
> For some host psABIs I suppose initialising a fixed-argument function
> pointer with a variable-argument function reference and then using the
> pointer to make a call is going to work, but this is UB AFAIK as per the C
> language standard, so I suggest that you revert your change and look for a
> better alternative, as the cure seems worse than the disease.
>
> NB I don't know where the idea of complaining about extraneous function
> arguments has come from for GCC 8 (except maybe for `-pedantic'), as this
> property of the C vs Pascal function calling convention has been relied on
> since forever.
Wow, what a horrible gcc warning. A warning for casts from a function
taking no argument, but no warning for casts from a variadic to
non-variadic function!
--
Alan Modra
Australia Development Lab, IBM
More information about the Binutils
mailing list