Landing: 68d3f1e2c20e

Project / Subsystem

gcc / gcc/c-family

Date

2026-06-06

Author

Martin Uecker

Commit

68d3f1e2c20efe07f99de3720d1732c4b987ff22

Source

github

Perf win

No

Breaking

No

All attributes

project
gcc
subsystem
gcc/c-family
patch_id
commit_hash
68d3f1e2c20efe07f99de3720d1732c4b987ff22
source_type
github
headline
Fixes incorrect encoding for zero-sized arrays in C
tldr
GCC fixes a regression where zero-sized arrays in C were incorrectly encoded on 32-bit architectures, leading to compilation issues.
author
Martin Uecker
outcome
committed
performance_win
false
breaking_change
false
series_id
series_parts
[]
tags
  • c
  • bugfix
  • arrays
  • compiler-internals
discussion_id_link
bugzilla_pr
date
2026-06-06T00:00:00.000Z

This commit partially reverts a previous change that introduced a regression for zero-sized arrays in C, specifically impacting 32-bit architectures. The original change incorrectly replaced build_range_type with build_index_type when completing array types, causing zero-sized arrays created from empty initializers to be represented as [0, -1] instead of the expected [0, NULL_TREE]. This fix restores the correct representation, resolving compilation issues for C code that uses such arrays.