Skip to content

Apply PR #2297 to devel branch#2300

Merged
horenmar merged 3 commits intocatchorg:develfrom
codeinred:devel
Oct 21, 2021
Merged

Apply PR #2297 to devel branch#2300
horenmar merged 3 commits intocatchorg:develfrom
codeinred:devel

Conversation

@codeinred
Copy link
Copy Markdown
Contributor

Description

It turns out that Issue #2272 partially affected the devel branch. When building tests with C++20, the compiler emits a warning that top-level comma expressions in array subscripts are depricated. Warnings are treated as errors, so this caused the build to fail.

This commit adds localized warning suppression in accordance with this recommendation here.

GitHub Issues

It turns out that Issue #2272 also partially applied to the devel branch. This issue was marked as closed, but the fix was only ever applied to the 2.x release branch, and still exists on the devel branch.

It turns out that Issue catchorg#2272 partially affected the devel branch. When
building tests with C++20, the compiler emits a warning that top-level
comma expressions in array subscripts are depricated. Warnings are
treated as errors, so this caused the build to fail.

This commit adds localized warning suppression
in accordance with this recommendation here:
catchorg#2297 (comment)

Signed-off-by: Alecto Irene Perez <perez.cs@pm.me>
@codeinred
Copy link
Copy Markdown
Contributor Author

It's important to note that part of the fix applied in #2297 (removing using declarations for deleted functions inside the custom allocator class) wasn't necessary for the devel branch.

This commit fixes an unkwown pragma warning on older versions of GCC
and Clang. These older versions don't have a warning for depricated use
of the comma subscript. Because warning suppression is localized, and
only refers to the comma subscript warning, it doesn't affect compiler
warnings in other parts of the code.

Signed-off-by: Alecto Irene Perez <perez.cs@pm.me>
Signed-off-by: Alecto Irene Perez <perez.cs@pm.me>
@codecov
Copy link
Copy Markdown

codecov bot commented Oct 11, 2021

Codecov Report

Merging #2300 (281e752) into devel (36b4a71) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##            devel    #2300   +/-   ##
=======================================
  Coverage   91.06%   91.06%           
=======================================
  Files         150      150           
  Lines        7139     7139           
=======================================
  Hits         6501     6501           
  Misses        638      638           

@horenmar horenmar merged commit 06cf2a4 into catchorg:devel Oct 21, 2021
@horenmar
Copy link
Copy Markdown
Member

Thanks

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