fix(build): unbreak main — three PageLayout initializers and an msvc raw string - #825
Merged
Merged
Conversation
…every field #819 added `PageLayout::direction` and left three designated initializers naming every other field, which `-Wmissing-field-initializers` refuses under gcc-14 and clang-18. gcc stops at the first, so only the iwork one was visible. The msvc job fails separately: a raw string inside an `EXPECT_EQ` argument, which the traditional preprocessor does not read, so the quotes inside it come out as a stray escape. Built outside the macro instead. main is red on all three today. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VEsRyBu8o4TGJGn3thNEDc
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
🤖 Generated with Claude Code
mainis red: its ownbuild-testrun for #820 fails three of the matrix jobs(gcc-14, clang-18
-Werror, msvc-1940). Two independent causes, both fromalready-merged work.
PageLayout::direction#819 added
directiontoPageLayoutand left three designated initializersthat name every other field, so
-Wmissing-field-initializersrefuses them:iwork_document.cppslide_page_layoutppt_document.cppslide_page_layout, both branchesOnly the iwork one appears in the log — gcc stops at the first error, so the two
ppt sites were still hiding behind it. AppleClang does not warn here, which is
why it got through review locally.
The msvc raw string
odf_flat_file_test.cppbuilds the writing-mode attribute inside anEXPECT_EQargument:
MSVC's traditional preprocessor does not recognise a raw string literal while
scanning a macro argument, so the
"insideR"(…")"closes a string early andthe later
"\""lands outside one —error C2017: illegal escape sequence. Theattribute is now built into a local before the macro sees it, and the trailing
quote is a raw string too rather than an escape.
/Zc:preprocessorwould fix the class of problem rather than this instance, butit changes how every translation unit is preprocessed on msvc, which is not a
thing to slip into a red-main fix.
Verification
Full suite green (1442 passed, 6 skipped). The three initializer sites now
compile clean under gcc with
-Wall -Wextra -Werror, checked locally againstlibstdc++ — that is the warning surface AppleClang does not reproduce. The msvc
half only CI can confirm.
No
CHANGELOG.mdentry: nothing a consumer notices, and.directionwasalready defaulting to the same empty value it now names.
#823 is rebased on top of this.