On Wednesday 31 July 2024 00:13:24 LIU Hao wrote:
> 在 2024-07-29 02:58, Pali Rohár 写道:
> > misc/imaxdiv.c:34:1: warning: ‘lldiv’ alias between functions of 
> > incompatible types ‘lldiv_t(long long int,  long long int)’ {aka ‘struct 
> > <anonymous>(long long int,  long long int)’} and ‘imaxdiv_t(intmax_t,  
> > intmax_t)’ {aka ‘struct <anonymous>(long long int,  long long int)’} 
> > [-Wattribute-alias]
> >   lldiv (long long, long long);
> >   ^~~~~
> > misc/imaxdiv.c:23:1: note: aliased declaration here
> >   imaxdiv(intmax_t numer, intmax_t denom)
> 
> `imaxdiv_t` doesn't have to be a distinct type. It can be just
> 
>    typedef lldiv_t imaxdiv_t;
> 

Such typedef may cause issues in C++ for functions with overloaded
parameters for lldiv_t and imaxdiv_t. MS VC++ header files also defines
distinct types.


_______________________________________________
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to