From patchwork Sat Nov 17 16:16:01 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sandra Loosemore X-Patchwork-Id: 999338 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-490373-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="ZS411ugS"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 42y0bN5s9lz9s9G for ; Sun, 18 Nov 2018 03:16:31 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:to :from:subject:message-id:date:mime-version:content-type; q=dns; s=default; b=BdR6ae2g08Ilah3/kt7h/B3yXztlhXHYJ0F78NTCdEI5ixAxqZ XpaBWpyn+m6C3+oFRyTGLgLgNp0OfZcIJXPmqLddKOQJ2CDbUVlTP8EVGenChZET xIaeNelpIKOGRmqO/XoCcHDDrcEu23Fac92PvYFn2H1E+g7SZ82ii1X7c= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:to :from:subject:message-id:date:mime-version:content-type; s= default; bh=5rHBYaQ1N/8S4sa394JOgNfQM9s=; b=ZS411ugS3JJZWR2ZHpLu mlAGdGbN1P2qFH6JFztfMUOFN7waBI+bgSw6sC0F1epgtw0Nl9KqZ2PO4Bagf805 +oOS7dIKeEUmH7vpe6kmInuYWEEk3+tDFaQP4ory+MWKtzFgsWp6hVWhaNqX83H9 cSpp67pFZ5RZaLFVxEHWMKQ= Received: (qmail 107305 invoked by alias); 17 Nov 2018 16:16:23 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 107273 invoked by uid 89); 17 Nov 2018 16:16:20 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-16.0 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.2 spammy=oldest, H*r:0800 X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sat, 17 Nov 2018 16:16:18 +0000 Received: from svr-orw-mbx-03.mgc.mentorg.com ([147.34.90.203]) by relay1.mentorg.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-SHA384:256) id 1gO3GZ-00023j-U2 from Sandra_Loosemore@mentor.com for gcc-patches@gcc.gnu.org; Sat, 17 Nov 2018 08:16:15 -0800 Received: from [127.0.0.1] (147.34.91.1) by svr-orw-mbx-03.mgc.mentorg.com (147.34.90.203) with Microsoft SMTP Server (TLS) id 15.0.1320.4; Sat, 17 Nov 2018 08:16:13 -0800 To: "gcc-patches@gcc.gnu.org" From: Sandra Loosemore Subject: [doc, committed] clarify -fno-implicit-templates usage Message-ID: <08230f66-25c8-c577-8ebc-133ca73ab47c@codesourcery.com> Date: Sat, 17 Nov 2018 09:16:01 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 This patch is for PR 4025, one of the oldest documentation issues in bugzilla. I think that since 2001 (GCC 3.0) expectations for C++ template handling have evolved so that users expect it to "just work" without messing with options like this, but it's a trivial fix to the docs. -Sandra Index: gcc/doc/invoke.texi =================================================================== --- gcc/doc/invoke.texi (revision 266233) +++ gcc/doc/invoke.texi (working copy) @@ -2574,6 +2574,9 @@ This option is implied by the strict ISO @opindex fimplicit-templates Never emit code for non-inline templates that are instantiated implicitly (i.e.@: by use); only emit code for explicit instantiations. +If you use this option, you must take care to structure your code to +include all the necessary explicit instantiations to avoid getting +undefined symbols at link time. @xref{Template Instantiation}, for more information. @item -fno-implicit-inline-templates