From patchwork Fri Nov 16 09:30:18 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Uros Bizjak X-Patchwork-Id: 199526 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]) by ozlabs.org (Postfix) with SMTP id EF4812C008D for ; Fri, 16 Nov 2012 20:30:33 +1100 (EST) Comment: DKIM? See http://www.dkim.org DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=gcc.gnu.org; s=default; x=1353663034; h=Comment: DomainKey-Signature:Received:Received:Received:Received: MIME-Version:Received:Received:In-Reply-To:References:Date: Message-ID:Subject:From:To:Cc:Content-Type:Mailing-List: Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:Sender:Delivered-To; bh=wu9+rVVlUFOrPWqzbCfBXBamovU=; b=jdLzcrRGSxaRfNi4r6ngbb+z7d1FopGekmhu0t4swDVvXKV2YRcVffwfTsToAX Jsr9YQcce24K2XZLNRkSNB4NnYoqo9lQaTVWNWRJkFkA9jsMDA+Y0BsruEvIsg0e 6Ta4HO/k3KJoGFCwYkh4xMVhh215a1c8NufQoJiFD44s0= Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=gcc.gnu.org; h=Received:Received:X-SWARE-Spam-Status:X-Spam-Check-By:Received:Received:MIME-Version:Received:Received:In-Reply-To:References:Date:Message-ID:Subject:From:To:Cc:Content-Type:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=szTSTnewXpMY3FZ8R0dprbQmPtH0lx9DGfEJNfAK0+3suEYn8WHpDQ/yw3sW4l 4ucuLT0WO0jWQIOHCXB08qq/5V0TEy9QZveaGfSBhzfJZ79VGkrW3G1Wv0lIcdjG bt77ytCGYlp/E82b5H2nggdSGDsyekhtn+HA+CDdpja1Q=; Received: (qmail 31206 invoked by alias); 16 Nov 2012 09:30:26 -0000 Received: (qmail 31195 invoked by uid 22791); 16 Nov 2012 09:30:25 -0000 X-SWARE-Spam-Status: No, hits=-5.0 required=5.0 tests=AWL, BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, KHOP_RCVD_TRUST, KHOP_THREADED, RCVD_IN_DNSWL_LOW, RCVD_IN_HOSTKARMA_YE, TW_ZJ X-Spam-Check-By: sourceware.org Received: from mail-pb0-f47.google.com (HELO mail-pb0-f47.google.com) (209.85.160.47) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 16 Nov 2012 09:30:19 +0000 Received: by mail-pb0-f47.google.com with SMTP id un1so380625pbc.20 for ; Fri, 16 Nov 2012 01:30:18 -0800 (PST) MIME-Version: 1.0 Received: by 10.68.189.38 with SMTP id gf6mr7346727pbc.145.1353058218757; Fri, 16 Nov 2012 01:30:18 -0800 (PST) Received: by 10.66.246.232 with HTTP; Fri, 16 Nov 2012 01:30:18 -0800 (PST) In-Reply-To: <20121116085239.GF1886@tucnak.redhat.com> References: <20121115162519.GX1886@tucnak.redhat.com> <20121115163458.GY1886@tucnak.redhat.com> <20121115164457.GZ1886@tucnak.redhat.com> <20121116085239.GF1886@tucnak.redhat.com> Date: Fri, 16 Nov 2012 10:30:18 +0100 Message-ID: Subject: Re: [PATCH v2, testsuite]: Add dg-error for unsupported floating suffix From: Uros Bizjak To: Jakub Jelinek Cc: gcc-patches@gcc.gnu.org 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 On Fri, Nov 16, 2012 at 9:52 AM, Jakub Jelinek wrote: >> 2012-11-16 Uros Bizjak >> >> * lib/target_suports.exp >> (check_effective_target_has_w_floating_suffix): New procedure. >> (check_effective_target_has_q_floating_suffix): Ditto. >> * g++.dg/cpp0x/gnu_fext-numeric-literals.C: Add dg-error directive >> for unsupported non-standard suffix on floating constant. >> * g++.dg/cpp0x/std_fext-numeric-literals.C: Ditto. >> >> Attached patch was re-tested on alphaev68-linux-gnu and >> x86_64-linux-gnu and committed to mainline SVN. > > Perhaps just bike-shed, but I'd write it as: Actually, a very good idea! I will commit the following addendum when alpha finishes testing: --cut here-- --cut here-- Thanks, Uros. Index: target-supports.exp =================================================================== --- target-supports.exp (revision 193551) +++ target-supports.exp (working copy) @@ -1746,18 +1746,26 @@ # 0 otherwise. proc check_effective_target_has_w_floating_suffix { } { + set opts "" + if [check_effective_target_c++] { + append opts "-std=gnu++03" + } return [check_no_compiler_messages w_fp_suffix object { float dummy = 1.0w; - } "-std=gnu++03 -w"] + } "$opts"] } # Return 1 if the target supports 'q' suffix on floating constant # 0 otherwise. proc check_effective_target_has_q_floating_suffix { } { + set opts "" + if [check_effective_target_c++] { + append opts "-std=gnu++03" + } return [check_no_compiler_messages q_fp_suffix object { float dummy = 1.0q; - } "-std=gnu++03 -w"] + } "$opts"] } # Return 1 if the target supports compiling fixed-point, # 0 otherwise.