Skip to content

microblaze: fix HOST_WIDE_INT_PRINT_UNSIGNED macro concatenation spacing#2

Open
thesamprice wants to merge 1 commit into
Xilinx:xlnx/gcc-4_8-branchfrom
thesamprice:microblaze-fix-macro-concat
Open

microblaze: fix HOST_WIDE_INT_PRINT_UNSIGNED macro concatenation spacing#2
thesamprice wants to merge 1 commit into
Xilinx:xlnx/gcc-4_8-branchfrom
thesamprice:microblaze-fix-macro-concat

Conversation

@thesamprice

Copy link
Copy Markdown

Summary

  • Fix adjacent string literal concatenation with HOST_WIDE_INT_PRINT_UNSIGNED in gcc/config/microblaze/microblaze.h (2 sites) and gcc/defaults.h (1 site).

Modern GCC (≥12) requires a space between a macro that expands to a string literal and an adjacent string literal. Without the space the preprocessor emits a warning (and some compilers error). The fix is purely whitespace — no functional change.

Before:

fprintf(file, ","HOST_WIDE_INT_PRINT_UNSIGNED",%u\n", ...);

After:

fprintf(file, "," HOST_WIDE_INT_PRINT_UNSIGNED ",%u\n", ...);

Test plan

  • Build microblaze-linux-gnu cross-compiler with a host GCC ≥ 12 — should produce no warnings for the changed lines
  • Existing MicroBlaze regression tests pass

🤖 Generated with Claude Code

HOST_WIDE_INT_PRINT_UNSIGNED must be separated from adjacent string literals
by a space — required by C99 and enforced by newer compilers.  Fixes build
errors when compiling xilinx-gcc with a host GCC >= 12.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant