From patchwork Sun Nov 5 10:05:02 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom de Vries X-Patchwork-Id: 834317 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-465958-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="kx+qgIg/"; 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 3yVBC50lsPz9t34 for ; Sun, 5 Nov 2017 21:05:20 +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 :subject:to:cc:message-id:date:mime-version:content-type; q=dns; s=default; b=VxswIu8ZxkJPeFayBwgor5to5qObTC/92BVYZD6rsxMk+hpTDa TyGbjBkZwylFGtMbR0Xj9dm5QzsrG1mYcyxGcm6uiTz9hj4c7Nb5V8kH/frcz73w p3wJudgc4CN5rJL8u3WvFjEAZ2U+DylJZwudd+M/FgbbIfudGUTRyN3Hs= 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 :subject:to:cc:message-id:date:mime-version:content-type; s= default; bh=PmlAjRkLk/YHYYnVqy7uV/kOpsU=; b=kx+qgIg/dZhCioSS2E1S 1D4/Wr5rI7hLxBu1Uk7fRITNKXFq8rEa9Bf2xsD/83N392O0YQ49RHoH4e2KGRRC fJDiAzMrc3VYTlkQXL5E4KjA7d66bucQYPGmYVhnrAb+mdzX+LlAmMUjMu8P0edc PbOFNXV7k/yoPfcxDFB9+84= Received: (qmail 105430 invoked by alias); 5 Nov 2017 10:05:12 -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 105405 invoked by uid 89); 5 Nov 2017 10:05:10 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-24.7 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_PASS, URIBL_RED autolearn=ham version=3.3.2 spammy=specialist, 7747 X-Spam-User: qpsmtpd, 2 recipients X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sun, 05 Nov 2017 10:05:09 +0000 Received: from nat-ies.mentorg.com ([192.94.31.2] helo=SVR-IES-MBX-04.mgc.mentorg.com) by relay1.mentorg.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-SHA384:256) id 1eBHnf-0000Kt-7U from Tom_deVries@mentor.com ; Sun, 05 Nov 2017 02:05:07 -0800 Received: from [172.30.72.166] (137.202.0.87) by SVR-IES-MBX-04.mgc.mentorg.com (139.181.222.4) with Microsoft SMTP Server (TLS) id 15.0.1320.4; Sun, 5 Nov 2017 10:05:03 +0000 From: Tom de Vries Subject: [PATCH 4/7] [fortran, committed] Remove semicolon after do {} while (0) in match macros To: GCC Patches , Fortran List CC: Jakub Jelinek , Message-ID: Date: Sun, 5 Nov 2017 11:05:02 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 X-ClientProxiedBy: svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) To SVR-IES-MBX-04.mgc.mentorg.com (139.181.222.4) Hi, this patch removes a semicolon after "do {} while (0)" in match macros. This allows the macros to be used in if-then-elses without curly braces. Thanks, - Tom 2017-11-02 Tom de Vries PR other/82784 * parse.c (match, matcha, matchs, matcho, matchds, matchdo): Remove semicolon after "do {} while (0)". Signed-off-by: Tom de Vries --- gcc/fortran/parse.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/gcc/fortran/parse.c b/gcc/fortran/parse.c index e4deff9..d025c91 100644 --- a/gcc/fortran/parse.c +++ b/gcc/fortran/parse.c @@ -132,7 +132,7 @@ use_modules (void) return st; \ else \ undo_new_statement (); \ - } while (0); + } while (0) /* This is a specialist version of decode_statement that is used @@ -606,7 +606,7 @@ decode_statement (void) return st; \ else \ undo_new_statement (); \ - } while (0); + } while (0) static gfc_statement decode_oacc_directive (void) @@ -728,7 +728,7 @@ decode_oacc_directive (void) } \ else \ undo_new_statement (); \ - } while (0); + } while (0) /* Like match, but don't match anything if not -fopenmp and if spec_only, goto do_spec_only without actually matching. */ @@ -746,7 +746,7 @@ decode_oacc_directive (void) } \ else \ undo_new_statement (); \ - } while (0); + } while (0) /* Like match, but set a flag simd_matched if keyword matched. */ #define matchds(keyword, subr, st) \ @@ -759,7 +759,7 @@ decode_oacc_directive (void) } \ else \ undo_new_statement (); \ - } while (0); + } while (0) /* Like match, but don't match anything if not -fopenmp. */ #define matchdo(keyword, subr, st) \ @@ -774,7 +774,7 @@ decode_oacc_directive (void) } \ else \ undo_new_statement (); \ - } while (0); + } while (0) static gfc_statement decode_omp_directive (void)