Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix build with GCC 11 #505

Merged
merged 1 commit into from
Nov 4, 2021
Merged

Fix build with GCC 11 #505

merged 1 commit into from
Nov 4, 2021

Conversation

jktjkt
Copy link
Contributor

@jktjkt jktjkt commented May 17, 2021

GCC 11 started warning about unused-but-set variables. Here's how it
fails:

 examples/all_features/stringification.cpp: In function ‘void _DOCTEST_ANON_FUNC_20()’:
 examples/all_features/stringification.cpp:106:26: error: variable ‘bla2’ set but not used [-Werror=unused-but-set-variable]
   106 |     MyTypeInherited<int> bla2;
       |                          ^~~~

I don't think that that assignment is actually doing anything; in fact,
there's that other variable which is assigned in a similar manner, but
that one is also used for an assert.

GCC 11 started warning about unused-but-set variables. Here's how it
fails:

 examples/all_features/stringification.cpp: In function ‘void _DOCTEST_ANON_FUNC_20()’:
 examples/all_features/stringification.cpp:106:26: error: variable ‘bla2’ set but not used [-Werror=unused-but-set-variable]
   106 |     MyTypeInherited<int> bla2;
       |                          ^~~~

I don't think that that assignment is actually doing anything; in fact,
there's that other variable which is assigned in a similar manner, but
that one is also used for an assert.
@jktjkt
Copy link
Contributor Author

jktjkt commented Aug 30, 2021

A gentle ping to see if I can get this one merged.

arkamar added a commit to arkamar/gentoo that referenced this pull request Sep 13, 2021
Apply patch in order to fix gcc-11 related compilation error. The patch
follows proposed fixes to upstream [1,2].

[1] doctest/doctest#505
[2] doctest/doctest#520

Closes: https://bugs.gentoo.org/812077
Signed-off-by: Petr Vaněk <arkamar@atlas.cz>
gentoo-bot pushed a commit to gentoo/gentoo that referenced this pull request Sep 18, 2021
Apply patch in order to fix gcc-11 related compilation error. The patch
follows proposed fixes to upstream [1,2].

[1] doctest/doctest#505
[2] doctest/doctest#520

Closes: https://bugs.gentoo.org/812077
Signed-off-by: Petr Vaněk <arkamar@atlas.cz>
Closes: #22280
Signed-off-by: Sam James <sam@gentoo.org>
@onqtam onqtam merged commit eafbaab into doctest:dev Nov 4, 2021
@jktjkt jktjkt deleted the cesnet/fix-gcc11 branch November 4, 2021 13:17
onqtam pushed a commit that referenced this pull request Dec 10, 2021
GCC 11 started warning about unused-but-set variables. Here's how it
fails:

 examples/all_features/stringification.cpp: In function ‘void _DOCTEST_ANON_FUNC_20()’:
 examples/all_features/stringification.cpp:106:26: error: variable ‘bla2’ set but not used [-Werror=unused-but-set-variable]
   106 |     MyTypeInherited<int> bla2;
       |                          ^~~~

I don't think that that assignment is actually doing anything; in fact,
there's that other variable which is assigned in a similar manner, but
that one is also used for an assert.
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