lmi
[Top][All Lists]
Advanced

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

Re: [lmi] [lmi-commits] master 3a5c416d 5/6: Reenable a warning and reso


From: Greg Chicares
Subject: Re: [lmi] [lmi-commits] master 3a5c416d 5/6: Reenable a warning and resolve its cause
Date: Wed, 29 Jun 2022 22:15:33 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.8.0

On 6/29/22 21:50, Vadim Zeitlin wrote:

[... commit b3e933e24484 ...]

>  FWIW I agree that it's an improvement, i.e. if we do not use ptrdiff_t,
> then we should indeed use explicit casts everywhere, but it seems a bit
> weird to me to have 2 overloaded ctors now and I wonder if it can't result
> in ambiguities when choosing the appropriate overload.

Yes, it is weird, and I wouldn't be surprised if ambiguities arise in
case this code is ever modified. That's why I labelled it a "stopgap".
It's not ideal; it's just less bad than inhibiting an entire class
of gcc warnings for this entire file.

>  I.e. I'd rather have a single ctor and only keep the cast inside it,

I'd rather have only the original ctor with the One True Integer Type,
which is 'int'. The path that leads to that goal is to disseminate
'bourn_cast' to every place where a palpably incorrect value could
arise--before it gets passed anywhere; then the "stopgap" ctor can be
removed...someday. Right now we have other priorities.


reply via email to

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