diff options
author | Roger Sayle <roger@eyesopen.com> | 2004-08-01 21:37:21 +0000 |
---|---|---|
committer | Roger Sayle <sayle@gcc.gnu.org> | 2004-08-01 21:37:21 +0000 |
commit | fc2d8429a97aa1cdfe7794477e90ac924e646b06 (patch) | |
tree | d1f12affbdc6629e624a0c0fa2dfc519f766a2d3 /gcc/fortran | |
parent | dbe4d0704fc41055b9c2707ea5b1b9f3b5b8e379 (diff) | |
download | gcc-fc2d8429a97aa1cdfe7794477e90ac924e646b06.zip gcc-fc2d8429a97aa1cdfe7794477e90ac924e646b06.tar.gz gcc-fc2d8429a97aa1cdfe7794477e90ac924e646b06.tar.bz2 |
options.c (gfc_init_options): Don't warn about the use GNU extensions by default.
* options.c (gfc_init_options): Don't warn about the use GNU
extensions by default.
(gfc_post_options): Warn about GNU extensions with -pedantic.
(gfc_handle_option): Don't warn about GNU extensions with -std=gnu.
From-SVN: r85413
Diffstat (limited to 'gcc/fortran')
-rw-r--r-- | gcc/fortran/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/fortran/options.c | 10 |
2 files changed, 14 insertions, 3 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 6773427..6a5151e 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,10 @@ +2004-08-01 Roger Sayle <roger@eyesopen.com> + + * options.c (gfc_init_options): Don't warn about the use GNU + extensions by default. + (gfc_post_options): Warn about GNU extensions with -pedantic. + (gfc_handle_option): Don't warn about GNU extensions with -std=gnu. + 2004-07-30 Richard Henderson <rth@redhat.com> * trans-expr.c (gfc_conv_expr_reference): Create a CONST_DECL diff --git a/gcc/fortran/options.c b/gcc/fortran/options.c index c8dc329..8432f5e 100644 --- a/gcc/fortran/options.c +++ b/gcc/fortran/options.c @@ -80,7 +80,7 @@ gfc_init_options (unsigned int argc ATTRIBUTE_UNUSED, gfc_option.allow_std = GFC_STD_F95_OBS | GFC_STD_F95_DEL | GFC_STD_F2003_OBS | GFC_STD_F2003_DEL | GFC_STD_F2003 | GFC_STD_GNU; gfc_option.warn_std = GFC_STD_F95_OBS | GFC_STD_F95_DEL - | GFC_STD_F2003 | GFC_STD_GNU; + | GFC_STD_F2003; return CL_F95; } @@ -111,7 +111,11 @@ gfc_post_options (const char **pfilename) flag_inline_trees = 2; flag_inline_functions = 0; } - + + /* If -pedantic, warn about the use of GNU extensions. */ + if (pedantic && (gfc_option.allow_std & GFC_STD_GNU) != 0) + gfc_option.warn_std |= GFC_STD_GNU; + return false; } @@ -321,7 +325,7 @@ gfc_handle_option (size_t scode, const char *arg, int value) gfc_option.allow_std = GFC_STD_F95_OBS | GFC_STD_F95_DEL | GFC_STD_F2003_OBS | GFC_STD_F2003_DEL | GFC_STD_F2003 | GFC_STD_GNU; gfc_option.warn_std = GFC_STD_F95_OBS | GFC_STD_F95_DEL - | GFC_STD_F2003_OBS | GFC_STD_F2003_DEL | GFC_STD_GNU; + | GFC_STD_F2003_OBS | GFC_STD_F2003_DEL; break; } |