From patchwork Tue May 14 21:33:10 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Sebor X-Patchwork-Id: 1099748 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-500696-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="ilIYBXcU"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="OjQsCk+C"; 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 453WDX2VN9z9sDn for ; Wed, 15 May 2019 07:34:52 +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=kU6+Rkpx8D07Y4vfFb2qQ4lDhG7lTNpyawEFyGXDxJa0rmNGRt 9ZWUXtuDSKbtz16AvFslhmdGGJSAc3tpZ8gbcDAKFENxCVGjnBy2c6mQ1FXQ1Xp5 oAfVrRchmJKoNjaCyXCw5rtTbFc0olx5Yl/jR0eByNjwRnPJr7Su4PPvE= 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=YtDR20yOyw7qqX5LdqTrl+s0MpE=; b=ilIYBXcUdvdQC5TAiNK2 gue3CiP2eqLoCEvlANLRB0WGA9Ac/5fPX6katMmFCDSpjpVz8G82Jfgai+b6e55W YLep84ATuR9gNPYkTREbN0zzO/9nQA//cpnw3uT+KmymL0/Yp+0zobrd12hCwLH5 d8BFQHspg8h4DpempNYH/bk= Received: (qmail 43932 invoked by alias); 14 May 2019 21:33:17 -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 43884 invoked by uid 89); 14 May 2019 21:33:16 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-21.9 required=5.0 tests=AWL, BAYES_00, FREEMAIL_FROM, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.1 spammy=RELEASE, UD:i386-features.c, i386-features.c, i386featuresc X-HELO: mail-qt1-f171.google.com Received: from mail-qt1-f171.google.com (HELO mail-qt1-f171.google.com) (209.85.160.171) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 14 May 2019 21:33:14 +0000 Received: by mail-qt1-f171.google.com with SMTP id i26so834856qtr.10 for ; Tue, 14 May 2019 14:33:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=to:from:subject:message-id:date:user-agent:mime-version :content-language; bh=7OJZMW/yMAfMvjb0a7K15muQoqVjTCRs63Fkhd1dF44=; b=OjQsCk+CB+z28Xex/ptz6NCQRROaSHEJapWDm4dTv1tgDbRXBC42Umjw7opa7jt34F sRZ1T9OZpI4PXL4Xg31JvyG2FIeqQGjfIQGz/LupVYTDEkegELxtuynNjc++Y8eQdzcM wUJVeLXEEyDW+fGKYDYN2TDPUOxNZ7PrBEqwRrQ7S4wLmhB+LeWqmplOyFf5x6R5O/dk 4zT+Rt5bmXYFlSjefhjVmCGU2rOGgBvbkQOpAXFpqzng0ZbMO8dU9SLy7z//kwkVEQjS pFEkaIA6bD5dff7ngahC+jwjIFoFFe+Kurpg6kmOXzJ9eCc8ekrWFGAh7YMdo4B6K/Uq Sciw== Received: from [192.168.0.41] (97-118-125-210.hlrn.qwest.net. [97.118.125.210]) by smtp.gmail.com with ESMTPSA id f127sm10726338qkb.53.2019.05.14.14.33.11 for (version=TLS1_3 cipher=AEAD-AES128-GCM-SHA256 bits=128/128); Tue, 14 May 2019 14:33:11 -0700 (PDT) To: gcc-patches From: Martin Sebor Subject: [PATCH 11/12] fix diagnostic quoting/spelling issues in i386 back-end Message-ID: <50e6af79-64bd-a660-f101-7f7da1aad6b6@gmail.com> Date: Tue, 14 May 2019 15:33:10 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.3.1 MIME-Version: 1.0 X-IsSubscribed: yes The attached patch fixes quoting, spelling, and other formatting issues in diagnostics issued by the i386 back-end and pointed out by the -Wformat-diag warning. Martin gcc/ChangeLog: * config/i386/i386-expand.c (get_element_number): Quote keywords and other internal names in diagnostics. Adjust other diagnostic formatting issues noted by -Wformat-diag. * config/i386/i386-features.c (ix86_mangle_function_version_assembler_name): Same. * config/i386/i386-options.c (ix86_handle_abi_attribute): Same. * config/i386/i386.c (ix86_function_type_abi): Same. (ix86_function_ms_hook_prologue): Same. (classify_argument): Same. (ix86_expand_prologue): Same. (ix86_md_asm_adjust): Same. (ix86_memmodel_check): Same. diff --git a/gcc/config/i386/i386-expand.c b/gcc/config/i386/i386-expand.c index a55d4923be4..f96f079ee30 100644 --- a/gcc/config/i386/i386-expand.c +++ b/gcc/config/i386/i386-expand.c @@ -10630,7 +10630,8 @@ get_element_number (tree vec_type, tree arg) if (!tree_fits_uhwi_p (arg) || (elt = tree_to_uhwi (arg), elt > max)) { - error ("selector must be an integer constant in the range 0..%wi", max); + error ("selector must be an integer constant in the range " + "[0, %wi]", max); return 0; } diff --git a/gcc/config/i386/i386-features.c b/gcc/config/i386/i386-features.c index 67f45d66c48..60a120f4df7 100644 --- a/gcc/config/i386/i386-features.c +++ b/gcc/config/i386/i386-features.c @@ -2447,7 +2447,7 @@ ix86_mangle_function_version_assembler_name (tree decl, tree id) && lookup_attribute ("gnu_inline", DECL_ATTRIBUTES (decl))) error_at (DECL_SOURCE_LOCATION (decl), - "function versions cannot be marked as gnu_inline," + "function versions cannot be marked as %," " bodies have to be generated"); if (DECL_VIRTUAL_P (decl) diff --git a/gcc/config/i386/i386-options.c b/gcc/config/i386/i386-options.c index dec8352143c..7c8ddbee0f7 100644 --- a/gcc/config/i386/i386-options.c +++ b/gcc/config/i386/i386-options.c @@ -3462,7 +3462,8 @@ ix86_handle_abi_attribute (tree *node, tree name, tree, int, { if (lookup_attribute ("sysv_abi", TYPE_ATTRIBUTES (*node))) { - error ("ms_abi and sysv_abi attributes are not compatible"); + error ("%qs and %qs attributes are not compatible", + "ms_abi", "sysv_abi"); } return NULL_TREE; @@ -3471,7 +3472,8 @@ ix86_handle_abi_attribute (tree *node, tree name, tree, int, { if (lookup_attribute ("ms_abi", TYPE_ATTRIBUTES (*node))) { - error ("ms_abi and sysv_abi attributes are not compatible"); + error ("%qs and %qs attributes are not compatible", + "ms_abi", "sysv_abi"); } return NULL_TREE; diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index cc0ae3fcfd3..93ed940eb9e 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -1525,7 +1525,7 @@ ix86_function_type_abi (const_tree fntype) static int warned; if (TARGET_X32 && !warned) { - error ("X32 does not support ms_abi attribute"); + error ("X32 does not support % attribute"); warned = 1; } @@ -1559,7 +1559,8 @@ ix86_function_ms_hook_prologue (const_tree fn) { if (decl_function_context (fn) != NULL_TREE) error_at (DECL_SOURCE_LOCATION (fn), - "ms_hook_prologue is not compatible with nested function"); + "% attribute is not compatible " + "with nested function"); else return true; } @@ -2266,7 +2267,7 @@ classify_argument (machine_mode mode, const_tree type, { warned = true; inform (input_location, - "the ABI of passing union with long double" + "the ABI of passing union with %" " has changed in GCC 4.4"); } return 0; @@ -2384,7 +2385,7 @@ classify_argument (machine_mode mode, const_tree type, { warned = true; inform (input_location, - "the ABI of passing structure with complex float" + "the ABI of passing structure with %" " member has changed in GCC 4.4"); } classes[1] = X86_64_SSESF_CLASS; @@ -7787,7 +7788,7 @@ ix86_expand_prologue (void) /* Check if profiling is active and we shall use profiling before prologue variant. If so sorry. */ if (crtl->profile && flag_fentry != 0) - sorry ("ms_hook_prologue attribute isn%'t compatible " + sorry ("% attribute is not compatible " "with %<-mfentry%> for 32-bit"); /* In ix86_asm_output_function_label we emitted: @@ -20651,7 +20652,7 @@ ix86_md_asm_adjust (vec &outputs, vec &/*inputs*/, con += 4; if (strchr (con, ',') != NULL) { - error ("alternatives not allowed in asm flag output"); + error ("alternatives not allowed in % flag output"); continue; } @@ -20715,7 +20716,7 @@ ix86_md_asm_adjust (vec &outputs, vec &/*inputs*/, } if (code == UNKNOWN) { - error ("unknown asm flag output %qs", constraints[i]); + error ("unknown % flag output %qs", constraints[i]); continue; } if (invert) @@ -20744,7 +20745,7 @@ ix86_md_asm_adjust (vec &outputs, vec &/*inputs*/, machine_mode dest_mode = GET_MODE (dest); if (!SCALAR_INT_MODE_P (dest_mode)) { - error ("invalid type for asm flag output"); + error ("invalid type for % flag output"); continue; } @@ -21678,13 +21679,15 @@ ix86_memmodel_check (unsigned HOST_WIDE_INT val) if (val & IX86_HLE_ACQUIRE && !(is_mm_acquire (model) || strong)) { warning (OPT_Winvalid_memory_model, - "HLE_ACQUIRE not used with ACQUIRE or stronger memory model"); + "% not used with % or stronger " + "memory model"); return MEMMODEL_SEQ_CST | IX86_HLE_ACQUIRE; } if (val & IX86_HLE_RELEASE && !(is_mm_release (model) || strong)) { warning (OPT_Winvalid_memory_model, - "HLE_RELEASE not used with RELEASE or stronger memory model"); + "% not used with % or stronger " + "memory model"); return MEMMODEL_SEQ_CST | IX86_HLE_RELEASE; } return val;