From patchwork Wed Dec 10 15:30:36 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kyrylo Tkachov X-Patchwork-Id: 419709 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 C70141400D5 for ; Thu, 11 Dec 2014 02:30:49 +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 :message-id:date:from:mime-version:to:cc:subject:content-type; q=dns; s=default; b=CqIB3lF3tgFIj9jUvZPEIJxMnvFt6q59E8+o7PFFQ6H Rs1N4Xj0msAAq97Oy9NPNriGd6M5PrAsGrOozpRz8ZGD/klOCnQkQTOXN5zVr8Ea CH4WkhpEXFuWin4JciXCXDPn7xL8WKV/XMHHZjx8EiJq8Bab5lMc71QOn8WgpLpM = 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 :message-id:date:from:mime-version:to:cc:subject:content-type; s=default; bh=BwNOLzYH6a3khX7lo4LP+HDH6yc=; b=W+jz0NXKf9z0EjDge kI3aV+0G2xLjEGK/ocui3Sso2Z8ovi/+81jodcEYfFiO2v2I2vQH7VIQGmJ6HBOj YvEVFezKhZvYhjrofihMxTVVGRlVhPH6NvR51i0PRcGhs0/ENT0zZ3u4clkPvYcb lDT+bQEaCBliEMBP2jBh6E1e+g= Received: (qmail 21041 invoked by alias); 10 Dec 2014 15:30:42 -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 21030 invoked by uid 89); 10 Dec 2014 15:30:41 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.8 required=5.0 tests=AWL, BAYES_00, SPF_PASS autolearn=ham version=3.3.2 X-HELO: service87.mimecast.com Received: from service87.mimecast.com (HELO service87.mimecast.com) (91.220.42.44) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 10 Dec 2014 15:30:40 +0000 Received: from cam-owa1.Emea.Arm.com (fw-tnat.cambridge.arm.com [217.140.96.140]) by service87.mimecast.com; Wed, 10 Dec 2014 15:30:38 +0000 Received: from [10.1.207.43] ([10.1.255.212]) by cam-owa1.Emea.Arm.com with Microsoft SMTPSVC(6.0.3790.3959); Wed, 10 Dec 2014 15:30:36 +0000 Message-ID: <5488671C.7090805@arm.com> Date: Wed, 10 Dec 2014 15:30:36 +0000 From: Kyrill Tkachov User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 MIME-Version: 1.0 To: GCC Patches CC: Marcus Shawcroft , Richard Earnshaw Subject: [PATCH][AArch64] Fix usage of +no in error message for aarch64_parse_extension X-MC-Unique: 114121015303810301 X-IsSubscribed: yes Hi all, The error message when parsing feature modifiers can be improved. Currently, if the user gives something like -march=armv8-a+ the error message will read: error: missing feature modifier after '+no' even though '+no' was not given. With this patch we will now say: error: missing feature modifier after '+' Tested aarch64-none-elf. Ok for trunk? Thanks, Kyrill 2014-12-10 Kyrylo Tkachov kyrylo.tkachov@arm.com * config/aarch64/aarch64.c (aarch64_parse_extension): Update error message to say +no only when removing extension. diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c index e682edd..cbf0842 100644 --- a/gcc/config/aarch64/aarch64.c +++ b/gcc/config/aarch64/aarch64.c @@ -6506,7 +6506,8 @@ aarch64_parse_extension (char *str) if (len == 0) { - error ("missing feature modifier after %qs", "+no"); + error ("missing feature modifier after %qs", adding_ext ? "+" + : "+no"); return; }