Jeff <[email protected]> writes: > I am a bit puzzled. The Announcing NetBSD 11.0 web page includes this, > "Enhanced compliance with POSIX.1-2024 and C23 programming interface > standards.", but the version of GCC included in a base install is gcc > (nb3 20260326) 12.5.0, which does not appear to include support for > C23.
A fair qustion, and I'm sure we'll get an answer from someone who really understands, but on one hand there is a compiler with c23 support (gcc 14 and up, as I understand it), and on the other there is all the system include files being valid c23, so that one can, with a c23 compiler, compile programs that use system headers. > I see that there are packages available for gcc versions up to 16. If > I were to install, say, gcc 15 to use for my own personal projects, > would this cause any problems for me or for the system? pkgsrc automatically installs newer gcc versions when packages are marked as needing recent language standards. See pkgsrc/mk/compiler/gcc.mk for the details, but for C, the base compiler is enough for all by C23, which needs gcc14. For C++, the base compiler is enough for all but C++23, which needs gcc14. (NetBSD-current has gcc 14. That could well change before NetBSD 12 is branched, but something to think about when choosing.) If you install gcc14, and use it, things should be fine -- but in general C++ standard libraries are not necessarily ABI compatible, so strictly, you should not mix compilers for various parts of a C++ program. This should not be an issue with C, or much less of an issue. The system should not be affected; the programs in NetBSD base are already linked against libraries that are part of the system, all compiled with the base system compiler.
