Usability Improvements in GCC 15
GCC 15 introduces usability improvements, including enhanced execution path visualizations, structured C++ template error messages, dual output formats (text and SARIF), and detailed diagnostics for better developer experience.
Read original articleGCC 15 introduces several usability improvements aimed at enhancing the user experience for developers. One significant enhancement is the improved visualization of execution paths, which now includes clearer warnings and ASCII art to illustrate control flow, making it easier to identify potential issues like infinite loops. Additionally, C++ template error messages have been revamped to present information in a more structured and readable format, reducing confusion for developers. The new output format uses indentation and bullet points to clarify the logical structure of error messages, which can significantly aid in debugging. Another notable feature is the support for machine-readable diagnostics in the SARIF format, allowing developers to receive compiler diagnostics in both traditional text and SARIF formats simultaneously. This dual output capability enhances the flexibility of how developers can analyze and utilize compiler feedback. Furthermore, GCC 15 improves the SARIF output by capturing detailed locations and source ranges associated with diagnostics, providing more context for errors. These enhancements collectively aim to streamline the development process and improve the overall usability of the GCC compiler.
- GCC 15 enhances execution path visualizations for clearer diagnostics.
- C++ template error messages are now structured for better readability.
- Support for dual output formats (text and SARIF) is introduced.
- SARIF output captures detailed locations and source ranges for errors.
- Overall improvements aim to streamline the development process.
Related
Gleam v1.5 Released
Gleam v1.5.0 enhances developer experience with context-aware error messages, automatic pattern addition, silent compilation, improved documentation, and better handling of dependencies, formatting, and autocompletion features.
GCC 15 Compiler Showing Off Nice Performance Improvements on AMD Zen 5
GCC 15 compiler shows significant performance improvements for AMD's Zen 5 architecture, with most applications experiencing gains, while only a few workloads face regressions, enhancing software development efficiency.
GCC 15, now with C++ modules support
GCC 15 is in development, enhancing programming languages with updates to OpenMP, C23 as the default standard, and new features for C++, Fortran, AMD GPUs, and AVR optimizations.
Another Round of Rust Compiler Improvements Merged for GCC 15.1
GCC 15.1 has merged 144 patches to enhance Rust support, including Polonius borrow checker fixes and lowering the minimum Rust version to 1.49, with a stable release expected soon.
Rust Additions for GCC 15 Bring Support for If-Let Statements
Recent updates to GCC 15.1's Rust front-end include support for "if let" statements, improved AST and HIR handling, full implementation of Clone and Copy traits, and upcoming PartialOrd and PartialEq support.
- Many users appreciate the enhanced template error messages and the hierarchical visualization of errors.
- There are requests for more customization options, such as single-line error messages and configuration files.
- Some users express nostalgia for older versions of GCC, indicating a preference for simplicity over new features.
- Concerns about the inclusion of emojis in console output are raised, with some users finding them unnecessary.
- Overall, there is a positive reception towards modernization efforts, with acknowledgment of past issues being addressed.
I was investigating C++-style templates for a hobby language of mine and SFINAE is an important property to make them work in realistic codebases, but leads to exactly this problem. When a compile error occurs, there isn't a single cause, or even a linear chain of causes, but an potentially arbitrarily large tree of them.
For example, it sees a call to foo() and there is a template foo(). It tries to instantiate that but the body of foo() calls bar(). It tries to resolve that and finds a template bar() which it tries to instantiate, and so on.
The compiler is basically searching the entire tree of possible instantiations/overloads and backtracking when it hits dead ends.
Showing that tree as a tree makes a lot of sense.
Plus I heard COBOL was merged in with the compiler collection, nice!
I literally do not need ascii art to point to my error, just tell me line:col and a unique looking error message so I can spend no more than 1 second understanding what went wrong
Also allow me to extend requires with my own error messages. I know it'll be non standard but it would be very nice tyvm
We are now entering a Rococo period of unnecessarily ornate compiler diagnostics.
Getting these elaborate things to work is a nice puzzle, like Leetcode or Advent of Code --- but does it have to be merged?
Can't use Clang where I'm at, but I do get to use fairly cutting-edge GCC, at least for Windows development. So I may get to see these improvements once they drop into MSYS.
You C standard authors have it bass-ackwards. The version of the code must accompany the code, not the compiler invocation.
Why not spend time on helping IDEs to understand error messages? That would be billion times more useful.
- I'd love to see godbolt examples of the sort of optimizations [[unsequenced]] and [[reproducible]] can do.
- GCC has always been in my experience smart enough to know how to optimize normal C code into ROL and ROR instructions. I've never had any issues with it. So what's the point of __builtin_stdc_rotate_left()? Why create a builtin when it is not needed? What I wish GCC and Clang would do instead, is formally document the magic ANSI C89 incantations that trigger the optimization, e.g. `#define ROL(x, n) (((x) << (n)) | ((x) >> (64 - (n))))`. That way we can have clean portable code with less #ifdef hell along with assurances it'll go fast when -O is passed.
- What is "Abs Without Undefined Behavior (addition of builtins for use in future C library <stdlib.h> headers)."?
- What is "Allow zero length operations on null pointers"?
- Re: "Introduce complex literals." How about some __int128 literals?
- "The "redzone" clobber is now allowed in inline assembler statements" wooo I've wanted something like this for a while.
Great work from the greatest compiler team!
Related
Gleam v1.5 Released
Gleam v1.5.0 enhances developer experience with context-aware error messages, automatic pattern addition, silent compilation, improved documentation, and better handling of dependencies, formatting, and autocompletion features.
GCC 15 Compiler Showing Off Nice Performance Improvements on AMD Zen 5
GCC 15 compiler shows significant performance improvements for AMD's Zen 5 architecture, with most applications experiencing gains, while only a few workloads face regressions, enhancing software development efficiency.
GCC 15, now with C++ modules support
GCC 15 is in development, enhancing programming languages with updates to OpenMP, C23 as the default standard, and new features for C++, Fortran, AMD GPUs, and AVR optimizations.
Another Round of Rust Compiler Improvements Merged for GCC 15.1
GCC 15.1 has merged 144 patches to enhance Rust support, including Polonius borrow checker fixes and lowering the minimum Rust version to 1.49, with a stable release expected soon.
Rust Additions for GCC 15 Bring Support for If-Let Statements
Recent updates to GCC 15.1's Rust front-end include support for "if let" statements, improved AST and HIR handling, full implementation of Clone and Copy traits, and upcoming PartialOrd and PartialEq support.