From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22522 invoked by alias); 19 Aug 2014 13:13:17 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 22495 invoked by uid 89); 19 Aug 2014 13:13:17 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.9 required=5.0 tests=AWL,BAYES_00,FAKE_REPLY_C,RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-Spam-User: qpsmtpd, 2 recipients X-HELO: outpost2.zedat.fu-berlin.de Received: from outpost2.zedat.fu-berlin.de (HELO outpost2.zedat.fu-berlin.de) (130.133.4.90) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Tue, 19 Aug 2014 13:13:15 +0000 Received: from relay1.zedat.fu-berlin.de ([130.133.4.67]) by outpost.zedat.fu-berlin.de (Exim 4.82) with esmtp (envelope-from ) id <1XJjDs-001hIA-EJ>; Tue, 19 Aug 2014 15:13:12 +0200 Received: from mx.physik.fu-berlin.de ([160.45.64.218]) by relay1.zedat.fu-berlin.de (Exim 4.82) with esmtps (envelope-from ) id <1XJjDs-002IdR-CZ>; Tue, 19 Aug 2014 15:13:12 +0200 Received: from squeeze64.physik.fu-berlin.de ([160.45.66.239] helo=login.physik.fu-berlin.de) by mx.physik.fu-berlin.de with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.80) (envelope-from ) id 1XJjDm-0005hw-W3; Tue, 19 Aug 2014 15:13:06 +0200 Received: from tburnus by login.physik.fu-berlin.de with local (Exim 4.72 #1 (Debian)) id 1XJjDm-0004pk-TH; Tue, 19 Aug 2014 15:13:06 +0200 Date: Tue, 19 Aug 2014 13:13:00 -0000 From: Tobias Burnus To: VandeVondele Joost , fortran@gcc.gnu.org, gcc-patches@gcc.gnu.org, lopezibanez@gmail.com Subject: RE: [PATCH, Fortran] PR61234: -Wuse-no-only Message-ID: <20140819131306.GA13110@physik.fu-berlin.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-06-14) X-SW-Source: 2014-08/txt/msg01859.txt.bz2 VandeVondele Joost wrote: > >> So the negative version is -Wno-use-no-only? That sounds weird. > > What about -Wuse-without-only? > > Would be fine with me. Approved with this change ? That would be the patch: https://gcc.gnu.org/ml/fortran/2014-06/msg00114.html > +Warn if a use statement has no only qualifier and thus implicitly imports > +all public entities of the used module. I would use "USE statement" or even "@code{USE} statement". OK with the documentation change and with the re-named option. Please also update the name in the code. Regarding + USE foo, ONLY: bar ! { dg-bogus "has no ONLY qualifier" } + END SUBROUTINE + SUBROUTINE S3 + USE ISO_C_BINDING ! { dg-warning "has no ONLY qualifier" } + END SUBROUTINE S3 +END MODULE +! { dg-final { cleanup-modules "foo testmod" } } The "cleanup module" shouldn't be needed as most of the time that now happens automatically. And "dg-bogus" is also not really needed as the code checks for excess errors and warnings. On the other hand, it shouldn't do much harm either. Thanks for the patch! Regards, Tobias