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

Workaround for GCC -Wduplicated-branches, again #1912

Closed
mjanzen opened this issue Oct 3, 2020 · 2 comments
Closed

Workaround for GCC -Wduplicated-branches, again #1912

mjanzen opened this issue Oct 3, 2020 · 2 comments

Comments

@mjanzen
Copy link

mjanzen commented Oct 3, 2020

I see that Issue 573 fixed a duplicated-branches warning from gcc 7.1, back in 2017. I'm trying out fmtlib 7.0.3 with gcc 7.5.0, and am running into a similar duplicated-branches warning.

The fmtlib code has moved around since then, but following the example in commit bef89db I was able to add the same workaround to fmtlib 7.0.3 by changing 1 to +1 in fmt/core.h in lines 913 and 925.

@mjanzen
Copy link
Author

mjanzen commented Oct 3, 2020

I don't have permission to do a pull request, but here's a quick patch:

fmtlib.1912.patch.txt

vitaut added a commit that referenced this issue Oct 4, 2020
vitaut added a commit that referenced this issue Oct 4, 2020
@vitaut
Copy link
Contributor

vitaut commented Oct 4, 2020

Added a workaround in #1914. Thanks for reporting.

@vitaut vitaut closed this as completed Oct 4, 2020
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

No branches or pull requests

2 participants