Skip to content

Revert unintended change to GSL_SUPPRESS#1226

Merged
carsonRadtke merged 1 commit into
microsoft:mainfrom
beinhaerter:fix_suppress
Dec 4, 2025
Merged

Revert unintended change to GSL_SUPPRESS#1226
carsonRadtke merged 1 commit into
microsoft:mainfrom
beinhaerter:fix_suppress

Conversation

@beinhaerter

@beinhaerter beinhaerter commented Dec 4, 2025

Copy link
Copy Markdown
Contributor

PR #1213 changed this line. According to https://github.com/microsoft/GSL/pull/1213/files#r2586073058 the change was unintended. This PR reverts the line to the previous implementation.

PR microsoft#1213 changed this line. According to https://github.com/microsoft/GSL/pull/1213/files#r2586073058 the change was unintended. This PR reverts the change to the previous implementation.
Comment thread include/gsl/assert
@@ -51,7 +51,7 @@
// Visual Studio versions after 2022 (_MSC_VER > 1944) support the justification message.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The comment and check above it are not true.

This is mostly a note for me, feel free to punt this and I will take care of populating the correct information.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Also, the motivation for this change has nothing to do with the justification message and everything to do with the warning for using gsl::suppress(x) instead of gsl::suppress("x").

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

As the PR is still open and not merged: do you want me to do or change something?

If you tell me what to change, I can do so. Best might be if you add a comment with a suggestion that can directly be applied here in the web UI. But maybe it is better if you change the check to whatever is right in another PR?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I'll take care of it.

@carsonRadtke

Copy link
Copy Markdown
Member

These changes look good to me! Thanks!

@carsonRadtke carsonRadtke merged commit 4fb5912 into microsoft:main Dec 4, 2025
87 checks passed
Copilot AI pushed a commit that referenced this pull request Dec 4, 2025
PR #1213 changed this line. According to https://github.com/microsoft/GSL/pull/1213/files#r2586073058 the change was unintended. This PR reverts the change to the previous implementation.

Co-authored-by: Werner Henze <w.henze@avm.de>
@beinhaerter beinhaerter deleted the fix_suppress branch December 5, 2025 13:14
carsonRadtke added a commit that referenced this pull request May 20, 2026
* export proper syntax for GSL_SUPPRESS for new VS (#1213)

A new Visual Studio version will soon be available that deprecates the
old syntax for gsl::suppress. Customers will now get a C4875 diagnostic
on suppressions that look like `gsl::suppress(x)` urging them to use
`gsl::suppress("x")` instead.

This change updates the `GSL_SUPPRESS` macro to preprocess
GSL_SUPPRESS(x) to gsl::suppress("x") on clang and new versions of MSVC.

* Revert unintended change to GSL_SUPPRESS (#1226)

PR #1213 changed this line. According to https://github.com/microsoft/GSL/pull/1213/files#r2586073058 the change was unintended. This PR reverts the change to the previous implementation.

Co-authored-by: Werner Henze <w.henze@avm.de>

---------

Co-authored-by: Werner Henze <34543625+beinhaerter@users.noreply.github.com>
Co-authored-by: Werner Henze <w.henze@avm.de>
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