Landing: d172a9666d42

Project / Subsystem

gcc / gcc

Date

2026-06-10

Author

Jakub Jelinek

Commit

d172a9666d4281355786062dcc958a64e28a292c

Source

github

Perf win

No

Breaking

No

All attributes

project
gcc
subsystem
gcc
patch_id
commit_hash
d172a9666d4281355786062dcc958a64e28a292c
source_type
github
headline
Builtin `bswap` and `bitreverse` functions improve error recovery.
tldr
GCC now includes better error recovery for `__builtin_bswapg` and `__builtin_bitreverseg` when passed invalid arguments, preventing internal compiler errors.
author
Jakub Jelinek
outcome
committed
performance_win
false
breaking_change
false
series_id
series_parts
[]
tags
  • c
  • c++
  • bugfix
  • builtins
  • error-handling
discussion_id_link
bugzilla_pr
date
2026-06-10T00:00:00.000Z

GCC has improved its error handling for the __builtin_bswapg and __builtin_bitreverseg functions by preventing an Internal Compiler Error (ICE) when these builtins are invoked with error_mark_node as an argument. The fix ensures that the compiler now explicitly checks for error_operand_p before attempting to access the argument’s type, providing more robust error recovery in C and C++ front ends and making the compiler more stable when dealing with malformed input.