From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 9017F385841A; Thu, 7 Mar 2024 17:42:09 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9017F385841A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1709833329; bh=parxNzc34KLDN+BoL+03bJ9muDj/OV9MO9EKgykAupo=; h=From:To:Subject:Date:In-Reply-To:References:From; b=fTkphr+fKiITc+8ntBb3nVc+q3kyren/yDVGNpKnnxnQGfarmwiByu+d2+UGvHVhA 9VvAHJeuQWqoc5Vf6dKIWqeMGbrCwAhhzeDRbe98yQ51sSvb6fKI6CuBOVTokKE9qc M0cuaH1xw6WClV0PW4yO0lEZQMrHuHjL3F3LcZok= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/114267] bogus -Wsubobject-linkage when using lambda members as template parameters Date: Thu, 07 Mar 2024 17:42:09 +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: c++-lambda, diagnostic, wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: pinskia 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=3D114267 --- Comment #1 from Andrew Pinski --- Reduced testcase: ``` struct F{ constexpr static const auto a=3D[]() {}; constexpr static const auto b=3D1.0; }; auto t =3D F::a; auto t0 =3D F::b; ``` t is localized while t0 is not.=