From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id C09E43858C52; Tue, 23 May 2023 13:40:28 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C09E43858C52 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1684849228; bh=Pt6IPbsuN/P2a8BP6VQ7xzN3DQdNWcNMHf1aLo67SLU=; h=From:To:Subject:Date:In-Reply-To:References:From; b=x3BNBuUUdX5cnAxpiP8p5mLpbM/ehj5ynVtqngGLOjQHdjmzQZgn6159/2EdZqmMN iIlD+giXkCRfYu6MajRW1vEImQ1OvJLNBTHafOyOXoofiQ1tHYMuFGailqUN881DW4 KddG67DqaEE5Bca53mgFQd+vbGiIQHe1zFzm6Zqw= From: "simon-pfahler at gmx dot de" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/109942] Function template declared extern is implicitly instantiated on -O optimization level when return type is auto Date: Tue, 23 May 2023 13:40:28 +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: 12.2.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: simon-pfahler at gmx dot de X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: WONTFIX 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: bug_status resolution 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=3D109942 Simon Pfahler changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution|--- |WONTFIX --- Comment #3 from Simon Pfahler --- I see your point, and have realized that there is no way around explicitly stating the return types. That was wishful thinking on my part. Still, I feel like the behavior should be identical for any optimization le= vel, but this is more personal opinion and of little relevance for standard-compliance. Marked this issue as resolved, since even if it is a bug (as you said, debatable), it certainly isn't a relevant one.=