I have committed the attached patch to the 4.7 trunk (rev 179854) and
the 4.6 branch (rev 179855).
invoke.texi wasn't updated when -fwhole-file became the default in GCC
4.6. This was spotted by Janus, who created the first draft patch. This
patch was approved by Janus off list.
Tobias
On 10/09/2011 07:01 PM, Tobias Burnus wrote:
On 08.10.2011 11:51, Janus Weil wrote:
Thanks! What's about the .texi change for -fwhole-file?
Will do. Should I include a note about deprecation? And if yes, do you
have a suggestion for the wording?
How about the following attachment?
Index: ChangeLog
===================================================================
--- ChangeLog (revision 179852)
+++ ChangeLog (working copy)
@@ -1,3 +1,9 @@
+2011-10-11 Tobias Burnus <bur...@net-b.de>
+ Janus Weil <ja...@gcc.gnu.org>
+
+ * invoke.texi (-fwhole-file): Update wording since -fwhole-file
+ is now enabled by default.
+
2011-10-11 Michael Meissner <meiss...@linux.vnet.ibm.com>
* trans-expr.c (gfc_conv_power_op): Delete old interface with two
Index: invoke.texi
===================================================================
--- invoke.texi (revision 179852)
+++ invoke.texi (working copy)
@@ -164,7 +164,7 @@
@item Code Generation Options
@xref{Code Gen Options,,Options for code generation conventions}.
@gccoptlist{-fno-automatic -ff2c -fno-underscoring @gol
--fwhole-file -fsecond-underscore @gol
+-fno-whole-file -fsecond-underscore @gol
-fbounds-check -fcheck-array-temporaries -fmax-array-constructor =@var{n} @gol
-fcheck=@var{<all|array-temps|bounds|do|mem|pointer|recursion>} @gol
-fcoarray=@var{<none|single|lib>} -fmax-stack-var-size=@var{n} @gol
@@ -1225,19 +1225,22 @@
prevent accidental linking between procedures with incompatible
interfaces.
-@item -fwhole-file
-@opindex @code{fwhole-file}
-By default, GNU Fortran parses, resolves and translates each procedure
-in a file separately. Using this option modifies this such that the
-whole file is parsed and placed in a single front-end tree. During
-resolution, in addition to all the usual checks and fixups, references
+@item -fno-whole-file
+@opindex @code{fno-whole-file}
+This flag causes the compiler to resolve and translate each procedure in
+a file separately.
+
+By default, the whole file is parsed and placed in a single front-end tree.
+During resolution, in addition to all the usual checks and fixups, references
to external procedures that are in the same file effect resolution of
-that procedure, if not already done, and a check of the interfaces. The
+that procedure, if not already done, and a check of the interfaces. The
dependences are resolved by changing the order in which the file is
translated into the backend tree. Thus, a procedure that is referenced
is translated before the reference and the duplication of backend tree
declarations eliminated.
+The @option{-fno-whole-file} option is deprecated and may lead to wrong code.
+
@item -fsecond-underscore
@opindex @code{fsecond-underscore}
@cindex underscore
Index: ChangeLog
===================================================================
--- ChangeLog (revision 179794)
+++ ChangeLog (working copy)
@@ -1,5 +1,11 @@
2011-10-11 Tobias Burnus <bur...@net-b.de>
+ Janus Weil <ja...@gcc.gnu.org>
+ * invoke.texi (-fwhole-file): Update wording since -fwhole-file
+ is now enabled by default.
+
+2011-10-11 Tobias Burnus <bur...@net-b.de>
+
PR fortran/50273
* trans-common.c (translate_common): Fix -Walign-commons check.
Index: invoke.texi
===================================================================
--- invoke.texi (revision 179793)
+++ invoke.texi (working copy)
@@ -163,7 +163,7 @@
@item Code Generation Options
@xref{Code Gen Options,,Options for code generation conventions}.
@gccoptlist{-fno-automatic -ff2c -fno-underscoring @gol
--fwhole-file -fsecond-underscore @gol
+-fno-whole-file -fsecond-underscore @gol
-fbounds-check -fcheck-array-temporaries -fmax-array-constructor =@var{n} @gol
-fcheck=@var{<all|array-temps|bounds|do|mem|pointer|recursion>} @gol
-fcoarray=@var{<none|single>} -fmax-stack-var-size=@var{n} @gol
@@ -1206,19 +1206,22 @@
prevent accidental linking between procedures with incompatible
interfaces.
-@item -fwhole-file
-@opindex @code{fwhole-file}
-By default, GNU Fortran parses, resolves and translates each procedure
-in a file separately. Using this option modifies this such that the
-whole file is parsed and placed in a single front-end tree. During
-resolution, in addition to all the usual checks and fixups, references
+@item -fno-whole-file
+@opindex @code{fno-whole-file}
+This flag causes the compiler to resolve and translate each procedure in
+a file separately.
+
+By default, the whole file is parsed and placed in a single front-end tree.
+During resolution, in addition to all the usual checks and fixups, references
to external procedures that are in the same file effect resolution of
-that procedure, if not already done, and a check of the interfaces. The
+that procedure, if not already done, and a check of the interfaces. The
dependences are resolved by changing the order in which the file is
translated into the backend tree. Thus, a procedure that is referenced
is translated before the reference and the duplication of backend tree
declarations eliminated.
+The @option{-fno-whole-file} option is deprecated and may lead to wrong code.
+
@item -fsecond-underscore
@opindex @code{fsecond-underscore}
@cindex underscore