From: foreese Date: Thu, 10 Aug 2017 12:52:01 +0000 (+0000) Subject: 2017-08-10 Fritz Reese X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a3b89816e948b4fcc5433e5fc485e9be8d1e7aba;p=thirdparty%2Fgcc.git 2017-08-10 Fritz Reese gcc/fortran/ChangeLog: * options.c (set_dec_flags): Only set legacy standards when value is not zero. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@251025 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 20fa93f6ec94..50f2f0449085 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,8 @@ +2017-08-10 Fritz Reese + + * options.c (set_dec_flags): Only set legacy standards when value + is not zero. + 2017-08-10 Fritz Reese * options.c (set_dec_flags, gfc_post_options): Only set flag_d_lines diff --git a/gcc/fortran/options.c b/gcc/fortran/options.c index cd254e932296..f7bbd7f2cde5 100644 --- a/gcc/fortran/options.c +++ b/gcc/fortran/options.c @@ -52,11 +52,13 @@ set_default_std_flags (void) static void set_dec_flags (int value) { - /* Allow legacy code without warnings. */ - gfc_option.allow_std |= GFC_STD_F95_OBS | GFC_STD_F95_DEL - | GFC_STD_GNU | GFC_STD_LEGACY; - gfc_option.warn_std &= ~(GFC_STD_LEGACY | GFC_STD_F95_DEL); - + if (value) + { + /* Allow legacy code without warnings. */ + gfc_option.allow_std |= GFC_STD_F95_OBS | GFC_STD_F95_DEL + | GFC_STD_GNU | GFC_STD_LEGACY; + gfc_option.warn_std &= ~(GFC_STD_LEGACY | GFC_STD_F95_DEL); + } /* Set other DEC compatibility extensions. */ flag_dollar_ok |= value;