Fix failing GCC Debug builds: Add missing newline to ErrorCodes.h #7928
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixing GCC/Debug Build Failures
Problem
The GCC Debug builds in Azure Pipelines are failing due to a warning treated as error in ErrorCodes.h - the file is missing a newline at the end.
Analysis
Solution Implementation
Root Cause
include/dxc/Support/ErrorCodes.hended with a macro continuation (\) on line 159, but the continued content on line 160 didn't have a trailing newline. This violates C++ standards (C++17 §5.2.1.2: "If a source file that is not empty does not end in a new-line character...the behavior is undefined") and causes GCC to emit a warning which is treated as an error in certain build configurations.Fix Details
Added a single newline character at the end of the file to satisfy C++ requirements. This is a minimal, safe change that resolves the compilation issue without affecting any functionality.
Testing Results
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.