Skip to content

Adjust GASNETI_MEMCPY() for new GCC 16.1 warnings#3

Merged
PHHargrove merged 1 commit into
BerkeleyLab:developfrom
PHHargrove:gcc-16-memcpy-warning
May 12, 2026
Merged

Adjust GASNETI_MEMCPY() for new GCC 16.1 warnings#3
PHHargrove merged 1 commit into
BerkeleyLab:developfrom
PHHargrove:gcc-16-memcpy-warning

Conversation

@PHHargrove
Copy link
Copy Markdown
Collaborator

@PHHargrove PHHargrove commented May 11, 2026

Summary:

This single-commit PR addresses the root cause of the warnings which chapel-lang/chapel#28771 has suppressed (also in other third-party f/w fwiw).

Example warning:

[REDACTED]/include/udp-conduit/gasnet_extended.h: In function '_gex_RMA_PutBlocking':
[REDACTED]/include/gasnet_help.h:2001:20: error: variable '_fm_dummy' set but not used [-Werror=unused-but-set-variable=]
 2001 |     static uint8_t _fm_dummy;                              \
      |                    ^~~~~~~~~

Status:

Manually tested via make testhello MANUAL_CFLAGS=-Werror in a DEBUG build, and within a Chapel build tre.

Commits:

  • Adjust GASNETI_MEMCPY() for new GCC 16.1 warnings

    This commit makes changes to the GASNETI_MEMCPY() (defined and used in public headers) to avoid unused-but-set-variable warnings. These warnings first appeared with the release of GCC 16.1.0 in builds of the Chapel runtime's GASNet-EX support.

    The fix is to replace the local/static accumulator previously used to provide a forced dereference of the source and destination addresses with use of gasneti_unused_result(). This eliminates the unused warnings, while retaining the dereference.

@PHHargrove PHHargrove requested a review from bonachea May 11, 2026 23:42
Comment thread gasnet_help.h
Copy link
Copy Markdown
Member

@bonachea bonachea left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TY for the PR.

Source changes LGTM, two minor procedural requests.

Comment thread gasnet_help.h
This commit makes changes to the macro `GASNETI_MEMCPY()` (defined and
used in public headers) to avoid `unused-but-set-variable` warnings.
These warnings first appeared with the release of GCC 16.1.0 in builds
of the Chapel runtime's GASNet-EX support.

The fix is to replace the local/`static` accumulator previously used
to provide a forced dereference of the source and destination
addresses with use of `gasneti_unused_result()`.  This eliminates the
unused warnings, while retaining the dereference.
@PHHargrove PHHargrove force-pushed the gcc-16-memcpy-warning branch from aa9280c to 26da9f7 Compare May 12, 2026 01:37
Copy link
Copy Markdown
Member

@bonachea bonachea left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@PHHargrove PHHargrove merged commit 008533b into BerkeleyLab:develop May 12, 2026
38 checks passed
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.

2 participants