From patchwork Wed May 3 02:37:03 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Sebor X-Patchwork-Id: 757835 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org 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 3wHj4N4hcVz9s65 for ; Wed, 3 May 2017 12:37:40 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="xfB10y1z"; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :subject:to:message-id:date:mime-version:content-type; q=dns; s= default; b=rMFYKwd8LzIU9utFth2CpiK5sr2AgSo2js/fodmiWA02x9G75WNHP 7wCKTZyzOtSS9Scht1yPR6YW0S5ls9R0DNK9G2un2tyeBVOyc/M9tXqTPCdNsgys wSuKsB2PE3OM6AyClY57affiG1WpUD4O5M5CNDnwk0t7T4nAfrzMnc= 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:from :subject:to:message-id:date:mime-version:content-type; s= default; bh=dSD+1RIobYoXaYcttFyzTNJJZ4w=; b=xfB10y1zHNqSVYvT34db 40Cbo8D2svsVI9j1kuj/56w9bqOYq5XVU+5FGbgitn0zBex4d2zscIVIMkAKPILP EtFv55JddEgtnnkzZTlT8mVwYiKbkx9zTyU0kejiTdPdIaWVR6Yv1mZ4oMbG3gzx Gc7xjB9M87PaQ8JCdt7MMfY= Received: (qmail 88619 invoked by alias); 3 May 2017 02:37:07 -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 88457 invoked by uid 89); 3 May 2017 02:37:06 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-24.9 required=5.0 tests=AWL, BAYES_00, FREEMAIL_FROM, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_STOCKGEN, RCVD_IN_DNSWL_NONE, RCVD_IN_SORBS_SPAM, SPF_PASS autolearn=ham version=3.3.2 spammy=ost X-HELO: mail-qk0-f180.google.com Received: from mail-qk0-f180.google.com (HELO mail-qk0-f180.google.com) (209.85.220.180) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 03 May 2017 02:37:04 +0000 Received: by mail-qk0-f180.google.com with SMTP id u75so4434369qka.3 for ; Tue, 02 May 2017 19:37:06 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:subject:to:message-id:date:user-agent :mime-version; bh=xGeQ02ouuRrKnCPSRrjXBwfUtxlPGNT99HiqT6HEAG0=; b=pVLZffdYHDAFbxQRhLOfDM3RK1tK7xpY5Ma9ZG8NtL9Iur5OI06HwzmHRV9aZoDTSK jc7AjctPVl1EC8j+lVVNBOf/0IdeIaHiFt+JAoTcvcZkGsI+RMt6Lbucd2VoWPu5O5Be ySREsy849zv6935YmNLhTKuygPCGl5yoiXLZ3GNjYQQzX82MG7ImLlBU5mFNm006ydpG 12Sxqz9kGraMk5lz0N9nYAlwf4AlOEtP0r4jlesiqqRJILtARnCIe85Xh8bSJZYE8haa DNfyiG56h/2tIhnHr283D7b+gCWQ2cYq4lWBlWvtwzr0zRBPew9IgQhCSj+Fcvbbg9d+ RMNw== X-Gm-Message-State: AODbwcDUU90A/pQ94VM7kJAK8PtsFVERsMdujU7/tvj2ejlRk50GtJlt OUlV3sgjE+9joQdI X-Received: by 10.55.21.90 with SMTP id f87mr1000703qkh.240.1493779025516; Tue, 02 May 2017 19:37:05 -0700 (PDT) Received: from localhost.localdomain (75-166-101-229.hlrn.qwest.net. [75.166.101.229]) by smtp.gmail.com with ESMTPSA id g3sm15378936qte.66.2017.05.02.19.37.04 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 02 May 2017 19:37:04 -0700 (PDT) From: Martin Sebor Subject: [PATCH 2/7] clean up quoting problems - gcc (PR 80280 et al.) To: Gcc Patch List Message-ID: <35079054-9e76-f75e-68cd-59aed09a3977@gmail.com> Date: Tue, 2 May 2017 20:37:03 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 X-IsSubscribed: yes The attached patch adds missing quoting to diagnostic directives in files in the top-level gcc/ directory. Martin gcc/ChangeLog: * builtins.c (expand_builtin_object_size): Add missing quoting to %D and like directives. * hsa-gen.c (hsa_type_for_scalar_tree_type): Same. (hsa_type_for_tree_type): Same. (verify_function_arguments): Same. * symtab.c (symbol_table::change_decl_assembler_name): Same. * varasm.c (get_section): Same. (mark_weak): Same. diff --git a/gcc/builtins.c b/gcc/builtins.c index f3bee5b..5567fd2 100644 --- a/gcc/builtins.c +++ b/gcc/builtins.c @@ -9493,7 +9493,7 @@ expand_builtin_object_size (tree exp) if (!validate_arglist (exp, POINTER_TYPE, INTEGER_TYPE, VOID_TYPE)) { - error ("%Kfirst argument of %D must be a pointer, second integer constant", + error ("%Kfirst argument of %qD must be a pointer, second integer constant", exp, fndecl); expand_builtin_trap (); return const0_rtx; @@ -9506,7 +9506,7 @@ expand_builtin_object_size (tree exp) || tree_int_cst_sgn (ost) < 0 || compare_tree_int (ost, 3) > 0) { - error ("%Klast argument of %D is not integer constant between 0 and 3", + error ("%Klast argument of %qD is not integer constant between 0 and 3", exp, fndecl); expand_builtin_trap (); return const0_rtx; diff --git a/gcc/hsa-gen.c b/gcc/hsa-gen.c index 7b69d64..4b85e0b 100644 --- a/gcc/hsa-gen.c +++ b/gcc/hsa-gen.c @@ -587,7 +587,7 @@ hsa_type_for_scalar_tree_type (const_tree type, bool min32int) { HSA_SORRY_ATV (EXPR_LOCATION (type), "support for HSA does not implement huge or " - "variable-sized type %T", type); + "variable-sized type %qT", type); return res; } @@ -616,7 +616,7 @@ hsa_type_for_scalar_tree_type (const_tree type, bool min32int) if (res == BRIG_TYPE_NONE) { HSA_SORRY_ATV (EXPR_LOCATION (type), - "support for HSA does not implement type %T", type); + "support for HSA does not implement type %qT", type); return res; } @@ -628,7 +628,7 @@ hsa_type_for_scalar_tree_type (const_tree type, bool min32int) { HSA_SORRY_ATV (EXPR_LOCATION (type), "support for HSA does not implement a vector type " - "where a type and unit size are equal: %T", type); + "where a type and unit size are equal: %qT", type); return res; } @@ -645,7 +645,7 @@ hsa_type_for_scalar_tree_type (const_tree type, bool min32int) break; default: HSA_SORRY_ATV (EXPR_LOCATION (type), - "support for HSA does not implement type %T", type); + "support for HSA does not implement type %qT", type); } } @@ -704,7 +704,7 @@ hsa_type_for_tree_type (const_tree type, unsigned HOST_WIDE_INT *dim_p = NULL, if (!tree_fits_uhwi_p (TYPE_SIZE_UNIT (type))) { HSA_SORRY_ATV (EXPR_LOCATION (type), "support for HSA does not " - "implement huge or variable-sized type %T", type); + "implement huge or variable-sized type %qT", type); return BRIG_TYPE_NONE; } @@ -732,8 +732,8 @@ hsa_type_for_tree_type (const_tree type, unsigned HOST_WIDE_INT *dim_p = NULL, || !tree_fits_shwi_p (TYPE_MAX_VALUE (domain))) { HSA_SORRY_ATV (EXPR_LOCATION (type), - "support for HSA does not implement array %T with " - "unknown bounds", type); + "support for HSA does not implement array " + "%qT with unknown bounds", type); return BRIG_TYPE_NONE; } HOST_WIDE_INT min = tree_to_shwi (TYPE_MIN_VALUE (domain)); @@ -3485,14 +3485,14 @@ verify_function_arguments (tree decl) if (DECL_STATIC_CHAIN (decl)) { HSA_SORRY_ATV (EXPR_LOCATION (decl), - "HSA does not support nested functions: %D", decl); + "HSA does not support nested functions: %qD", decl); return; } else if (!TYPE_ARG_TYPES (type) || stdarg_p (type)) { HSA_SORRY_ATV (EXPR_LOCATION (decl), "HSA does not support functions with variadic arguments " - "(or unknown return type): %D", decl); + "(or unknown return type): %qD", decl); return; } } diff --git a/gcc/symtab.c b/gcc/symtab.c index 342cc36..6c41dcf 100644 --- a/gcc/symtab.c +++ b/gcc/symtab.c @@ -296,7 +296,7 @@ symbol_table::change_decl_assembler_name (tree decl, tree name) const char *old_name = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl)); if (TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (decl)) && DECL_RTL_SET_P (decl)) - warning (0, "%D renamed after being referenced in assembly", decl); + warning (0, "%qD renamed after being referenced in assembly", decl); SET_DECL_ASSEMBLER_NAME (decl, name); if (alias) diff --git a/gcc/varasm.c b/gcc/varasm.c index 05e48a5..096871d 100644 --- a/gcc/varasm.c +++ b/gcc/varasm.c @@ -320,15 +320,15 @@ get_section (const char *name, unsigned int flags, tree decl) && decl != sect->named.decl) { if (decl != NULL && DECL_P (decl)) - error ("%+D causes a section type conflict with %D", + error ("%+qD causes a section type conflict with %qD", decl, sect->named.decl); else - error ("section type conflict with %D", sect->named.decl); + error ("section type conflict with %qD", sect->named.decl); inform (DECL_SOURCE_LOCATION (sect->named.decl), "%qD was declared here", sect->named.decl); } else if (decl != NULL && DECL_P (decl)) - error ("%+D causes a section type conflict", decl); + error ("%+qD causes a section type conflict", decl); else error ("section type conflict"); /* Make sure we don't error about one section multiple times. */ @@ -5383,7 +5383,7 @@ mark_weak (tree decl) struct symtab_node *n = symtab_node::get (decl); if (n && n->refuse_visibility_changes) - error ("%+D declared weak after being used", decl); + error ("%+qD declared weak after being used", decl); DECL_WEAK (decl) = 1; if (DECL_RTL_SET_P (decl)