Re: A: a new bug to old plain C
David Brown via Gcc-help <[email protected]>
| Newsgroups | gmane.comp.gcc.help |
|---|---|
| Message-ID | <[email protected]> |
On 23/11/2025 21:45, Александр Поваляев via Gcc-help wrote: > Hi there! > This is getting /extremely/ frustrating. /Please/ find some way to learn the C programming language - courses, books, good online resources. And /please/ believe me when I say that people who have worked with C and C++ for decades, studied the standards, who serve on the standards committee, know better about these things than you do. (I'm talking about Jonathan here, not myself - he really is a world-class expert here.) > Either the links you've provided or the links you provided earlier > (yesterday) are irrelevant, cause they are just discussing if it is safer > to convert "Foo_Type **" to "const Foo_Type **" or not. > The links are highly relevant. They explain why you cannot convert from "char **" to "const char **". That also explains why you cannot convert from "char **" to "const char * const * const". Adding even more "const" qualifiers to the invalid conversion does not somehow magically make it work. > Once again, we are not converting "char** to const char**", we're > converting char** to const char * const * const". > And we're not discussing if it is safer or not, we are discussing GCC > compiler error. > The compiler is generating an error message because you wrote invalid code. The error - or bug, if you like - is in /your/ code. Not the compiler. GCC is doing its job correctly here. > > Respectfully, > Aleksandr G Povaliaev. > I'm sorry, but signing the post with "respectfully" does not make it respectful. You started the thread disrespectfully - insisting that there is a bug in GCC when you simply do not understand the relevant aspects of the C programming language. And you have gone downhill since then, ignoring and rejecting the help and advice you have been given. Getting things wrong once is entirely understandable - this is a subtle point of the C language, and you are posting to a "help" list. Doubling down on your ignorance when you have received the help and information you need, is a different matter entirely. Your code is flawed. You need to fix it. Mindlessly repeating your misunderstandings about how you think C works will not do anything but annoy people. David