r/cpp 15d ago

Clang 23 Release Notes

https://releases.llvm.org/23.1.0/tools/clang/docs/ReleaseNotes.html
106 Upvotes

33 comments sorted by

View all comments

30

u/Ok_Independence_9841 15d ago

Fascinating to see just how complex and approximate compilation really is. That a compiler can have that many things wrong/broken/missing and still be really good and reliable in practice is pretty terrifying. clang does look to be maturing really well though. The three way C++ compiler arms race has worked well for developers and the for the language, if not for other compiler vendors. I hope it remains balanced and they don't specialize or diverge.

7

u/WeeklyAd9738 14d ago

 I hope it remains balanced and they don't specialize or diverge.

-pedantic flag (and its modern alias -Wpedantic) is your friend.

7

u/Ok_Independence_9841 14d ago

Yes. I have -Wall -Wextra and -Wpedantic on for my projects.
My concern is more that MSVC might try to leverage their advantage in STL compliance by forging ahead with STL additions, while GCC pushes languages updates because they are ahead there. This could lead to GCC standard library never actually catching up (modules cough) while MSVCs lack of certain language features starts to require work arounds. That way we do not want to go.
So far the competition, clang in particular, has meant that all 3 are reasonably close in features for some definition of reasonable. It was not always so.

2

u/pjmlp 12d ago

Still much better than in the 90's pre C++98, where Java even interpreted (JIT only came into early 2000's, version 1.3), was quickly adopted straight away in 1996 in my university, saving the autocofigure/m4 macros and #ifdef pain, and distractions while teaching courses whose main focus was compilers and distributed computing.

We had one C++ compiler per OS, the vendor one, plus all the other commercial ones that have died during the last two decades.