From patchwork Mon Mar 12 22:41:02 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Botcazou X-Patchwork-Id: 884936 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-474620-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=adacore.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="tbtiClqN"; 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 400Xyh2SHMz9sSf for ; Tue, 13 Mar 2018 09:41:15 +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:from :to:subject:date:message-id:mime-version:content-type :content-transfer-encoding; q=dns; s=default; b=riHyfmd5rcgy2K0+ p8pz81HEq/IVOY3+HB1OAq9UgBaao/4qLtX2FzRgokI1edDDiC7hq2tqUwh/OXhQ Epmiwj83j9zjoKYAdees7ibDIGVbp8SRNVXxWy/zO/LFE7xP6mwXaGmzArTQM/rs aLmpY7OZuyWcngC/IATT0y3JGGI= 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 :to:subject:date:message-id:mime-version:content-type :content-transfer-encoding; s=default; bh=XOCHCT5hye/VqvYoATQOBR XzxFw=; b=tbtiClqN0RKvsEhFzamLev9d14RSOEkK2eCqZzQrs4fOM0A1U0oKMX GiZw9K67N0NfaKsKa4v/lwHg1D+QP7X+x22LlSsGwlILXjMLGzpFHedUQ5mP0WcB 0PjwfdgyKbV0pYSF17fOdrjGXyykZCvJLPYeRpr1boonBbuqBM7Vo= Received: (qmail 79143 invoked by alias); 12 Mar 2018 22:41:08 -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 77857 invoked by uid 89); 12 Mar 2018 22:41:08 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-10.6 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_2, GIT_PATCH_3, KAM_NUMSUBJECT, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:892 X-HELO: smtp.eu.adacore.com Received: from mel.act-europe.fr (HELO smtp.eu.adacore.com) (194.98.77.210) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 12 Mar 2018 22:41:06 +0000 Received: from localhost (localhost [127.0.0.1]) by filtered-smtp.eu.adacore.com (Postfix) with ESMTP id 7996081390 for ; Mon, 12 Mar 2018 23:41:04 +0100 (CET) Received: from smtp.eu.adacore.com ([127.0.0.1]) by localhost (smtp.eu.adacore.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id OSeUyIM4E1Ga for ; Mon, 12 Mar 2018 23:41:04 +0100 (CET) Received: from polaris.localnet (bon31-6-88-161-99-133.fbx.proxad.net [88.161.99.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.eu.adacore.com (Postfix) with ESMTPSA id 5C95E81387 for ; Mon, 12 Mar 2018 23:41:04 +0100 (CET) From: Eric Botcazou To: gcc-patches@gcc.gnu.org Subject: [Ada] Fix PR ada/82813 Date: Mon, 12 Mar 2018 23:41:02 +0100 Message-ID: <2567679.VrDbuXkVer@polaris> MIME-Version: 1.0 -Wstringop-overflow is supposed to be a C-family warning but it is somehow issued in Ada too and can warn on bogus cases so let's just kill it. Tested on x86-64/Linux, applied on the mainline and 7 branch. 2018-03-12 Eric Botcazou PR ada/82813 * gcc-interface/misc.c (gnat_post_options): Disable string overflow warnings. Index: gcc-interface/misc.c =================================================================== --- gcc-interface/misc.c (revision 258411) +++ gcc-interface/misc.c (working copy) @@ -265,6 +265,9 @@ gnat_post_options (const char **pfilenam /* No return type warnings for Ada. */ warn_return_type = 0; + /* No string overflow warnings for Ada. */ + warn_stringop_overflow = 0; + /* No caret by default for Ada. */ if (!global_options_set.x_flag_diagnostics_show_caret) global_dc->show_caret = false;