Landing: 8f43cf55107e

Project / Subsystem

gcc / c++

Date

2026-08-05

Author

Tobias Burnus

Commit

8f43cf55107e34bc10ed0ee8461d0551bc7e3817

Source

github

Perf win

No

Breaking

No

All attributes

project
gcc
subsystem
c++
patch_id
—
commit_hash
8f43cf55107e34bc10ed0ee8461d0551bc7e3817
source_type
github
headline
C++: Handle OpenMP/OpenACC array sections with C++26 splicing tokens
tldr
GCC now correctly parses OpenMP/OpenACC array sections even when C++26's splicing tokens '[:' and ':]' are used.
author
Tobias Burnus
outcome
committed
performance_win
false
breaking_change
false
series_id
—
series_parts
[]
tags
  • • c++
  • • openmp
  • • openacc
  • • parser
discussion_id_link
—
bugzilla_pr
—
date
2026-08-05T00:00:00.000Z

This commit adjusts the C++ parser to correctly interpret OpenMP and OpenACC array sections, such as [:n] or [idx:], when compiled with C++26 or later standards. C++26 introduced new splicing tokens (CPP_OPEN_SPLICE, CPP_CLOSE_SPLICE) that conflicted with the existing syntax for array sections. This change ensures that these array sections are parsed as intended, maintaining compatibility with OpenMP/OpenACC array slicing despite the new C++26 parsing rules.