]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
a68: command-line options
authorJose E. Marchesi <jose.marchesi@oracle.com>
Sat, 11 Oct 2025 17:42:08 +0000 (19:42 +0200)
committerJose E. Marchesi <jose.marchesi@oracle.com>
Sun, 30 Nov 2025 00:52:25 +0000 (01:52 +0100)
This commit adds a new common command-line option to the compiler
driver (-static-libga68) as well as several other front-end specific
options.

Signed-off-by: Jose E. Marchesi <jemarch@gnu.org>
gcc/ChangeLog

* algol68/lang.opt: New file.
* algol68/lang.opt.urls: Generate.
* common.opt: New option -static-libga68.
* common.opt.urls: Generate.
* gcc.cc: Handle OPT_static_libga68.
* regenerate-opt-urls.py (PER_LANGUAGE_OPTION_INDEXES): Add Algol68.

gcc/algol68/lang.opt [new file with mode: 0644]
gcc/algol68/lang.opt.urls [new file with mode: 0644]
gcc/common.opt
gcc/common.opt.urls
gcc/gcc.cc
gcc/regenerate-opt-urls.py

diff --git a/gcc/algol68/lang.opt b/gcc/algol68/lang.opt
new file mode 100644 (file)
index 0000000..5fcbfad
--- /dev/null
@@ -0,0 +1,122 @@
+; Options for the Algol 68 front end.
+; Copyright (C) 2025 Free Software Foundation, Inc.
+;
+; GCC is free software; you can redistribute it and/or modify it under
+; the terms of the GNU General Public License as published by the Free
+; Software Foundation; either version 3, or (at your option) any later
+; version.
+;
+; GCC is distributed in the hope that it will be useful, but WITHOUT ANY
+; WARRANTY; without even the implied warranty of MERCHANTABILITY or
+; FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+; for more details.
+;
+; You should have received a copy of the GNU General Public License
+; along with GCC; see the file COPYING3.  If not see
+; <http://www.gnu.org/licenses/>.
+
+; See the GCC internals manual for a description of this file's format.
+
+; Please try to keep this file in ASCII collating order.
+
+; Describes command-line options used by this frontend
+
+Language
+Algol68
+
+I
+Algol68 Joined Separate
+; Documented in c-family/c.opt
+
+Wextensions
+Algol68 Warning Var(warn_algol68_extensions) LangEnabledBy(Algol68, Wextra)
+Warn for usage of non-portable extensions of Algol 68.
+
+Wvoiding
+Algol68 Warning Var(warn_algol68_voiding) LangEnabledBy(Algol68, Wextra)
+Warn when voiding occurs.
+
+Wextra
+Algol68 Warning
+; Documented in common.opt
+
+Wscope
+Algol68 Warning Var(warn_algol68_scope)
+Warn for potential name scope violations.
+
+Enum
+Name(warn_hidden_declarations_level) Type(int) UnknownError(argument %qs to %<-Whidden-declaration%> not recognized)
+
+EnumValue
+Enum(warn_hidden_declarations_level) String(none) Value(0)
+
+EnumValue
+Enum(warn_hidden_declarations_level) String(prelude) Value(1)
+
+EnumValue
+Enum(warn_hidden_declarations_level) String(all) Value(2)
+
+Whidden-declarations
+Algol68 Alias(Whidden-declarations=,prelude,none)
+Warn about hidden declarations in inner scopes.
+
+Whidden-declarations=
+Algol68 Warning Var(warn_algol68_hidden_declarations) Enum(warn_hidden_declarations_level) Joined RejectNegative LangEnabledBy(Algol68,Wall)
+-Whidden-declarations=[none|prelude|all] Warn about declarations hidden in inner scopes.
+
+fbrackets
+Algol68 Var(flag_brackets)
+-fbrackets     Consider [ .. ] and { .. } as being equivalent to ( .. ).
+
+fassert
+Algol68 Var(flag_assert)
+Generate code for assert contracts.
+
+fcheck=
+Algol68 RejectNegative JoinedOrMissing
+-fcheck=[...]  Specify which runtime checks are to be performed.
+
+fa68-dump-modes
+Algol68 Var(flag_a68_dump_modes)
+Dump Algol 68 modes after parsing.
+
+fa68-dump-ast
+Algol68 Var(flag_a68_dump_ast)
+Dump Algol 68 parse tree after parsing.
+
+fa68-dump-module-interfaces
+Algol68 Var(flag_a68_dump_moif)
+Dump the interfaces of module definitions in the compiled packet.
+
+static-libga68
+Driver
+Link the GNU Algol run-time library statically in the compilation.
+
+shared-libga68
+Driver
+Link the GNU Algol 68 run-time library dynamically in the compilation.
+
+std=algol68
+Algol68
+Compile strict Algol 68 as defined by the Revised Report
+
+std=gnu68
+Algol68
+Accept GNU extensions to Algol 68
+
+; Stropping regimes.
+
+fstropping=
+Algol68 Joined RejectNegative Enum(stropping_regime) Var(flag_stropping_regime)
+-fstropping=[upper|supper]              Stropping regime to expect in Algol 68 programs.
+
+Enum
+Name(stropping_regime) Type(int) UnknownError(unknown stropping_regime setting %qs)
+
+EnumValue
+Enum(stropping_regime) String(upper) Value(0)
+
+EnumValue
+Enum(stropping_regime) String(supper) Value(1)
+
+; This comment is to ensure we retain the blank line above.
diff --git a/gcc/algol68/lang.opt.urls b/gcc/algol68/lang.opt.urls
new file mode 100644 (file)
index 0000000..df303b9
--- /dev/null
@@ -0,0 +1,41 @@
+; Autogenerated by regenerate-opt-urls.py from gcc/algol68/lang.opt and generated HTML
+
+I
+UrlSuffix(gcc/Directory-Options.html#index-I) LangUrlSuffix_D(gdc/Directory-Options.html#index-I) LangUrlSuffix_Algol68(ga68/Directory-options.html#index-I)
+
+Wextensions
+LangUrlSuffix_Algol68(ga68/Warnings-options.html#index-Wextensions)
+
+Wvoiding
+LangUrlSuffix_Algol68(ga68/Warnings-options.html#index-Wno-voiding)
+
+Wextra
+UrlSuffix(gcc/Warning-Options.html#index-Wextra) LangUrlSuffix_D(gdc/Warnings.html#index-Wextra) LangUrlSuffix_Fortran(gfortran/Error-and-Warning-Options.html#index-Wextra)
+
+Wscope
+LangUrlSuffix_Algol68(ga68/Warnings-options.html#index-Wno-scope)
+
+Whidden-declarations
+LangUrlSuffix_Algol68(ga68/Warnings-options.html#index-Whidden-declarations)
+
+fbrackets
+LangUrlSuffix_Algol68(ga68/Dialect-options.html#index-fbrackets)
+
+fassert
+LangUrlSuffix_D(gdc/Runtime-Options.html#index-fassert) LangUrlSuffix_Algol68(ga68/Runtime-options.html#index-fassert)
+
+fcheck=
+LangUrlSuffix_Fortran(gfortran/Code-Gen-Options.html#index-fcheck) LangUrlSuffix_Algol68(ga68/Runtime-options.html#index-fcheck)
+
+fa68-dump-modes
+LangUrlSuffix_Algol68(ga68/Developer-options.html#index-fa68-dump-modes)
+
+fa68-dump-ast
+LangUrlSuffix_Algol68(ga68/Developer-options.html#index-fa68-dump-ast)
+
+static-libga68
+LangUrlSuffix_Algol68(ga68/Linking-options.html#index-static-libga68)
+
+shared-libga68
+LangUrlSuffix_Algol68(ga68/Linking-options.html#index-shared-libga68)
+
index d44f713ae34f8aa3ade9754badb8c1fc906ecf98..0a3d65d4d4a8ee0ff00396a938e2f7690ae3530a 100644 (file)
@@ -3985,6 +3985,9 @@ Driver Joined
 static
 Driver
 
+static-libga68
+Driver
+
 static-libgcc
 Driver
 
index c42fba3157d70fe4d0c4ab7aaf1843c3d3bc13f4..cade6079f578313ca7e374cd7801e6c4d64b9d76 100644 (file)
@@ -1999,6 +1999,9 @@ UrlSuffix(gcc/Overall-Options.html#index-specs)
 static
 UrlSuffix(gcc/Link-Options.html#index-static)
 
+static-libga68
+LangUrlSuffix_Algol68(ga68/Linking-options.html#index-static-libga68)
+
 static-libgcc
 UrlSuffix(gcc/Link-Options.html#index-static-libgcc)
 
index fa46387e59a68abc2e569b73c56b222dba8890fc..b5d0f759f1449e4c894b80be9a34b9b2834af9ae 100644 (file)
@@ -4651,11 +4651,13 @@ driver_handle_option (struct gcc_options *opts,
     case OPT_static_libgfortran:
     case OPT_static_libquadmath:
     case OPT_static_libphobos:
+    case OPT_static_libga68:
     case OPT_static_libgm2:
     case OPT_static_libstdc__:
       /* These are always valid; gcc.cc itself understands the first two
         gfortranspec.cc understands -static-libgfortran,
         libgfortran.spec handles -static-libquadmath,
+        a68spec.cc understands -static-libga68,
         d-spec.cc understands -static-libphobos,
         gm2spec.cc understands -static-libgm2,
         and g++spec.cc understands -static-libstdc++.  */
index 2daa1d603f06e8e30f475028874e10bc6e90a197..bda91905acebeb42debd15efe0e35e55b41e5bb0 100755 (executable)
@@ -361,7 +361,8 @@ def write_url_file(index, optfile, dstfile):
 PER_LANGUAGE_OPTION_INDEXES = [
     ('gcc/Option-Index.html', None),
     ('gdc/Option-Index.html', 'D'),
-    ('gfortran/Option-Index.html', 'Fortran')
+    ('gfortran/Option-Index.html', 'Fortran'),
+    ('ga68/Option-Index.html', 'Algol68'),
 ]
 
 def main(args):