From patchwork Fri Apr 27 01:41:26 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alan Modra X-Patchwork-Id: 905465 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-476872-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="U1DMjVJb"; 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 40XGr55QKVz9s0v for ; Fri, 27 Apr 2018 11:41:41 +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:date :from:to:cc:subject:message-id:mime-version:content-type; q=dns; s=default; b=pusDaFwpxQC9Y0YbMGv+SVi3vSaaq6l0DqHjyS4JJF2Cs+rTo6 b5vTusDHWGFqbK4KXmajFEfdVk+Uv4vMXN1bWiIM5i3D6e+EuGNseC5H7wwVX/bx sgq0bc9jT3Z9ZJ4tfys/t3VaLLjJ3g/mt6wXptIk8dEeItqCVtS4vypyI= 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:date :from:to:cc:subject:message-id:mime-version:content-type; s= default; bh=tVVhgavzAf2DCVF8QwXcG/A1dNQ=; b=U1DMjVJbcwJv3LdgyYeA QsAlcseF3IP6nQXZTKhHMLx/3bDIoDO9vGxHAkENmmJh/EjEgyLZPh7sY4V6sdlH aGWWdPC31RqAdigD0OgDCuZnLkaOtZ/B8U4oZGDXpfi1QtDtegPsSa0hU1Nv7W9C xw2qbiPq9rFXnWqzHY7w2FI= Received: (qmail 40338 invoked by alias); 27 Apr 2018 01:41:34 -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 40303 invoked by uid 89); 27 Apr 2018 01:41:34 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-25.4 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.2 spammy=H*Ad:U*dj, HX-Received:6949, HX-Received:sk:k9-v6mr X-HELO: mail-pf0-f179.google.com Received: from mail-pf0-f179.google.com (HELO mail-pf0-f179.google.com) (209.85.192.179) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 27 Apr 2018 01:41:32 +0000 Received: by mail-pf0-f179.google.com with SMTP id z9so247575pfe.6 for ; Thu, 26 Apr 2018 18:41:32 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:user-agent; bh=C6oyxbM+pzs0zGHbpJog+hEpiPiQcBShAr+i5stqETw=; b=jVbm6DokimiLdF2m6NMKDnSHp9kudRlihPRdAXJAD/BsjrYZEBq/9GiD2I+l1ru+wp XR4f8AIN/uL9NHCWb41cX4qLu79wxR533c0MVqSyBIhppFVSznFTPu3i/8NXTlqF28d8 3EbX28y61CdT4EoZUm2U7OQjUrpghCakdvMZ9U92Ddmw/qKQ7SLgJM8HZgtAXGiuTwkX bG5L7hS2reG6CAChu5Fjwvug48ZxfRMeOq5opomFW2ZbdnRpq452olfjk0LjGpy0RCHB HHU1sKD/EwWJFQe3Pl1GtOCAW/7vCLGT2HbCicDBozGgIOI1De4eUORubRICBJOuOR94 14yQ== X-Gm-Message-State: ALQs6tBh5xJS7egAfbWiEtAkb7kGswWJ+WJp+THmfZFZz8vsCL1f4FC1 ouiQLyySdRzE4qzzc8kha+tVGQ== X-Google-Smtp-Source: AB8JxZoRTjcTGS3MxBxLv/hdE2XsQvVpIaLlOQ/LZPH/wCpCrh5MuBDmzZdv2lguZSY9xLt/ZCulkg== X-Received: by 2002:a17:902:6949:: with SMTP id k9-v6mr365011plt.185.1524793291243; Thu, 26 Apr 2018 18:41:31 -0700 (PDT) Received: from bubble.grove.modra.org (CPE-58-175-241-133.hdcz1.win.bigpond.net.au. [58.175.241.133]) by smtp.gmail.com with ESMTPSA id w26sm225211pfi.17.2018.04.26.18.41.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 26 Apr 2018 18:41:30 -0700 (PDT) Received: by bubble.grove.modra.org (Postfix, from userid 1000) id 0E7F6C8DE8; Fri, 27 Apr 2018 11:11:27 +0930 (ACST) Date: Fri, 27 Apr 2018 11:11:26 +0930 From: Alan Modra To: gcc-patches@gcc.gnu.org Cc: DJ Delorie , Ian Lance Taylor Subject: ATTRIBUTE_NONSTRING Message-ID: <20180427014126.GN18288@bubble.grove.modra.org> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.24 (2015-08-30) X-IsSubscribed: yes This patch adds ATTRIBUTE_NONSTRING, which will be used to curb -Wstringop-truncation warnings in binutils. OK to apply? * ansidecl.h (ATTRIBUTE_NONSTRING): Define. diff --git a/include/ansidecl.h b/include/ansidecl.h index c11daff..ec5f34d 100644 --- a/include/ansidecl.h +++ b/include/ansidecl.h @@ -283,6 +283,15 @@ So instead we use the macro below and test it against specific values. */ # endif /* GNUC >= 4.9 */ #endif /* ATTRIBUTE_NO_SANITIZE_UNDEFINED */ +/* Attribute 'nonstring' was valid as of gcc 8. */ +#ifndef ATTRIBUTE_NONSTRING +# if GCC_VERSION >= 8000 +# define ATTRIBUTE_NONSTRING __attribute__ ((nonstring)) +# else +# define ATTRIBUTE_NONSTRING +# endif +#endif + /* We use __extension__ in some places to suppress -pedantic warnings about GCC extensions. This feature didn't work properly before gcc 2.8. */