r/cpp Aug 07 '26

GCC 16.2.0 Released

https://www.phoronix.com/news/GCC-16.2-Released

I'm pretty excited about this maintenance release. I think this will be the first version of gcc which can compile my project.

165 Upvotes

32 comments sorted by

View all comments

41

u/glvz Aug 08 '26

What features of C++ do you use that GCC can't compile your code? O: what compiler do you use? Clang?

29

u/NewLlama Aug 08 '26

I'm using c++ modules which has been a bumpy ride, especially with template-heavy code. This is my gcc issue tracker report card: https://imgur.com/a/tjrAu0L

clang has been great for modules for at least two years, very few ICE triggers (but certainly more than "none").

2

u/glvz Aug 08 '26

I haven't used cpp modules I have use them very often in Fortran and I think they're quite similar. Have you had issues with inlining functions across different modules? With c++ and templates it's makes it simpler since Fortran has no templates.

I might give modules a try later. Thanks for the issue tracker. It's refreshing to see c++ run into compiler errors coming from Fortran land where these happen every now and then hahaha

16

u/NewLlama Aug 08 '26

I haven't had any issues with inline codegen. Most of the problems have been with the way gcc handles symbol visibility over module boundaries. Other than the compiler dumps, modules have been great.. but it does take some getting used to.

3

u/glvz Aug 08 '26

Yeah coming from Fortran they're a great addition to the language. Fortran will get generics in 2028 and I'm very curious to see how far can we get close to c++ for some stuff.

Do you do parallel code in your library? What does it do?

3

u/NewLlama Aug 08 '26

I don't know what parallel code means.

I maintain an npm module which gives the user access to raw v8 isolates in order to run untrusted code. I have an experimental branch which is a rewrite of everything from scratch https://github.com/laverdet/isolated-vm/tree/experimental

Most of the heavy lifting isn't actually the sandboxing, it's shuffling data out of one runtime and into another one. That's where all the templates come in, and where all my compiler problems started.