+2019-10-30 Mark Eggleston <mark.eggleston@codethink.com>
+
+ * invoke.texi: Add -Wno-overwrite-recursive to list of options. Add
+ description of -Wno-overwrite-recursive. Fix typo in description
+ of -Winteger-division.
+ * lang.opt: Add option -Woverwrite-recursive initialised as on.
+ * option.c (gfc_post_options): Output warning only if it is enabled.
+
2019-10-28 Tobias Burnus <tobias@codesourcery.com>
PR fortran/91863
-Wc-binding-type -Wcharacter-truncation -Wconversion @gol
-Wdo-subscript -Wfunction-elimination -Wimplicit-interface @gol
-Wimplicit-procedure -Wintrinsic-shadow -Wuse-without-only @gol
--Wintrinsics-std -Wline-truncation -Wno-align-commons -Wno-tabs @gol
--Wreal-q-constant -Wsurprising -Wunderflow -Wunused-parameter @gol
--Wrealloc-lhs -Wrealloc-lhs-all -Wfrontend-loop-interchange @gol
--Wtarget-lifetime -fmax-errors=@var{n} -fsyntax-only -pedantic @gol
+-Wintrinsics-std -Wline-truncation -Wno-align-commons @gol
+-Wno-overwrite-recursive -Wno-tabs -Wreal-q-constant -Wsurprising @gol
+-Wunderflow -Wunused-parameter -Wrealloc-lhs -Wrealloc-lhs-all @gol
+-Wfrontend-loop-interchange -Wtarget-lifetime -fmax-errors=@var{n} @gol
+-fsyntax-only -pedantic @gol
-pedantic-errors @gol
}
@opindex @code{Winteger-division}
@cindex warnings, integer division
@cindex warnings, division of integers
-Warn if a constant integer division truncates it result.
+Warn if a constant integer division truncates its result.
As an example, 3/5 evaluates to 0.
@item -Wintrinsics-std
be used to never trigger this behavior and always link to the intrinsic
regardless of the selected standard.
+@item -Wno-overwrite-recursive
+@opindex @code{Woverwrite-recursive}
+@cindex warnings, overwrite recursive
+Do not warn when @option{-fno-automatic} is used with @option{-frecursive}. Recursion
+will be broken if the relevant local variables do not have the attribute
+@code{AUTOMATIC} explicitly declared. This option can be used to suppress the warning
+when it is known that recursion is not broken. Useful for build environments that use
+@option{-Werror}.
+
@item -Wreal-q-constant
@opindex @code{Wreal-q-constant}
@cindex warnings, @code{q} exponent-letter
gfc_warning_now (0, "Flag %<-fno-automatic%> overwrites %<-fmax-stack-var-size=%d%>",
flag_max_stack_var_size);
else if (!flag_automatic && flag_recursive)
- gfc_warning_now (0, "Flag %<-fno-automatic%> overwrites %<-frecursive%>");
+ gfc_warning_now (OPT_Woverwrite_recursive, "Flag %<-fno-automatic%> "
+ "overwrites %<-frecursive%>");
else if (!flag_automatic && flag_openmp)
gfc_warning_now (0, "Flag %<-fno-automatic%> overwrites %<-frecursive%> implied by "
"%<-fopenmp%>");