https://gcc.gnu.org/g:cfc9f42122f41668b986126ba7e65e3dd8bf1e9e
commit r15-7732-gcfc9f42122f41668b986126ba7e65e3dd8bf1e9e Author: Jerry DeLisle <jvdeli...@gcc.gnu.org> Date: Wed Feb 26 17:26:26 2025 -0800 GCC: Documentation of -x option 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. Diff: --- gcc/doc/invoke.texi | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index bad49a017cc1..6f8bf3923863 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -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