Landing: d182d582c0f1

Project / Subsystem

gcc / gccrs

Date

2026-05-24

Author

Pierre-Emmanuel Patry

Commit

d182d582c0f15ec9868b283f93b4ecb2eeae485f

Source

github

Perf win

No

Breaking

No

All attributes

project
gcc
subsystem
gccrs
patch_id
—
commit_hash
d182d582c0f15ec9868b283f93b4ecb2eeae485f
source_type
github
headline
Return empty file name for inline string source.
tldr
Prevents compiler crash when requesting file name from lexer on non-file sources like strings.
author
Pierre-Emmanuel Patry
outcome
committed
performance_win
false
breaking_change
false
series_id
—
series_parts
[]
tags
  • • gccrs
  • • rust
  • • compiler internals
  • • stability
discussion_id_link
—
bugzilla_pr
—
date
2026-05-24T00:00:00.000Z

This commit modifies gccrs to return an empty file name when the lexer is processing input from a non-file source, such as an inline string. Previously, attempting to access a file name in such a scenario would cause the compiler to crash. Returning an empty string instead provides a safe fallback, ensuring stability when handling string-based input.