diff options
Diffstat (limited to 'gcc/fortran/options.c')
-rw-r--r-- | gcc/fortran/options.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/gcc/fortran/options.c b/gcc/fortran/options.c index f0ab399..ddab37e 100644 --- a/gcc/fortran/options.c +++ b/gcc/fortran/options.c @@ -52,6 +52,7 @@ gfc_init_options (unsigned int argc ATTRIBUTE_UNUSED, gfc_option.verbose = 0; gfc_option.warn_aliasing = 0; + gfc_option.warn_ampersand = 0; gfc_option.warn_conversion = 0; gfc_option.warn_implicit_interface = 0; gfc_option.warn_line_truncation = 0; @@ -271,6 +272,9 @@ gfc_post_options (const char **pfilename) /* Implement -fno-automatic as -fmax-stack-var-size=0. */ if (!gfc_option.flag_automatic) gfc_option.flag_max_stack_var_size = 0; + + if (pedantic) + gfc_option.warn_ampersand = 1; return false; } @@ -283,6 +287,7 @@ set_Wall (void) { gfc_option.warn_aliasing = 1; + gfc_option.warn_ampersand = 1; gfc_option.warn_line_truncation = 1; gfc_option.warn_nonstd_intrinsics = 1; gfc_option.warn_surprising = 1; @@ -385,6 +390,10 @@ gfc_handle_option (size_t scode, const char *arg, int value) gfc_option.warn_aliasing = value; break; + case OPT_Wampersand: + gfc_option.warn_ampersand = value; + break; + case OPT_Wconversion: gfc_option.warn_conversion = value; break; @@ -553,6 +562,7 @@ gfc_handle_option (size_t scode, const char *arg, int value) gfc_option.allow_std = GFC_STD_F95_OBS | GFC_STD_F95 | GFC_STD_F77; gfc_option.warn_std = GFC_STD_F95_OBS; gfc_option.max_identifier_length = 31; + gfc_option.warn_ampersand = 1; gfc_option.warn_tabs = 0; break; @@ -561,6 +571,7 @@ gfc_handle_option (size_t scode, const char *arg, int value) | GFC_STD_F2003 | GFC_STD_F95; gfc_option.warn_std = GFC_STD_F95_OBS; gfc_option.max_identifier_length = 63; + gfc_option.warn_ampersand = 1; break; case OPT_std_gnu: |