This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Commit: PR 22823: Fix gcc 8 compile time warnings


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]