I asked this question on the gcc-help mailing list, but received no reply, so I'm trying here instead:
The GCC 7 release notes state that "Version 5 of the DWARF debugging information standard is supported": https://www.gnu.org/software/gcc/gcc-7/changes.html
However, the GCC 7 and GCC 8 documentation still states that "DWARF Version 5 is only experimental":
- https://gcc.gnu.org/onlinedocs/gcc-7.4.0/gcc/Debugging-Options.html#Debugging-Options
- https://gcc.gnu.org/onlinedocs/gcc-8.2.0/gcc/Debugging-Options.html#Debugging-Options
That "experimental" language goes back as far as GCC 5 though: https://gcc.gnu.org/onlinedocs/gcc-5.4.0/gcc/DebuggingOptions.html#DebuggingOptions
This leaves me unsure whether DWARF 5 is supported in GCC 7 and 8, or experimental (or, somehow, both?).
Is DWARF 5 really supported in GCC 8, in the sense that it is reasonable to enable it when building binaries for production or release? The debug info size savings I observe when enabling it for a large C++ project are significant enough that I'd really like to use it if possible.