(root)/
gcc-13.2.0/
gcc/
d/
lang.opt
; lang.opt -- Options for the D front end.
; Copyright (C) 2006-2023 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.

Language
D

-dependencies
D Alias(M)
; Documented in C

-print-missing-file-dependencies
D Alias(MG)
; Documented in C

-user-dependencies
D Alias(MM)
; Documented in C

-write-dependencies
D NoDriverArg Separate Alias(MD)
; Documented in C

-write-user-dependencies
D NoDriverArg Separate Alias(MMD)
; Documented in C

H
D
; Different from documented use in C.

Hd
D Joined Separate
-Hd <dir>	Write D interface files to directory <dir>.

Hf
D Joined Separate
-Hf <file>	Write D interface to <file>.

I
D Joined Separate
; Documented in C

J
D Joined Separate
; Different from documented use in Fortran.

M
D
; Documented in C

MD
D Separate NoDriverArg
; Documented in C

MF
D Joined Separate
; Documented in C

MG
D
; Documented in C

MM
D
; Documented in C

MMD
D Separate NoDriverArg
; Documented in C

MP
D
; Documented in C

MT
D Joined Separate
; Documented in C

MQ
D Joined Separate
; Documented in C

Waddress
D Warning Var(warn_address) LangEnabledBy(D, Wextra)
; Documented in C

Wall
D
; Documented in C

Walloca
D
; Documented in C

Walloca-larger-than=
D
; Documented in C

Wno-alloca-larger-than
D
; Documented in C

Wbuiltin-declaration-mismatch
D
; Documented in C

Wcast-result
D Warning Var(warn_cast_result) LangEnabledBy(D, Wextra)
Warn about casts that will produce a null result.

Wdeprecated
D
; Documented in common.opt

Werror
D
; Documented in common.opt

Wextra
D Warning
; Documented in common.opt

Wmismatched-special-enum
D Warning Var(warn_mismatched_special_enum) LangEnabledBy(D, Wextra)
Warn when a special enum is declared with the wrong base type.

Wpsabi
D
; Documented in C

Wspeculative
D
Warn from speculative compiles such as __traits(compiles).

Wunknown-pragmas
D Var(warn_unknown_pragmas) LangEnabledBy(D, Wextra)
; Documented in C

Wvarargs
D
; Documented in C

X
D
Generate JSON file.

Xf
D Joined Separate
-Xf <file>	Write JSON output to the given <file>.

debuglib=
Driver Joined
Debug library to use instead of phobos.

defaultlib=
Driver Joined
Default library to use instead of phobos.

dstartfiles
Driver
Do link the standard D startup files in the compilation.

-verbose
D Alias(v)

fall-instantiations
D
Generate code for all template instantiations.

fassert
D Var(flag_assert)
Generate code for assert contracts.

fbounds-check
D
; Documented in common.opt

fbounds-check=
D Joined RejectNegative Enum(bounds_check) Var(flag_bounds_check)
-fbounds-check=[on|safeonly|off]	Turn array bounds checks on, in @safe code only, or off.

Enum
Name(bounds_check) Type(int) UnknownError(unknown array bounds setting %qs)

EnumValue
Enum(bounds_check) String(off) Value(0)

EnumValue
Enum(bounds_check) String(safeonly) Value(1)

EnumValue
Enum(bounds_check) String(on) Value(2)

; Generates a secondary ModuleInfo symbol for linking in unittests
fbuilding-libphobos-tests
D Undocumented Var(flag_building_libphobos_tests)

fbuiltin
D Var(flag_no_builtin, 0)
; Documented in C

fcheck=assert
D Alias(fassert)

fcheck=bounds
D Alias(fbounds-check)

fcheck=in
D Alias(fpreconditions)

fcheck=invariant
D Alias(finvariants)

fcheck=out
D Alias(fpostconditions)

fcheck=switch
D Alias(fswitch-errors)

fcheckaction=
D Joined RejectNegative Enum(check_action) Var(flag_check_action)
-fcheckaction=[throw,halt,context]	Behavior on contract failure.

Enum
Name(check_action) Type(int) UnknownError(unknown checkaction setting %qs)

EnumValue
Enum(check_action) String(throw) Value(0)

EnumValue
Enum(check_action) String(halt) Value(1)

EnumValue
Enum(check_action) String(context) Value(2)

fdebug
D
Compile in debug code.

fdebug=
D Joined RejectNegative
-fdebug=<ident>	Compile in debug code identified by <ident>.

fdoc
D
Generate documentation.

fdoc-dir=
D Joined RejectNegative
-fdoc-dir=<dir>	Write documentation file to directory <dir>.

fdoc-file=
D Joined RejectNegative
-fdoc-file=<file>	Write documentation to <file>.

fdoc-inc=
D Joined RejectNegative
-fdoc-inc=<file>	Include a Ddoc macro <file>.

fdruntime
D
Assume that standard D runtime libraries and \"D main\" exist.

fdump-c++-spec-verbose
D RejectNegative
Add comments for ignored declarations in the generated C++ header.

