1 ; Options for the Modula-2 front end.
3 ; Copyright (C) 2016-2024 Free Software Foundation, Inc.
4 ; Contributed by Gaius Mulley <gaius.mulley@southwales.ac.uk>.
6 ; This file is part of GNU Modula-2.
8 ; GNU Modula-2 is free software; you can redistribute it and/or modify
9 ; it under the terms of the GNU General Public License as published by
10 ; the Free Software Foundation; either version 3, or (at your option)
13 ; GNU Modula-2 is distributed in the hope that it will be useful, but
14 ; WITHOUT ANY WARRANTY; without even the implied warranty of
15 ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 ; General Public License for more details.
18 ; You should have received a copy of the GNU General Public License
19 ; along with GNU Modula-2; see the file COPYING. If not,
20 ; see <https://www.gnu.org/licenses/>. *)
22 ; See the GCC internals manual for a description of this file's format.
24 ; There are two sections:
25 ; 1. Options specific to Modula-2
26 ; 2. Options shared with C or the Driver.
27 ; Please keep any new additions for either case in the relevant section.
28 ; Please try to keep this file in ASCII collating order.
35 turns on case statement label compile time checking when using an expression of an enum type.
39 compiler checks to force definition module procedure parameter names with their implementation module counterpart
43 compiler warns if a cast is being used on types of differing sizes
47 inform user which parameters will be passed by reference
51 extra compile time semantic checking, typically tries to catch poor programming style
53 Wuninit-variable-checking
55 turns on compile time analysis in the first basic block of a procedure detecting access to uninitialized data.
57 Wuninit-variable-checking=
59 turns on compile time analysis to detect access to uninitialized variables, the checking can be specified by: known,cond,all.
63 automatically initializes all pointers to NIL
67 turns on runtime subrange, array index and indirection via NIL pointer checking
71 turns on runtime checking to check whether a CASE statement requires an ELSE clause when one was not specified
75 use cpp to preprocess the module
79 passed to the preprocessor if -fcpp is used (internal switch)
83 passed to the preprocessor if -fcpp is used (internal switch)
87 call a real function, rather than the builtin equivalent
91 turn on internal debugging of the compiler (internal switch)
93 fdebug-function-line-numbers
95 turn on tracing of procedure line numbers (internal switch)
99 recognize the specified suffix as a definition module filename
103 display all inbuilt system items
107 allows opaque types to be implemented as any type (a GNU Modula-2 extension)
111 turns on runtime checking to check whether a floating point number will exceed range
115 create a topologically sorted module list from all dependent modules used in the application
119 turns on all range checking for numerical values
123 use ISO dialect of Modula-2
127 specify the library order, the libraries may be specified by a comma separated abbreviation: log,min,pim,iso or by directory names: m2log,m2min,m2pim,m2iso.
131 set all location values to a specific value (internal switch)
135 turn on internal debug tracing for quad,token,line,all (internal switch)
139 dump Modula-2 internal intemediate representation specified by: all,quad,decl,gimple
143 dump Modula-2 decls to the filename stem specified
147 dump Modula-2 gimple to the filename stem specified
151 dump Modula-2 quads to the filename stem specified
155 filter the language dump using a comma separated list of procedures and modules
159 generate extra nops to improve debugging, producing an instruction for every code related keyword
163 generate error messages which render keywords in lower case
167 specify the module mangled prefix name for all modules in the following include paths
171 ; For internal use only: used by the driver to copy the user facing -I option
175 insert plugin to identify runtime errors at compiletime
179 specify the module mangled prefix name
183 display statistics about the amount of source lines compiled and symbols used
187 experimental flag to turn on the new strict type checker
191 compile all implementation modules and program module at once
195 recognize the specified suffix as implementation and module filenames
199 turns on runtime checking to detect accessing data through a NIL value pointer
203 use PIM [234] dialect of Modula-2
207 use PIM 2 dialect of Modula-2
211 use PIM 3 dialect of Modula-2
215 use PIM 4 dialect of Modula-2
217 fpositive-mod-floor-div
219 force positive result from MOD and DIV result floor
223 link against the pthread library (default on)
227 internal compiler debugging information, dump the list of quadruples
231 turns on all range checking for numerical values
235 turns on runtime checking for functions which finish without executing a RETURN statement
239 specify the list of runtime modules and their initialization order
243 the modules initialization order is dynamically determined by M2RTS and application dependencies
247 generate a C source scaffold for the current module being compiled
251 generate a C++ source scaffold for the current module being compiled
255 generate the main function
259 generate static scaffold initialization and finalization for every module inside main
263 generate a shared library from the module
267 turns on all software runtime checking (an abbreviation for -fnil -frange -findex -fwholediv -fcase -freturn -fwholevalue -ffloatvalue)
271 display the location of module source files as they are compiled
275 create a swig interface file for the module
277 funbounded-by-reference
279 optimize non var unbounded parameters by passing it by reference, providing it is not written to within the callee procedure.
283 orders the initialization/finalizations for scaffold-static or force linking of modules if scaffold-dynamic
287 ; Documented in common.opt
291 turns on all division and modulus by zero checking for ordinal values
295 turns on runtime checking to check whether a whole number will exceed range
299 Link the standard Modula-2 libraries statically in the compilation.
301 ; Here are C options that we also recognize, either within the compiler
302 ; or to build the preprocessor command lines.
306 ; Documented in c.opt
310 ; Documented in common.opt
314 ; Documented in common.opt
318 ; Documented in c.opt
322 ; Documented in c.opt
326 ; Documented in c.opt
330 ; Documented in c.opt
334 ; Documented in c.opt
337 Modula-2 Joined Separate
338 ; Documented in c.opt
341 Modula-2 Joined Separate
346 ; Documented in c.opt
350 ; Documented in c.opt
354 ; Documented in c.opt
358 ; Documented in c.opt
362 ; Documented in c.opt
366 ; Documented in c.opt
370 ; Documented in c.opt
374 ; Documented in c.opt
378 ; Documented in c.opt
382 ; Documented in c.opt
386 ; Documented in c.opt
390 ; Documented in c.opt
394 ; Documented in c.opt
398 ; Documented in c.opt
402 ; Documented in common.opt
406 ; Documented in c.opt
410 ; Documented in c.opt
414 ; Documented in c.opt
418 ; Documented in c.opt
422 ; Documented in c.opt
426 ; Documented in c.opt
430 ; Documented in c.opt
434 ; Documented in c.opt
440 Modula-2 Alias(save-temps)
444 save temporary preprocessed files
448 save temporary preprocessed files
452 ; Documented in c.opt
454 ; This comment is to ensure we retain the blank line above.