]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
GCC: Documentation of -x option
authorJerry DeLisle <jvdelisle@gcc.gnu.org>
Thu, 27 Feb 2025 01:26:26 +0000 (17:26 -0800)
committerJerry DeLisle <jvdelisle@gcc.gnu.org>
Thu, 27 Feb 2025 20:39:29 +0000 (12:39 -0800)
This change updates information about the -x option to clarify
that it does not ensure standards compliance. Sparked by
discussions in the following PR.

PR fortran/108369

gcc/ChangeLog:

* doc/invoke.texi: Add a note to clarify. Adjust some wording.

gcc/doc/invoke.texi

index bad49a017cc1bb0922eba9f0b2db80166d409cd7..6f8bf3923863dee9ed35b0497f1ef58a65726701 100644 (file)
@@ -1700,9 +1700,13 @@ f77  f77-cpp-input f95  f95-cpp-input
 go
 @end smallexample
 
+Note that @option{-x} does not imply a particular language standard.
+For example @option{-x f77} may also require @option{-std=legacy} for some older
+source codes.
+
 @item -x none
 Turn off any specification of a language, so that subsequent files are
-handled according to their file name suffixes (as they are if @option{-x}
+handled according to their file name suffixes (as if @option{-x}
 has not been used at all).
 @end table