From patchwork Thu Jul 21 11:57:43 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Jambor X-Patchwork-Id: 655440 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 3s4FzS4zMTz9s9x for ; Thu, 4 Aug 2016 00:37:56 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=Oedv/aXs; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :resent-from:resent-date:resent-message-id:resent-to:from:date :subject:to:message-id; q=dns; s=default; b=c5BigDHwVQ0oXPd++y0I fUEPKQoRGTUa04Vdn9LMFjpsKOIe/a6Xe8lifQcg0PMBwj3SjdNtbb3vOPC6vEPa 1InbO6vtvWAApoLHTSGGuxrx50KNJ6vSbsbX3J1vguQSShQI2mNLWifz5CI8rcdK nYv2nt4zYCGD0PdthGYE5/M= 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 :resent-from:resent-date:resent-message-id:resent-to:from:date :subject:to:message-id; s=default; bh=PmKfZ5kujkcnQce/UC7rkLz9WX 0=; b=Oedv/aXsKDS31HSSdm8uJDrJDr9rUKR2lfT7w14sTHf8inmVLyPAf6gdnD eMJi7HbRoC8dlxyKace5IRDI0hwOVC1kZSo65mzIYZgYqkPMOWC/CBdhM+w1ZIAB h+1WlHJQFLji9fiYrRJCacmdaR86Rr9ZbspWE9yIvVCWTqQos= Received: (qmail 109991 invoked by alias); 3 Aug 2016 14:36:54 -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 109696 invoked by uid 89); 3 Aug 2016 14:36:51 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.2 required=5.0 tests=BAYES_00, SPF_SOFTFAIL autolearn=no version=3.3.2 spammy=H*MI:eggs, H*M:eggs, surprise X-HELO: eggs.gnu.org Received: from eggs.gnu.org (HELO eggs.gnu.org) (208.118.235.92) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Wed, 03 Aug 2016 14:36:41 +0000 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bUxHf-0005FU-A5 for gcc-patches@gcc.gnu.org; Wed, 03 Aug 2016 10:36:39 -0400 Received: from mx2.suse.de ([195.135.220.15]:57730) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bUxHf-0005FN-3Y for gcc-patches@gcc.gnu.org; Wed, 03 Aug 2016 10:36:35 -0400 Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id B3FFEAD29 for ; Wed, 3 Aug 2016 14:36:29 +0000 (UTC) Resent-From: Martin Jambor Resent-Date: Wed, 3 Aug 2016 16:36:29 +0200 Resent-Message-ID: <20160803143629.gojkkwpeofruvabt@virgil.suse.cz> Resent-To: GCC Patches From: Martin Jambor Date: Thu, 21 Jul 2016 13:57:43 +0200 Subject: [hsa-branch] Minor tweak to HSA_SORRY macros To: GCC Patches X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x (no timestamps) [generic] Message-ID: X-Received-From: 195.135.220.15 X-IsSubscribed: yes Hi, the whole point of having HSA_SORRY be encapsulated in a rather useless while statement is to enforce a semicolon after its each expansion, like if it was a function. To my surprise, I found the semicolon is already there and missing at two invocation points. I plan to change the macro to be different on the hsa branch and fix it there and to minimize the difference I'd like to commit this to trunk eventualy. Thanks, Martin 2016-07-21 Martin Jambor * hsa-gen.c (HSA_SORRY_ATV): Remove semicolon after macro. (HSA_SORRY_AT): Likewise. (omp_simple_builtin::generate): Add missing semicolons. --- gcc/hsa-gen.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gcc/hsa-gen.c b/gcc/hsa-gen.c index 24cc2c7..6accbd7 100644 --- a/gcc/hsa-gen.c +++ b/gcc/hsa-gen.c @@ -69,7 +69,7 @@ along with GCC; see the file COPYING3. If not see HSA_SORRY_MSG)) \ inform (location, message, __VA_ARGS__); \ } \ - while (false); + while (false) /* Same as previous, but highlight a location. */ @@ -81,7 +81,7 @@ along with GCC; see the file COPYING3. If not see HSA_SORRY_MSG)) \ inform (location, message); \ } \ - while (false); + while (false) /* Default number of threads used by kernel dispatch. */ @@ -4379,11 +4379,11 @@ omp_simple_builtin::generate (gimple *stmt, hsa_bb *hbb) if (m_sorry) { if (m_warning_message) - HSA_SORRY_AT (gimple_location (stmt), m_warning_message) + HSA_SORRY_AT (gimple_location (stmt), m_warning_message); else HSA_SORRY_ATV (gimple_location (stmt), "Support for HSA does not implement calls to %s\n", - m_name) + m_name); } else if (m_warning_message != NULL) warning_at (gimple_location (stmt), OPT_Whsa, m_warning_message);