Summary: | [meta-bug] bogus/missing -Wstringop-overread warnings | ||
---|---|---|---|
Product: | gcc | Reporter: | Martin Sebor <msebor> |
Component: | middle-end | Assignee: | Not yet assigned to anyone <unassigned> |
Status: | NEW --- | ||
Severity: | normal | CC: | egallager, sjames, tonyguil, vopl |
Priority: | P3 | Keywords: | diagnostic, meta-bug |
Version: | 11.0 | ||
Target Milestone: | --- | ||
See Also: | https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97185 | ||
Host: | Target: | ||
Build: | Known to work: | ||
Known to fail: | Last reconfirmed: | 2020-09-14 00:00:00 | |
Bug Depends on: | 93665, 96725, 97047, 98548, 98553, 99673, 100717, 101042, 101361, 101778, 101917, 101919, 102810, 103145, 105424, 106709, 107087, 107395, 108154, 108197, 109716, 109968, 109980, 110884, 111118, 111499, 81437, 82456, 98465, 100516, 110060 | ||
Bug Blocks: |
Description
Martin Sebor
2020-09-14 16:23:21 UTC
Source file foo.cpp: #include <vector> struct T { void* p ; std::vector<char> a[10] ; } ; void f (T& t, const std::vector<char>& u, int i) { std::vector<char>& v = t.a[i] ; std::vector<char> w (u.begin(), u.end()) ; v.resize (v.size() - w.size()) ; // <-- Warning generated here } Command line: g++ -std=c++20 -Wall -O3 -c -o foo.obj foo.cpp g++ --version: g++.exe (MinGW-W64 x86_64-ucrt-posix-seh, built by Brecht Sanders) 12.2.0 Problem: Spurious warning emitted: specified bound between 9223372036854775808 and 18446744073709551614 exceeds maximum object size 9223372036854775807 [-Wstringop-overflow=] Tony, this is just a meta-bug that has links to the real bugs. Please either add that as a comment to an existing bug (if it's the same as one of them) or file a new bug (and set "Blocks: 97048" so that it links back here). But since your one seems to be about -Wstringop-overflow not -Wstringop-overread I don't think it is actually related to this meta-bug at all. Maybe it's related to PR 97185 instead. I jumped through enough hoops already, I think. You can take it from here if you want. All the best, Tony On 16/05/2023 18:28, redi at gcc dot gnu.org wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97048 > > --- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> --- > Tony, this is just a meta-bug that has links to the real bugs. Please either > add that as a comment to an existing bug (if it's the same as one of them) or > file a new bug (and set "Blocks: 97048" so that it links back here). But since > your one seems to be about -Wstringop-overflow not -Wstringop-overread I don't > think it is actually related to this meta-bug at all. Maybe it's related to PR > 97185 instead. > |