From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 17AAC3858C2F; Mon, 30 Oct 2023 14:09:59 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 17AAC3858C2F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1698674999; bh=Y/TrEUxN7/VZiOtEzPp7/dPY4sxFenwjw5d9gzrW8Ck=; h=From:To:Subject:Date:In-Reply-To:References:From; b=JpXkvmflxkl34gdDS/Uv2lixyC7GIm/YgEHffhOLrh3CyGdckckKWL8ATEgbJtexM nHJAzcbC0Z7fxsgTiYVMXGj3lg9SKtenfArZ0FQqk94PgY+9EiJBIUrAWPBI7pgimU WUIf6Fp0NVWFhRrSk7aRkyGpeXlaD6OGt3v5YMoc= From: "redi at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/112293] Enhance error reporting with fix-it for missing in gcc 14 Date: Mon, 30 Oct 2023 14:09:58 +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: 14.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: redi at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED 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: 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=3D112293 --- Comment #1 from Jonathan Wakely --- (In reply to Petr Van=C4=9Bk from comment #0) > The issue appears to arise from internal changes in libstdc++ that now > require the explicit inclusion of the header (this part is > likely a bug within rspamd). The C++ standard always required the explicit inclusion of for = the std::remove algorithm. This is definitely a bug in rspamd. > Is it possible to enhance the error messaging, > perhaps with a fix-it hint, to suggest that needs to be > explicitly included for clarity? That would be difficult, because std::remove is overloaded and another over= load was found here (the one declared in ). Usually we only provide fix-= it hints when name lookup doesn't find anything. > Here is the minimized snippet to reproduce the issue: >=20 > #include > #include > struct test; > std::vector v; > auto f(test *t) { > auto it =3D std::remove(begin(v), end(v), t); > } This is broken in two ways, you need to include both *and* for this program.=