[Bug fortran/40881] warn for obsolescent features
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40881 --- Comment #8 from Tobias Burnus burnus at gcc dot gnu.org 2012-08-14 10:26:16 UTC --- Author: burnus Date: Tue Aug 14 10:26:11 2012 New Revision: 190379 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=190379 Log: 2012-08-14 Tobias Burnus bur...@net-b.de PR fortran/40881 * error.c (gfc_notify_std): Reset cur_error_buffer-flag flag when the error/warning has been printed. * gfortran.h (gfc_sl_type): Add ST_LABEL_DO_TARGET. * match.c (gfc_match_do): Use ST_LABEL_DO_TARGET. * parse.c (check_statement_label): Use ST_LABEL_DO_TARGET. (parse_executable): Add obsolescence check for DATA. * resolve.c (resolve_branch): Handle ST_LABEL_DO_TARGET. * symbol.c (gfc_define_st_label, gfc_reference_st_label): Add obsolescence diagnostics. * trans-stmt.c (gfc_trans_label_assign): Handle * ST_LABEL_DO_TARGET. 2012-08-14 Tobias Burnus bur...@net-b.de PR fortran/40881 * gfortran.dg/data_constraints_3.f90: New. * gfortran.dg/data_constraints_1.f90: Add dg-options to disable -pedantic compilation. * gfortran.dg/pr37243.f: Ditto. * gfortran.dg/g77/19990826-3.f: Ditto. * gfortran.dg/g77/20020307-1.f : Ditto. * gfortran.dg/g77/980310-3.f: Ditto. Added: trunk/gcc/testsuite/gfortran.dg/data_constraints_3.f90 Modified: trunk/gcc/fortran/ChangeLog trunk/gcc/fortran/error.c trunk/gcc/fortran/gfortran.h trunk/gcc/fortran/match.c trunk/gcc/fortran/parse.c trunk/gcc/fortran/resolve.c trunk/gcc/fortran/symbol.c trunk/gcc/fortran/trans-stmt.c trunk/gcc/testsuite/ChangeLog trunk/gcc/testsuite/gfortran.dg/data_constraints_1.f90 trunk/gcc/testsuite/gfortran.dg/g77/19990826-3.f trunk/gcc/testsuite/gfortran.dg/g77/20020307-1.f trunk/gcc/testsuite/gfortran.dg/g77/980310-3.f trunk/gcc/testsuite/gfortran.dg/pr37243.f
[Bug fortran/40881] warn for obsolescent features
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40881 Tobias Burnus burnus at gcc dot gnu.org changed: What|Removed |Added CC||burnus at gcc dot gnu.org --- Comment #9 from Tobias Burnus burnus at gcc dot gnu.org 2012-08-14 10:30:26 UTC --- (In reply to comment #0) (2) Shared DO termination and termination on a statement other than END DO or CONTINUE (6) DATA statements amongst executable statements Those two are now fixed. I think the only missing item is the following: (8) Fixed form source (I think one should consider to add some flag to silence the fixed-form warning. At least I know a lot of code, which is in fixed form but otherwise warning free.)
[Bug fortran/40881] warn for obsolescent features
--- Comment #7 from dfranke at gcc dot gnu dot org 2010-05-07 19:46 --- (In reply to comment #5) * shared DO termination Ahh, I'd like to see that one! (In reply to comment #6) That's your PR40165 ;) -- dfranke at gcc dot gnu dot org changed: What|Removed |Added CC||dfranke at gcc dot gnu dot ||org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40881
[Bug fortran/40881] warn for obsolescent features
--- Comment #6 from burnus at gcc dot gnu dot org 2009-08-03 07:04 --- (In reply to comment #3) The warnings about deleted features can be turned off via -std=legacy, and are turned into errors by -std=f95 and above. I think I would like to see a way to disable them with -std=gnu. Sometimes one wants to have as many warnings as possible, except for one class of warnings, which appears often in legacy programs. Thus -W(no-)deleted-std or something like that (on for -std=gnu, off for -std=legacy) would be sometimes useful, if one wants to get an old program running. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40881
[Bug fortran/40881] warn for obsolescent features
--- Comment #4 from janus at gcc dot gnu dot org 2009-08-02 10:59 --- Subject: Bug 40881 Author: janus Date: Sun Aug 2 10:58:44 2009 New Revision: 150349 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=150349 Log: 2009-08-02 Janus Weil ja...@gcc.gnu.org PR fortran/40881 * decl.c (match_char_length): Warn about old-style character length declarations. * match.c (match_arithmetic_if,gfc_match_if): Modify warning message for arithmetic if. (gfc_match_goto): Warn about computed gotos. (gfc_match_return): Warn about alternate return. (gfc_match_st_function): Warn about statement functions. * resolve.c (resolve_fl_procedure): Modify warning message for assumed-length character functions. 2009-08-02 Janus Weil ja...@gcc.gnu.org PR fortran/40881 * gfortran.dg/aliasing_dummy_1.f90: Add -std=legacy. * gfortran.dg/altreturn_3.f90: Ditto. * gfortran.dg/altreturn_5.f90: Ditto. * gfortran.dg/altreturn_6.f90: Ditto. * gfortran.dg/altreturn_7.f90: Ditto. * gfortran.dg/array_constructor_13.f90: Ditto. * gfortran.dg/arrayio_7.f90: Ditto. * gfortran.dg/arrayio_8.f90: Ditto. * gfortran.dg/assumed_charlen_function_3.f90: Modified warning message. * gfortran.dg/assumed_charlen_function_4.f90: Add -std=legacy. * gfortran.dg/assumed_charlen_function_5.f90: Modified warning message. * gfortran.dg/backspace_8.f: Add -std=legacy. * gfortran.dg/backspace_9.f: Ditto. * gfortran.dg/char_comparison_1.f: Ditto. * gfortran.dg/char_decl_1.f90: Ditto. * gfortran.dg/char_initialiser_actual.f90: Ditto. * gfortran.dg/char_pointer_assign.f90: Ditto. * gfortran.dg/char_pointer_dependency.f90: Ditto. * gfortran.dg/char_pointer_dummy.f90: Ditto. * gfortran.dg/char_pointer_func.f90: Ditto. * gfortran.dg/common_8.f90: Ditto. * gfortran.dg/constant_substring.f: Ditto. * gfortran.dg/data_char_2.f90: Ditto. * gfortran.dg/der_array_io_1.f90: Ditto. * gfortran.dg/der_array_io_2.f90: Ditto. * gfortran.dg/der_array_io_3.f90: Ditto. * gfortran.dg/der_io_3.f90: Ditto. * gfortran.dg/dev_null.F90: Ditto. * gfortran.dg/direct_io_2.f90: Ditto. * gfortran.dg/do_iterator_2.f90: Ditto. * gfortran.dg/e_d_fmt.f90: Ditto. * gfortran.dg/empty_format_1.f90: Ditto. * gfortran.dg/entry_17.f90: Modified warning message. * gfortran.dg/entry_7.f90: Add -std=legacy. * gfortran.dg/eor_1.f90: Ditto. * gfortran.dg/equiv_2.f90: Ditto. * gfortran.dg/equiv_constraint_2.f90: Use new-style character length. * gfortran.dg/equiv_substr.f90: Add -std=legacy. * gfortran.dg/extended_char_comparison_1.f: Ditto. * gfortran.dg/fmt_bz_bn_err.f: Ditto. * gfortran.dg/fmt_error_2.f90: Ditto. * gfortran.dg/fmt_read_bz_bn.f90: Ditto. * gfortran.dg/fmt_tl.f: Ditto. * gfortran.dg/fmt_white.f: Ditto. * gfortran.dg/func_derived_1.f90: Ditto. * gfortran.dg/g77_intrinsics_funcs.f: Ditto. * gfortran.dg/g77_intrinsics_sub.f: Ditto. * gfortran.dg/global_references_2.f90: Ditto. * gfortran.dg/hollerith_1.f90: Ditto. * gfortran.dg/hollerith.f90: Use new-style character length. * gfortran.dg/hollerith_f95.f90: Ditto. * gfortran.dg/ichar_1.f90: Add -std=legacy. * gfortran.dg/implicit_6.f90: Ditto. * gfortran.dg/implicit_9.f90: Ditto. * gfortran.dg/inquire_13.f90: Ditto. * gfortran.dg/inquire_5.f90: Ditto. * gfortran.dg/inquire_6.f90: Ditto. * gfortran.dg/inquire.f90: Ditto. * gfortran.dg/io_constraints_1.f90: Use new-style character length. * gfortran.dg/io_constraints_2.f90: Ditto. * gfortran.dg/list_read_2.f90: Add -std=legacy. * gfortran.dg/loc_2.f90: Ditto. * gfortran.dg/logical_1.f90: Ditto. * gfortran.dg/longline.f: Ditto. * gfortran.dg/merge_char_1.f90: Ditto. * gfortran.dg/namelist_12.f: Ditto. * gfortran.dg/namelist_14.f90: Ditto. * gfortran.dg/namelist_18.f90: Ditto. * gfortran.dg/namelist_19.f90: Ditto. * gfortran.dg/namelist_21.f90: Ditto. * gfortran.dg/namelist_22.f90: Ditto. * gfortran.dg/namelist_37.f90: Ditto. * gfortran.dg/namelist_54.f90: Ditto. * gfortran.dg/namelist_55.f90: Ditto. * gfortran.dg/namelist_empty.f90: Ditto. * gfortran.dg/namelist_use.f90: Use new-style character length. * gfortran.dg/namelist_use_only.f90: Add -std=legacy. * gfortran.dg/nested_modules_4.f90: Ditto. * gfortran.dg/nested_modules_5.f90: Ditto. * gfortran.dg/open-options-blanks.f: Ditto. * gfortran.dg/output_exponents_1.f90: Ditto. *
[Bug fortran/40881] warn for obsolescent features
--- Comment #5 from janus at gcc dot gnu dot org 2009-08-02 11:13 --- r150349 adds warnings for: * alternate return * computed goto * statement functions * old-style character lengths Before we already had: * arithmetic if * assumed-length character functions Which leaves the following warnings unimplemented: * shared DO termination * DATA statements among executable statements * fixed form source -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40881
[Bug fortran/40881] warn for obsolescent features
-- janus at gcc dot gnu dot org changed: What|Removed |Added AssignedTo|unassigned at gcc dot gnu |janus at gcc dot gnu dot org |dot org | Status|UNCONFIRMED |ASSIGNED Ever Confirmed|0 |1 Last reconfirmed|-00-00 00:00:00 |2009-08-01 14:24:32 date|| http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40881
[Bug fortran/40881] warn for obsolescent features
--- Comment #3 from janus at gcc dot gnu dot org 2009-07-30 08:20 --- In principle warnings for obsolescent features are already there (cf. GFC_STD_F95_OBS). They are issued with -std=f95 or above, which does work e.g. for arithmetic if. However, there is no warning for alternate return (maybe others are missing as well). The warnings about deleted features can be turned off via -std=legacy, and are turned into errors by -std=f95 and above. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40881
[Bug fortran/40881] warn for obsolescent features
--- Comment #2 from janus at gcc dot gnu dot org 2009-07-29 11:41 --- (In reply to comment #1) In a similar vain: One could introduct an option to disable warning for the deleted features Good point. In particular these are: (1) Real and double precision DO variables. (2) Branching to an END IF statement from outside its block. (3) PAUSE statement. (4) ASSIGN and assigned GO TO statements and assigned format speci#64257;ers. (5) H edit descriptor. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40881
[Bug fortran/40881] warn for obsolescent features
--- Comment #1 from burnus at gcc dot gnu dot org 2009-07-28 08:33 --- In a similar vain: One could introduct an option to disable warning for the deleted features (such as using real-valued loops) - currently, those warnings alre always printed, hiding other warnings in all the output. By the way, in the standard, obsolescent parts appear in smaller print. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40881