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

-Wstringop-overflow in GCC 12.1 at -O3 (not reproducible in GCC trunk) #2989

Closed
hgkjshegfskef opened this issue Jul 16, 2022 · 2 comments
Closed

Comments

@hgkjshegfskef
Copy link

hgkjshegfskef commented Jul 16, 2022

fmtlib: trunk
Repro: https://godbolt.org/z/7YM9oY4cj

Perhaps this is just to add to the collection of bogus -Wstringop-overflow warnings. Unless I'm using the library incorrectly. Seems to be fixed in GCC trunk (future version 13?). Note that the warning does not appear at -O2 and lower.

@vitaut
Copy link
Contributor

vitaut commented Jul 16, 2022

This looks like a false positive which is fixed in the latest gcc so I don't think we should do anything about it. You can suppress the warning with FMT_SYSTEM_HEADERS or some other method.

@vitaut
Copy link
Contributor

vitaut commented Mar 18, 2023

Worked around in d9bc5f1.

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