From patchwork Tue Sep 5 19:55:39 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nathan Sidwell X-Patchwork-Id: 810267 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-461535-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="K2jpUr/A"; 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 3xmyBk2h5Hz9sPs for ; Wed, 6 Sep 2017 05:55:57 +1000 (AEST) 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=hYYx4Bp65OcET9Gugi3/S+8Uw0aJ6J6ew3mTvdL6Ee+M01kXin ZVOQCsk9CQ3ApsCKOqceIPwC5OmH+QtwSwkJuKmW3p7LosNfliGc5zZKO3WW4ejn oo97ozEpYgrJAErddNQFWkqjavD+0dikJzcVsuXvs6G6UztCGGYPc39OA= 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=hvkzAJOBoj9girg5q5yCzIQj6WM=; b=K2jpUr/AXPJkVaa/Ii5a ouhMrRTaPmHkZ4VcBGCHpL0o5D6yqsx69Q2Sm+nJCdeGFdBda0PjoUu/rZVyHnAf hrp2qmAjgnEZPA3xNs2SxxFhqhqCM4wPaPY8QwAs8IhuIdCqtm5wuWcl6gv91nKC ylvZaZH2uWcKD8UAv5HMkik= Received: (qmail 66775 invoked by alias); 5 Sep 2017 19:55:49 -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 65593 invoked by uid 89); 5 Sep 2017 19:55:48 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-10.6 required=5.0 tests=BAYES_00, FREEMAIL_FROM, GIT_PATCH_2, GIT_PATCH_3, KAM_ASCII_DIVIDERS, RCVD_IN_DNSWL_NONE, RCVD_IN_SORBS_SPAM, SPF_PASS autolearn=ham version=3.3.2 spammy=tmpl, Hx-languages-length:1725 X-HELO: mail-yw0-f175.google.com Received: from mail-yw0-f175.google.com (HELO mail-yw0-f175.google.com) (209.85.161.175) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 05 Sep 2017 19:55:43 +0000 Received: by mail-yw0-f175.google.com with SMTP id w204so16078073ywg.3 for ; Tue, 05 Sep 2017 12:55:43 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:to:from:subject:message-id:date :user-agent:mime-version:content-language; bh=7otuMAxS8AdUT8Bg90sO0lkO92YH1KSaFwSI//1DptE=; b=XgaCdLIt6ufv6LOZqptAO+6NyORXIkDdxyybB9Xwvf6q9LXHLuxX9ZZI6dCEqeY8/P S8HPAEbOlBvZ0+L3jJuKkoZKCKwgGtnV/ZBLUujWgusLzzfB2ujzNf5VI4Xe87NDapAs 41rRGzviSBg4WrWntSRXpqAaDyEYR200qKEz6dLGWQNpo1u2JhrXcgkwTQqvAlqtZuPM pkWXuJeyggWj/mD08fu1+m5LtL7IyAwY4TDB0BKgjLYugcw8YHqodQwcQPA2yCRlLlVj jI+MBQath5t/jGSvY88KbfyHkisCi2g00Z1tdK9vrnY6dvalwqtA2PpkvAcBnnpTue0b 0BzQ== X-Gm-Message-State: AHPjjUh8dPFRxVSfinn8XFeub0aSJkblR7orycQ/qfJ35/olKeGoqmpS oZyv3YQaKFYCFg== X-Google-Smtp-Source: ADKCNb52hJcNgorALBYsH8bgKrHZYMkq9JpX7gjQ27U+veuUov1KA7HPEZBkUHytVHuaJ0IqlvmllA== X-Received: by 10.129.39.214 with SMTP id n205mr178859ywn.426.1504641342005; Tue, 05 Sep 2017 12:55:42 -0700 (PDT) Received: from ?IPv6:2620:10d:c0a3:20fb:7500:e7fb:4a6f:2254? ([2620:10d:c091:200::16fd]) by smtp.googlemail.com with ESMTPSA id l21sm473773ywa.23.2017.09.05.12.55.41 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 05 Sep 2017 12:55:41 -0700 (PDT) To: GCC Patches From: Nathan Sidwell Subject: [C++ PATCH] two cleanups Message-ID: <756f48a2-84bb-cb48-e17c-fd259d040dde@acm.org> Date: Tue, 5 Sep 2017 15:55:39 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 I noticed an 'if (cond)' nested inside an 'if (exact-same-cond)'. Fixed thusly. Also, pt.c was using '"\' to deal with a long error message, and not 5 lines further just having an overly long line. Fixed by using strinc constant concatenation. I also added a %<...%> around a fragment that we're elling the user to insert. applied to trunk. nathan 2017-09-05 Nathan Sidwell * class.c (unreverse_member_declarations): Remove extraneous if. * pt.c (push_template_decl_real): Use string concatenation, not \. Add %<..%>. Index: class.c =================================================================== --- class.c (revision 251722) +++ class.c (working copy) @@ -7070,8 +7001,7 @@ unreverse_member_declarations (tree t) if (prev) { DECL_CHAIN (TYPE_FIELDS (t)) = x; - if (prev) - TYPE_FIELDS (t) = prev; + TYPE_FIELDS (t) = prev; } } Index: pt.c =================================================================== --- pt.c (revision 251722) +++ pt.c (working copy) @@ -5572,11 +5572,11 @@ push_template_decl_real (tree decl, bool (TI_ARGS (tinfo), TI_ARGS (get_template_info (DECL_TEMPLATE_RESULT (tmpl))))) { - error ("\ -template arguments to %qD do not match original template %qD", - decl, DECL_TEMPLATE_RESULT (tmpl)); + error ("template arguments to %qD do not match original" + "template %qD", decl, DECL_TEMPLATE_RESULT (tmpl)); if (!uses_template_parms (TI_ARGS (tinfo))) - inform (input_location, "use template<> for an explicit specialization"); + inform (input_location, "use %%> for" + " an explicit specialization"); /* Avoid crash in import_export_decl. */ DECL_INTERFACE_KNOWN (decl) = 1; return error_mark_node;