From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 5D1F53858010; Mon, 24 Jan 2022 12:29:19 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5D1F53858010 From: "redi at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/61596] -Wunused-local-typedefs warns incorrectly on a typedef that's referenced indirectly Date: Mon, 24 Jan 2022 12:29:19 +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: unknown X-Bugzilla-Keywords: diagnostic X-Bugzilla-Severity: normal X-Bugzilla-Who: redi at gcc dot gnu.org 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: cf_reconfirmed_on 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 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Jan 2022 12:29:19 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D61596 Jonathan Wakely changed: What |Removed |Added ---------------------------------------------------------------------------- Last reconfirmed|2014-06-26 00:00:00 |2022-1-24 --- Comment #5 from Jonathan Wakely --- This now warns about libstdc++ code, see PR 104019: /build/trunk/x86_64-unknown-dragonfly6.3/libstdc++-v3/include/bits/shared_p= tr_base.h: In member function 'void std::_Sp_counted_array_base<_Alloc>::_M_init(typen= ame std::allocator_traits<_Alloc>::value_type*, _Init)': /build/trunk/x86_64-unknown-dragonfly6.3/libstdc++-v3/include/bits/shared_p= tr_base.h:767: warning: typedef 'using value_type =3D using _Up =3D typename std::allocator_traits<_Alloc>::value_type' locally defined but not used [-Wunused-local-typedefs] /build/trunk/x86_64-unknown-dragonfly6.3/libstdc++-v3/include/bits/shared_p= tr_base.h:768: warning: typedef 'using difference_type =3D std::ptrdiff_t' locally defined= but not used [-Wunused-local-typedefs] /build/trunk/x86_64-unknown-dragonfly6.3/libstdc++-v3/include/bits/shared_p= tr_base.h:771: warning: typedef 'using iterator_category =3D struct std::forward_iterator_= tag' locally defined but not used [-Wunused-local-typedefs] In file included from /build/trunk/x86_64-unknown-dragonfly6.3/libstdc++-v3/include/x86_64-unknow= n-dragonfly6.3/bits/stdc++.h:144: Those typedefs are 100% necessary because otherwise the local class is not a valid iterator type.=