C/C++ 编译器 GCC 8.3版本发布

GCC 8.3 发布了,GCC 8.3 是 GCC 8 分支的 bug 修复版本,其中包含对 GCC 8.2 中的回归和严重 bug 的重要修复,自上一版本以来修复了超过 153 个错误。

值得关注的部分有:

  • 不再支持过期的SDB/CoFF调试信息格式,-gcoff失效,不再执行任何操作;
  • 删除Cilk扩展
  • MPX扩展已弃用,会在后边的版本中删除
  • 删除了非标准函数0x std::copy_exception,可以使用std::make_exception_ptr代替

新版更新主要是针对 Windows 操作系统的一个 C++ Microsoft ABI 位阈布局(bitfield layout)Bug 的修复(PR87137)。具体提升跟改进的地方有:

  • Inter-procedural optimization improvements:
    • Reworked run-time estimation metrics leading to more realistic guesses driving inliner and cloning heuristics.
    • The ipa-pure-const pass is extended to propagate the malloc attribute, and the corresponding warning option -Wsuggest-attribute=malloc emits a diagnostic for functions which can be annotated with the malloc attribute.
  • Profile driven optimization improvements:
    • New infrastructure for representing profiles (both statically guessed and profile feedback) which allows propagation of additional information about the reliability of the profile.
    • A number of improvements in the profile updating code solving problems found by new verification code.
    • Static detection of code which is not executed in a valid run of the program. This includes paths which trigger undefined behavior as well as calls to functions declared with the cold attribute. Newly the noreturn attribute does not imply all effects of cold to differentiate between exit (which is noreturn) and abort (which is in addition not executed in valid runs).
    • -freorder-blocks-and-partition, a pass splitting function bodies into hot and cold regions, is now enabled by default at -O2 and higher for x86 and x86-64.
  • Link-time optimization improvements:
    • We have significantly improved debug information on ELF targets using DWARF by properly preserving language-specific information. This allows for example the libstdc++ pretty-printers to work with LTO optimized executables.
  • A new option -fcf-protection=[full|branch|return|none] is introduced to perform code instrumentation to increase program security by checking that target addresses of control-flow transfer instructions (such as indirect function call, function return, indirect jump) are valid. Currently the instrumentation is supported on x86 GNU/Linux targets only. See the user guide for further information about the option syntax and section "New Targets and Target Specific Improvements" for IA-32/x86-64 for more details.
  • The -gcolumn-info option is now enabled by default. It includes column information in addition to just filenames and line numbers in DWARF debugging information.
  • The polyhedral-based loop nest optimization pass -floop-nest-optimize has been overhauled. It's still considered experimental and may not result in any runtime improvements.
  • Two new classical loop nest optimization passes have been added. -floop-unroll-and-jam performs outer loop unrolling and fusing of the inner loop copies. -floop-interchange exchanges loops in a loop nest to improve data locality. Both passes are enabled by default at -O3 and above.
  • The classic loop nest optimization pass -ftree-loop-distribution has been improved and enabled by default at -O3 and above. It supports loop nest distribution in some restricted scenarios; it also supports cancellable innermost loop distribution with loop versioning under run-time alias checks.
  • The new option -fstack-clash-protection causes the compiler to insert probes whenever stack space is allocated statically or dynamically to reliably detect stack overflows and thus mitigate the attack vector that relies on jumping over a stack guard page as provided by the operating system.
  • A new pragma GCC unroll has been implemented in the C family of languages, as well as Fortran and Ada, so as to make it possible for the user to have a finer-grained control over the loop unrolling optimization.
  • GCC has been enhanced to detect more instances of meaningless or mutually exclusive attribute specifications and handle such conflicts more consistently. Mutually exclusive attribute specifications are ignored with a warning regardless of whether they appear on the same declaration or on distinct declarations of the same entity. For example, because the noreturn attribute on the second declaration below is mutually exclusive with the malloc attribute on the first, it is ignored and a warning is issued.

更多详情内容,可以访问官方更新日志

猜你喜欢

转载自blog.csdn.net/rx3oyuyi/article/details/87972932