This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
RE: [PATCH, Fortran] PR61234: -Wuse-no-only
- From: Tobias Burnus <tobias dot burnus at physik dot fu-berlin dot de>
- To: VandeVondele Joost <joost dot vandevondele at mat dot ethz dot ch>, fortran at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org, lopezibanez at gmail dot com
- Date: Tue, 19 Aug 2014 15:13:06 +0200
- Subject: RE: [PATCH, Fortran] PR61234: -Wuse-no-only
- Authentication-results: sourceware.org; auth=none
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