From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 22C4B3858C2F; Sun, 12 Mar 2023 13:37:53 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 22C4B3858C2F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1678628274; bh=nE6mVXKPkMdjB71UFNz0IZd+b0FcH7vcxKY2b8MJrq8=; h=From:To:Subject:Date:In-Reply-To:References:From; b=F+Bo6a9+t7q9z5Eo5OC8aUCHNgeg8p8HEyt87vglKwllSSEX6Gv2Lw1ywybBIAZya ktY6D4ykRHv+iMGF5fW8yHzL+SWZ99jGx0b1Jc6w1ZSdXIzKxHhNXNYj7GO48a+Zm0 wjXNz8AJqAf8ZWufaKuwpzbaCPD78I7Z6DQEOKkg= From: "flast at flast dot jp" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/107532] [13 Regression] -Werror=dangling-reference false positives in libcamera-0.0.1 Date: Sun, 12 Mar 2023 13:37:53 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 13.0 X-Bugzilla-Keywords: diagnostic X-Bugzilla-Severity: normal X-Bugzilla-Who: flast at flast dot jp X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: FIXED X-Bugzilla-Priority: P1 X-Bugzilla-Assigned-To: mpolacek at gcc dot gnu.org X-Bugzilla-Target-Milestone: 13.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: 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=3D107532 --- Comment #21 from Kohei Takahashi --- (In reply to Marek Polacek from comment #18) > (In reply to Barnab=C3=A1s P=C5=91cze from comment #17) > > The simple test case with std::span still triggers the warning: > > https://gcc.godbolt.org/z/43cKxdqr3. I feel that without deeper code > > analysis such a warning will generate too many false positives and peop= le > > will simply turn it off. >=20 > There really haven't been that many, except this and one with range-based > for loops. I think it warns many usage of zip_iterator idiom such as boost.iterator and P2321 style flat_map. Those uses tuple of references like std::tuple= by dereferencing iterator, so that any algorithms may yield this warning.=