Hi, compiling the following code with the default language "level" (is that "gnu" or something else?) leads to: % gfortran gfcbug33.f90 In file gfcbug33.f90:2 print *, [ 1, 2 ] 1 Warning: New in Fortran 2003: [...] style array constructors at (1) % cat gfcbug33.f90 program gfcbug33 print *, [ 1, 2 ] end program gfcbug33 When -std=gnu, -std=legacy or -std=f2003 is specified, then no warning appears. Assuming that -std=gnu is the default, the warning is not appropriate. I also find it kind of funny, because [...] style array constructors are probable there to stay and not obsolescent or deprecated. I suggest the warning to be removed. The error for -std=f95 is of course ok. Cheers, -ha
The default is somewhere inbetween -std=f90 (which does not really exist) and -std=gnu
(In reply to comment #1) > The default is somewhere inbetween -std=f90 (which does not really exist) and > -std=gnu Hmmm. Did you really mean Fortran 90 (which does exist as a standard but not as f90 in gfortran) or Fortran 95? Anyway, if your comment is true, then I feel this "somewhere in between" is the real bug, unless documented as a feature or added as an appropriate option (-std=somewhere-in-between). [Some other compilers (like xlf) use the most loose definition of language if none is specified. In the case of xlf you can explicitly confirm it with -qlanglvl=extended.] Feel free to correct the title appropriately. Cheers, -ha
We don't warn for other Fortran 2003 features we support without a -std=f95, so I'll look into it and fix it.
Subject: Re: Gratuitous warning about Fortran 2003 features w/o -std=... > We don't warn for other Fortran 2003 features we support without a -std=f95, so > I'll look into it and fix it. Well, that's not true, we do. So I'll propose a fix for the whole, to fortran@gcc.gnu.org and gcc-patches@gcc.gnu.org. Cheers, Toon
Subject: Bug 26054 Author: toon Date: Wed Feb 15 21:06:58 2006 New Revision: 111117 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=111117 Log: 2006-02-15 Toon Moene <toon@moene.indiv.nluug.nl> PR fortran/26054 * fortran/options.c: Do not warn for Fortran 2003 features by default. * testsuite/gfortran.dg/enum_8.f90: Remove check for warning. * testsuite/gfortran.dg/iomsg_1.f90: Ditto. * testsuite/gfortran.dg/enum_1.f90: Ditto. * testsuite/gfortran.dg/enum_9.f90: Ditto. * testsuite/gfortran.dg/enum_2.f90: Ditto. * testsuite/gfortran.dg/enum_10.f90: Ditto. * testsuite/gfortran.dg/enum_3.f90: Ditto. * testsuite/gfortran.dg/flush_1.f90: Ditto. * testsuite/gfortran.dg/enum_4.f90: Ditto. * testsuite/gfortran.dg/array_constructor_1.f90: Ditto. * testsuite/gfortran.dg/enum_5.f90: Ditto. * testsuite/gfortran.dg/enum_6.f90: Ditto. * testsuite/gfortran.dg/enum_7.f90: Ditto. Modified: trunk/gcc/fortran/ChangeLog trunk/gcc/fortran/options.c trunk/gcc/testsuite/ChangeLog trunk/gcc/testsuite/gfortran.dg/array_constructor_1.f90 trunk/gcc/testsuite/gfortran.dg/enum_1.f90 trunk/gcc/testsuite/gfortran.dg/enum_10.f90 trunk/gcc/testsuite/gfortran.dg/enum_2.f90 trunk/gcc/testsuite/gfortran.dg/enum_3.f90 trunk/gcc/testsuite/gfortran.dg/enum_4.f90 trunk/gcc/testsuite/gfortran.dg/enum_5.f90 trunk/gcc/testsuite/gfortran.dg/enum_6.f90 trunk/gcc/testsuite/gfortran.dg/enum_7.f90 trunk/gcc/testsuite/gfortran.dg/enum_8.f90 trunk/gcc/testsuite/gfortran.dg/enum_9.f90 trunk/gcc/testsuite/gfortran.dg/flush_1.f90 trunk/gcc/testsuite/gfortran.dg/iomsg_1.f90
Subject: Bug 26054 Author: toon Date: Sat Mar 11 12:04:14 2006 New Revision: 111962 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=111962 Log: 2006-03-11 Toon Moene <toon@moene.indiv.nluug.nl> PR fortran/26054 * fortran/options.c: Do not warn for Fortran 2003 features by default. * testsuite/gfortran.dg/enum_8.f90: Remove check for warning. * testsuite/gfortran.dg/iomsg_1.f90: Ditto. * testsuite/gfortran.dg/enum_1.f90: Ditto. * testsuite/gfortran.dg/enum_9.f90: Ditto. * testsuite/gfortran.dg/enum_2.f90: Ditto. * testsuite/gfortran.dg/enum_10.f90: Ditto. * testsuite/gfortran.dg/enum_3.f90: Ditto. * testsuite/gfortran.dg/flush_1.f90: Ditto. * testsuite/gfortran.dg/enum_4.f90: Ditto. * testsuite/gfortran.dg/array_constructor_1.f90: Ditto. * testsuite/gfortran.dg/enum_5.f90: Ditto. * testsuite/gfortran.dg/enum_6.f90: Ditto. * testsuite/gfortran.dg/enum_7.f90: Ditto. Modified: branches/gcc-4_1-branch/gcc/fortran/ChangeLog branches/gcc-4_1-branch/gcc/fortran/options.c branches/gcc-4_1-branch/gcc/testsuite/ChangeLog branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/array_constructor_1.f90 branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/enum_1.f90 branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/enum_10.f90 branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/enum_2.f90 branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/enum_3.f90 branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/enum_4.f90 branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/enum_5.f90 branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/enum_6.f90 branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/enum_7.f90 branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/enum_8.f90 branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/enum_9.f90 branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/flush_1.f90 branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/iomsg_1.f90
Bug fix now also committed to the 4.1 branch, so will be fixed as of 4.1.1.