a new bug to old plain C

Basile Starynkevitch <[email protected]>
Newsgroups gmane.comp.gcc.help
Message-ID <[email protected]>
> 
> чт, 4 дек. 2025 г. в 12:56, Александр Поваляев <[email protected]>:
> 
> > Hi David!
> >
> > Even if a software (like gcc) is open-source, it still can be used for
> > commercial purposes. So, it is not always just for education and
> > open-source experiments.
> > Taken seriously, backward compatibility is a very important property.
> > "Foo**" -> "const Foo * const * const" conversion has been allowed for
> > decades (20x or 30x) by default and, I truly speaking, don't know what
> > happens to it about a year ago.
> > But Gcc ver 14 (https://gcc.gnu.org/gcc-14/) which was released at
> > 2024 silently decided to stop it.
> >
> > It might be the case that somebody wanted to prohibit explicit conversion
> > "Foo**" -> "const Foo ** const" (or other unsafe type of conversions, which
> > was mentioned in this e-mail thread) and made
> > some changes to GCC source code. And that changes also "broke" safe
> > conversion "Foo**" -> "const Foo * const * const" making it produce a
> > compilation error.


For those wanting such warnings or errors (or to remove them), a safe approach is obviously to code some GCC plugin
(perhaps extending the obsolete https://github.com/bstarynk/bismon to fit there needs).

The same persons could of course consider using (or improving) static source code analysis tools eg frama-c.com 

For cross-compilers it could be more difficult and more needed.

Notice also that GCC-13 is not yet obsolete. https://gcc.gnu.org/gcc-13/ Obviously using it for some code is still possible.

Regards

-- 

Basile STARYNKEVITCH                    basile AT starynkevitch DOT net
8 rue de la Faïencerie                       http://starynkevitch.net/Basile/  
92340 Bourg-la-Reine                         https://github.com/bstarynk
France                                https://github.com/RefPerSys/RefPerSys
                  https://orcid.org/0000-0003-0908-5250
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.