From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 18A0E3858C83; Tue, 16 May 2023 17:18:31 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 18A0E3858C83 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1684257511; bh=QT0KseRkKWDxfrJ37qxswe6hD/5BD4PpIVbGt2I5pas=; h=From:To:Subject:Date:In-Reply-To:References:From; b=S9fjI2IYdU+PKjP3VTN5n8m4AxzMchEs22a8mlVNGjAv32vr4vs0N3GXPwVjMFADh lyorANBSkZG4unogoNrmx+zzt3ZFSeVabdyjNZw3XMOHKBtsjaKC/oE8dJKPslfBDx sjj0Kvt+dc3/J9FjPeEwqaWcDlY0No7Rb+MuBRsg= From: "tonyguil at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/97048] [meta-bug] bogus/missing -Wstringop-overread warnings Date: Tue, 16 May 2023 17:18:30 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: middle-end X-Bugzilla-Version: 11.0 X-Bugzilla-Keywords: diagnostic, meta-bug X-Bugzilla-Severity: normal X-Bugzilla-Who: tonyguil at gmail dot com X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D97048 Tony Guilfoyle changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tonyguil at gmail dot com --- Comment #1 from Tony Guilfoyle --- Source file foo.cpp: #include struct T { void* p ; std::vector a[10] ; } ; void f (T& t, const std::vector& u, int i) { std::vector& v =3D t.a[i] ; std::vector w (u.begin(), u.end()) ; v.resize (v.size() - w.size()) ; // <-- Warning generated here } Command line: g++ -std=3Dc++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=3D]=