http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48785

--- Comment #7 from Tobias Burnus <burnus at gcc dot gnu.org> 2011-05-02 
14:31:56 UTC ---
(In reply to comment #6)
> Can you elaborate on this?
> That's why I changed the mask from GFC_STD_GNU to (GFC_STD_GNU |
> GFC_STD_F2008).

First, the code is/should be also allowed for -std=legacy (GFC_STD_LEGACY).

Secondly, the point is not that GFC_STD_GNU and GFC_STD_F2008 are same (they
obviously aren't), but that

having      (compile_options.allow_std | GFC_STD_F2008) != 0
 => implies (compile_options.allow_std | GFC_STD_GNU) != 0

which is a property of "allow_std". See gcc/fortran/options.c:

    case OPT_std_f2003:
      gfc_option.allow_std = GFC_STD_F95_OBS | GFC_STD_F77 
    | GFC_STD_F2003 | GFC_STD_F95 | GFC_STD_F2008_OBS;
    case OPT_std_f2008:
      gfc_option.allow_std = GFC_STD_F95_OBS | GFC_STD_F77 
    | GFC_STD_F2003 | GFC_STD_F95 | GFC_STD_F2008 | GFC_STD_F2008_OBS;
    case OPT_std_gnu:
      set_default_std_flags ();
      break;

Reply via email to