fdump-c++-spec=
D RejectNegative Joined
-fdump-cxx-spec=<filename>	Write all declarations as C++ code to <filename>.

fdump-d-original
D
Display the frontend AST after parsing and semantic passes.

fexceptions
D
; Documented in common.opt

fextern-std=
D Joined RejectNegative Enum(extern_stdcpp) Var(flag_extern_stdcpp)
-fextern-std=<standard>	Set C++ name mangling compatibility with <standard>.

Enum
Name(extern_stdcpp) Type(int) UnknownError(unknown C++ standard %qs)

EnumValue
Enum(extern_stdcpp) String(c++98) Value(199711)

EnumValue
Enum(extern_stdcpp) String(c++03) Value(199711)

EnumValue
Enum(extern_stdcpp) String(c++11) Value(201103)

EnumValue
Enum(extern_stdcpp) String(c++14) Value(201402)

EnumValue
Enum(extern_stdcpp) String(c++17) Value(201703)

EnumValue
Enum(extern_stdcpp) String(c++20) Value(202002)

fignore-unknown-pragmas
D
Ignore unsupported pragmas.

finvariants
D Var(flag_invariants)
Generate code for class invariant contracts.

fmain
D RejectNegative
Generate a default D main() function when compiling.

fmodule-file=
D Joined RejectNegative
-fmodule-file=<package.module>=<filespec>	use <filespec> as source file for <package.module>.

fmoduleinfo
D Var(flag_moduleinfo)
Generate ModuleInfo struct for output module.

fonly=
D Joined RejectNegative
Process all modules specified on the command line, but only generate code for the module specified by the argument.

fpostconditions
D Var(flag_postconditions)
Generate code for postcondition contracts.

fpreconditions
D Var(flag_preconditions)
Generate code for precondition contracts.

fpreview=all
D RejectNegative
Turn on all upcoming D language features.

fpreview=bitfields
D RejectNegative
Implement D bit-fields.

fpreview=dip1000
D RejectNegative
Implement DIP1000: Scoped pointers.

fpreview=dip1008
D RejectNegative
Implement DIP1008: Allow exceptions in @nogc code.

fpreview=dip1021
D RejectNegative
Implement DIP1021: Mutable function arguments.

fpreview=dtorfields
D RejectNegative
Destruct fields of partially constructed objects.

fpreview=fieldwise
D RejectNegative
Use field-wise comparisons for struct equality.

fpreview=fixaliasthis
D RejectNegative
When a symbol is resolved, check `alias this' scope before going to upper scopes.

fpreview=fiximmutableconv
D RejectNegative
Disallow unsound immutable conversions that were formerly incorrectly permitted.

fpreview=in
D RejectNegative
Implement 'in' parameters to mean scope const.

fpreview=inclusiveincontracts
D RejectNegative
Implement 'in' contracts of overridden methods to be a superset of parent contract.

fpreview=nosharedaccess
D RejectNegative
Disable access to shared memory objects.

fpreview=rvaluerefparam
D RejectNegative
Enable rvalue arguments to ref parameters.

fpreview=systemvariables
D RejectNegative
Disable access to variables marked `@system' from @safe code.

frelease
D
Compile release version.

frevert=all
D RejectNegative
Turn off all revertable D language features.

frevert=dip1000
D RejectNegative
Revert DIP1000: Scoped pointers.

frevert=dtorfields
D RejectNegative
Don't destruct fields of partially constructed objects.

frevert=intpromote
D RejectNegative
Don't use C-style integral promotion for unary '+', '-' and '~'.

frtti
D
; Documented in C

fsave-mixins=
D Joined RejectNegative
-fsave-mixins=<filename>	Expand and save mixins to file specified by <filename>.

fswitch-errors
D Var(flag_switch_errors)
Generate code for switches without a default case.

ftransition=all
D RejectNegative
List information on all D language transitions.

ftransition=field
D RejectNegative
List all non-mutable fields which occupy an object instance.

ftransition=in
D RejectNegative
List all usages of 'in' on parameter.

ftransition=nogc
D RejectNegative
List all hidden GC allocations.

ftransition=templates
D RejectNegative
List statistics on template instantiations.

ftransition=tls
D RejectNegative
List all variables going into thread local storage.

funittest
D
Compile in unittest code.

fversion=
D Joined RejectNegative
-fversion=<ident>	Compile in version code identified by <ident>.

fweak-templates
D Var(flag_weak_templates) Init(1)
Emit template instantiations as weak symbols.

imultilib
D Joined Separate
; Documented in C

iprefix
D Joined Separate
; Documented in C

isysroot
D Joined Separate
; Documented in C

isystem
D Joined Separate
; Documented in C

nophoboslib
Driver
Do not link the standard D library in the compilation.

nostdinc
D
; Documented in C

static-libphobos
Driver
Link the standard D library statically in the compilation.

shared-libphobos
Driver
Link the standard D library dynamically in the compilation.

v
D
; Documented in C