From patchwork Wed May 17 15:51:46 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fritz Reese X-Patchwork-Id: 763686 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 3wSf2w5Tp7z9s2s for ; Thu, 18 May 2017 01:52:23 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="bA/c3Nr+"; 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 :mime-version:from:date:message-id:subject:to:content-type; q= dns; s=default; b=gxqshwrAerSVpRHGWuQZF9rAHwTwsY9UbzOVeTHf5pCxa7 o3tc7Zs/IPzHsOfTpsFvAgmeo7ungG31tAPYG6NkPfyCYvfyCNgtV/U3mciRAo89 3j5Vp7S4ZbZ4E7cVDPh1QQ+NnD0jRzySeWsDSjFOBOSvDNXsmUWLYvYRtPMlA= 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 :mime-version:from:date:message-id:subject:to:content-type; s= default; bh=WHneZ01Ct4sBeat69++sYE2QqWs=; b=bA/c3Nr+pspXZtoDVn8H B+nDKXX7T8SEZKYkTqAX3HIaA9k6Jhwx/1lO4E/DXsWFojWOQkjMWPfmDPPpt/Jh rCJ0PdhgpdGBB9merO+qihqeV0O0lBWRDaHfBs4lq0IZcA0wNsIixCckJp8MbbQP SKWXjpINlMpgRwIdg4c542M= Received: (qmail 61240 invoked by alias); 17 May 2017 15:52: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 61212 invoked by uid 89); 17 May 2017 15:52:07 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-26.4 required=5.0 tests=BAYES_00, FREEMAIL_FROM, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, RCVD_IN_SORBS_SPAM, SPF_PASS autolearn=ham version=3.3.2 spammy=complaints, 15328 X-Spam-User: qpsmtpd, 2 recipients X-HELO: mail-qt0-f174.google.com Received: from mail-qt0-f174.google.com (HELO mail-qt0-f174.google.com) (209.85.216.174) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 17 May 2017 15:52:05 +0000 Received: by mail-qt0-f174.google.com with SMTP id f55so12951782qta.3; Wed, 17 May 2017 08:52:08 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=5OlWtMqfg6z34coq3hTCAlsVkNHS583thm1AeukZkGY=; b=mpubU8/hMvsPX3pNrfxlXDfA6uyp00y4i9OIJFhx8AyWu46JYRjRgQTgeDT/2q0roj 6dnHEJDK+eehXxOFqkvj0JwoTICrIcJRTOjHuBpGzrUHmnrEqehpUdi4GvM0hPE1/Xfq K8/raPN/QNJRYd29/JiOzHXdseF6kYYKQh2QkIUhlgpUZ5NUSo/N51khrTYLL0BHWckb 2TePfRQKyYCTx3euCGK3zloH51KH09h4JeLwW+6h4h6L0teQHjNY0FZRrrU1fQT0QayH exLOmeuAUEJJMRXwyxqA5OoHI72WevCLhdwCOUFGEErKiKcrsSTL+jTyWqyAi8eyy++Y Q2NQ== X-Gm-Message-State: AODbwcD4V8OaQlJLb0mlfnFsYIjoUskvPQ+/2r//thAosnOJ/jWtz7Fo fZBCzoWxtBhtjMhCpCkuCz6dXcJyfrbW X-Received: by 10.200.37.26 with SMTP id 26mr4044957qtm.278.1495036327221; Wed, 17 May 2017 08:52:07 -0700 (PDT) MIME-Version: 1.0 Received: by 10.140.101.74 with HTTP; Wed, 17 May 2017 08:51:46 -0700 (PDT) From: Fritz Reese Date: Wed, 17 May 2017 11:51:46 -0400 Message-ID: Subject: [PATCH, Fortran] PR 79968: merge similar diagnostics containing -fdec-structure To: fortran , gcc-patches https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79968 All, The PR suggests unifying diagnostics of the form "%s at %C is a DEC extension, enable with ..." I think the patch is obvious/trivial and speaks for itself. I plan to commit the attached to trunk shortly, barring any complaints. (Nb. even with the change in diagnostics, the applicable testcases (dec_io_3.f90 and dec_static_3.f90) are not regressed as they match only the "is a DEC extension" portion of the error message.) --- Fritz Reese 2017-05-17 Fritz Reese PR fortran/79968 gcc/fortran/ChangeLog: PR fortran/79968 * decl.c (match_attr_spec, gfc_match_automatic, gfc_match_static, gfc_match_structure_decl): Unify diagnostic errors regarding -fdec options. * io.c (match_dec_etag, match_dec_vtag, match_dec_ftag): Ditto. From de4f3b068eff1f33c0f7a8c9a5c328f6c85c712b Mon Sep 17 00:00:00 2001 From: Fritz Reese Date: Wed, 17 May 2017 11:36:54 -0400 Subject: [PATCH] 2017-05-17 Fritz Reese PR fortran/79968 gcc/fortran/ * decl.c (match_attr_spec, gfc_match_automatic, gfc_match_static, gfc_match_structure_decl): Unify diagnostic errors regarding -fdec options. * io.c (match_dec_etag, match_dec_vtag, match_dec_ftag): Ditto. --- gcc/fortran/decl.c | 18 ++++++++++++------ gcc/fortran/io.c | 12 ++++++------ 2 files changed, 18 insertions(+), 12 deletions(-) diff --git a/gcc/fortran/decl.c b/gcc/fortran/decl.c index 5ca664e57a5..8d6c2064db4 100644 --- a/gcc/fortran/decl.c +++ b/gcc/fortran/decl.c @@ -4210,7 +4210,8 @@ match_attr_spec (void) if ((d == DECL_STATIC || d == DECL_AUTOMATIC) && !flag_dec_static) { - gfc_error ("%s at %L is a DEC extension, enable with -fdec-static", + gfc_error ("%s at %L is a DEC extension, enable with " + "%<-fdec-static%>", d == DECL_STATIC ? "STATIC" : "AUTOMATIC", &seen_at[d]); m = MATCH_ERROR; goto cleanup; @@ -7889,8 +7890,10 @@ gfc_match_automatic (void) if (!flag_dec_static) { - gfc_error ("AUTOMATIC at %C is a DEC extension, enable with " - "-fdec-static"); + gfc_error ("%s at %C is a DEC extension, enable with " + "%<-fdec-static%>", + "AUTOMATIC" + ); return MATCH_ERROR; } @@ -7943,7 +7946,9 @@ gfc_match_static (void) if (!flag_dec_static) { - gfc_error ("STATIC at %C is a DEC extension, enable with -fdec-static"); + gfc_error ("%s at %C is a DEC extension, enable with " + "%<-fdec-static%>", + "STATIC"); return MATCH_ERROR; } @@ -8702,8 +8707,9 @@ gfc_match_structure_decl (void) if (!flag_dec_structure) { - gfc_error ("STRUCTURE at %C is a DEC extension, enable with " - "-fdec-structure"); + gfc_error ("%s at %C is a DEC extension, enable with " + "%<-fdec-structure%>", + "STRUCTURE"); return MATCH_ERROR; } diff --git a/gcc/fortran/io.c b/gcc/fortran/io.c index 7ab897daa44..b08c785988d 100644 --- a/gcc/fortran/io.c +++ b/gcc/fortran/io.c @@ -1515,8 +1515,8 @@ match_dec_etag (const io_tag *tag, gfc_expr **e) return m; else if (m != MATCH_NO) { - gfc_error ("%s is a DEC extension at %C, re-compile with " - "-fdec to enable", tag->name); + gfc_error ("%s at %C is a DEC extension, enable with " + "%<-fdec%>", tag->name); return MATCH_ERROR; } return m; @@ -1532,8 +1532,8 @@ match_dec_vtag (const io_tag *tag, gfc_expr **e) return m; else if (m != MATCH_NO) { - gfc_error ("%s is a DEC extension at %C, re-compile with " - "-fdec to enable", tag->name); + gfc_error ("%s at %C is a DEC extension, enable with " + "%<-fdec%>", tag->name); return MATCH_ERROR; } return m; @@ -1553,8 +1553,8 @@ match_dec_ftag (const io_tag *tag, gfc_open *o) if (!flag_dec) { - gfc_error ("%s is a DEC extension at %C, re-compile with " - "-fdec to enable", tag->name); + gfc_error ("%s at %C is a DEC extension, enable with " + "%<-fdec%>", tag->name); return MATCH_ERROR; } -- 2.12.2