Hi there! The issue and the original request was about "Foo**" -> "const Foo * const * const" like conversion. As it was highlighted by several colleagues, such a kind of conversion requires warning as per C Standard. And a warning has been here for 30 years.
Now, somebody decides that "incompatible" type conversion requires stricker things like compilation errors. And so, for most cases it is now interpreted as a compilation error by default (GCC trunk). May be it is true, but not for "Foo**" -> "const Foo * const * const" case for sure. It might be a warning cause C Standard needs some update, but not an ERROR. And this is a BUG which I was talking about. And the use-case is pretty simple, when we need to pass some non-const argument through "all-const" function parameters holding CONST-invariant/or which is the same "IN parameter". So, we have some variable "var1" of "Foo**" type (an array of pointers) and we want to pass this variable to function "func1(const Foo * const * const)". Previously, it was enough to write "func1(var1)", now it is a COMPILATION ERROR. And we must write "func1((void*)var1)" or "func1((Type)var1)". I don't like it, it is awful. Also, many people has responded to this-email thread highlighting some "unsafe" usage of "const" specifier. The TRUTH is that CONST IS NEEDED TO REDUCE THE NUMBER OF POSSIBLE ERRORS AND TO IMPROVE CODE DESIGN. SO, The TRUTH is that IF WE CAN USE "CONST" WE SHOULD USE IT AS MUCH AS POSSIBLE. And some concerns about "unsafe" don't take into consideration the ORIGINAL IDEA WHICH "CONST" IS USED. So, the introducing CONST never might bring some unsafety and it should be used whenever it is possible. This is the case. Respectfully, Aleksandr G Povalyaev. ср, 10 дек. 2025 г. в 22:13, Andrey Tarasevich <[email protected]>: > > On 12/10/2025 9:55 AM PST Александр Поваляев <[email protected]> > wrote: > > ... > > Not "const Foo** const", not "const Foo**", not "Foo*const*", but about > "Foo**" -> "const Foo * const * const" conversion. > > > > Two responses ago, you're just started explaining that "const Foo * > const * const" type is very similar to "const Foo * const *". Thank you. > > But I don't know how it is related to the original topic... > > Sign (SMHID... I see no reason to continue going in circles here. "You can > only > take a horse to the water, but you can't make it drink". I'm out. > > -- > Best regards, > Andrey >
