-Wno-tabs according to the manual currently is active for -pedantic, -std=f95, and -Wall. It should be active for -std=f2003 as well. Finally, it's not actually active for -pedantic. % cat xtabs.f90 print *, "hi" end -std=f2003 and -pedantic don't work: % gfortran -std=f2003 xtabs.f90 % % gfortran -pedantic xtabs.f90 % -std=f95 and -Wall do work: % gfortran -std=f95 xtabs.f90 xtabs.f90:1.1: print *, "hi" 1 Warning: Nonconforming tab character at (1) % gfortran -Wall xtabs.f90 xtabs.f90:1.1: print *, "hi" 1 Warning: Nonconforming tab character at (1)
Created attachment 12966 [details] untested patch Here's an untested patch.
Confirmed. I just attached an untested patch.
Testing the patch shows -pedantic has found some invalid code in the testsuite.
As an aside, aren't -Wtabs and -Wno-tabs reversed? Now -Wno-tabs warns against tabs, but shouldn't it be -Wtabs that warns against using them and -Wno-tabs should turn the warning off?
Subject: Re: -Wno-tabs should be active for -std=f2003 and -pedantic On Tue, Jan 30, 2007 at 11:06:24PM -0000, jb at gcc dot gnu dot org wrote: > > ------- Comment #4 from jb at gcc dot gnu dot org 2007-01-30 23:06 ------- > As an aside, aren't -Wtabs and -Wno-tabs reversed? Now -Wno-tabs warns against > tabs, but shouldn't it be -Wtabs that warns against using them and -Wno-tabs > should turn the warning off? > Well, when I wrote the original patch I interpreted -Wno-tabs as "No tabs allowed in source", and -Wtabs is its opposite. We can change this if others want.
Right, I guess that's an equally valid POV. Thus, I don't think it's worth the trouble to reverse them and confuse our users.
Fixed on trunk.
Subject: Bug 30605 Author: kargl Date: Tue Feb 6 00:28:14 2007 New Revision: 121631 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=121631 Log: 2007-02-05 Steven G. Kargl <kargl@gcc.gnu.org> PR fortran/30605 * fortran/invoke.texi: Update documentation. * fortran/options.c (gfc_post_options): Deal with tabs with -std=f2003 and -pedantic. 2007-02-04 Steven G. Kargl <kargl@gcc.gnu.org> PR fortran/30605 * gfortran.dg/spread_shape_1.f90: Remove tabs. * gfortran.dg/derived_init_2.f90: Ditto. * gfortran.dg/elemental_subroutine_3.f90: Ditto. * gfortran.dg/array_initializer_1.f90: Ditto. * gfortran.dg/do_2.f90: Ditto. * gfortran.dg/proc_assign_1.f90: Ditto. Modified: branches/gcc-4_2-branch/gcc/fortran/ChangeLog branches/gcc-4_2-branch/gcc/fortran/options.c branches/gcc-4_2-branch/gcc/testsuite/ChangeLog branches/gcc-4_2-branch/gcc/testsuite/gfortran.dg/array_initializer_1.f90 branches/gcc-4_2-branch/gcc/testsuite/gfortran.dg/derived_init_2.f90 branches/gcc-4_2-branch/gcc/testsuite/gfortran.dg/do_2.f90 branches/gcc-4_2-branch/gcc/testsuite/gfortran.dg/elemental_subroutine_3.f90 branches/gcc-4_2-branch/gcc/testsuite/gfortran.dg/proc_assign_1.f90 branches/gcc-4_2-branch/gcc/testsuite/gfortran.dg/spread_shape_1.f90
Fixed in trunk and 4.2. Won't fix in 4.1 or earlier.