Live data from Hacker News

New features in GCC 16: Improved error messages and SARIF output

developers.redhat.com

21–23 of 23 posts

Re: New features in GCC 16: Improved error messages and SARIF output

#21
post #7

Wow I never thought I'd see GCC innovating with error messages! I looked into using SARIF once before and found it's an enormous over-engineered design-by-committee spec, but I guess it's still better than regexes (do people really do that?).

SARIF is kinda nice for security-oriented linters imo, since lots of tools know how to speak it. It avoids lock-in that way, which is otherwise/previously pretty common, with every scanning tool using its own bespoke format.

Re: New features in GCC 16: Improved error messages and SARIF output

#22
post #5

Earlier quoted context omitted.

This has appeared multiple times over the years as “compiler improves c++ errors” and is even the reason given as motivating things like concepts. Sure it keeps improving but the errors don’t seem to actually get smaller. The problem is inherent to templates - c++ got it wrong by having templates start weakly typed and it has no mechanisms to correct it in the language - concepts helped but didn’t definitively fix it…

The problem isn't C++, the problem is that the meagre resources those teams have available, rather spend their time catching up to ISO C and ISO C++, than improving error messages. Hence why SARIF has seen big adoption, as they hope that by exposing that , there are others ways to have others have tools that process SARIF.

C++ has way more resources than almost any other language. There are or were teams from Microsoft, Google, Apple, and Bloomberg who work on the compiler. Lots and lots of man hours have been spent and I’d say wasted. The problem is C++ the ISO committee and that is the language essentially.

They had a chance in c++11 - we’re going to make a modern c++ that fixes the old problems. And for a time that was true. But they’ve completely lost their way again and getting caught flat footed when the US government recommended people stop using c++ and instead of figuring out how to fix the language they doubled down on unworkable ideas that don’t meaningfully improve the situation.

I think the advice will be to run fil-c in production and then c++ will have an issue as to just what it’s identity is because in practice it will be significantly slower than alternative approaches.

Re: New features in GCC 16: Improved error messages and SARIF output

#23
post #5

Earlier quoted context omitted.

The problem isn't C++, the problem is that the meagre resources those teams have available, rather spend their time catching up to ISO C and ISO C++, than improving error messages. Hence why SARIF has seen big adoption, as they hope that by exposing that , there are others ways to have others have tools that process SARIF.

C++ has way more resources than almost any other language. There are or were teams from Microsoft, Google, Apple, and Bloomberg who work on the compiler. Lots and lots of man hours have been spent and I’d say wasted. The problem is C++ the ISO committee and that is the language essentially. They had a chance in c++11 - we’re going to make a modern c++ that fixes the old problems. And for a time that was true. But the…

Most of the companies that you named, nowadays don't care about C++ as much as you think.

The work in clang and GCC is mostly done by volunteers, big names like Apple and Google rather focus on LLVM itself for their languages.

Microsoft seems to have layed off quite a few people, and is mostly focused on keeping it going for existing projects, in the context of games, as second language paired with .NET, CPython and JavaScript runtimes.

The last framework they published (C++/WinRT), its baseline is C++17, with no plans to upgrade it.

They just released an updated memory model for C# for low level coding that should be competitive with Swift and Rust unsafe models.

Post reply on HN