diff options
Diffstat (limited to 'gcc/d')
-rw-r--r-- | gcc/d/doc/conf.py | 30 | ||||
-rw-r--r-- | gcc/d/doc/copyright.rst | 13 | ||||
-rw-r--r-- | gcc/d/doc/general-public-license-3.rst | 6 | ||||
-rw-r--r-- | gcc/d/doc/gnu-free-documentation-license.rst | 6 | ||||
-rw-r--r-- | gcc/d/doc/index.rst | 22 | ||||
-rw-r--r-- | gcc/d/doc/indices-and-tables.rst | 1 | ||||
-rw-r--r-- | gcc/d/doc/invoking-gdc.rst | 48 | ||||
-rw-r--r-- | gcc/d/doc/invoking-gdc/code-generation.rst | 170 | ||||
-rw-r--r-- | gcc/d/doc/invoking-gdc/developer-options.rst | 31 | ||||
-rw-r--r-- | gcc/d/doc/invoking-gdc/input-and-output-files.rst | 45 | ||||
-rw-r--r-- | gcc/d/doc/invoking-gdc/options-for-directory-search.rst | 92 | ||||
-rw-r--r-- | gcc/d/doc/invoking-gdc/options-for-linking.rst | 59 | ||||
-rw-r--r-- | gcc/d/doc/invoking-gdc/runtime-options.rst | 314 | ||||
-rw-r--r-- | gcc/d/doc/invoking-gdc/warnings.rst | 148 |
14 files changed, 0 insertions, 985 deletions
diff --git a/gcc/d/doc/conf.py b/gcc/d/doc/conf.py deleted file mode 100644 index c33f28a..0000000 --- a/gcc/d/doc/conf.py +++ /dev/null @@ -1,30 +0,0 @@ -# Configuration file for the Sphinx documentation builder. - -import sys -sys.path.append('../../..//doc') - -from baseconf import * - -name = 'gdc' -project = 'The GNU D Compiler' -copyright = '2006-2022 Free Software Foundation, Inc.' -authors = 'David Friedman, Iain Buclaw' - -# Grouping the document tree into Texinfo files. List of tuples -# (source start file, target name, title, author, -# dir menu entry, description, category) -latex_documents = [ - ('index', f'{name}.tex', project, authors, 'manual'), -] - -# One entry per manual page. List of tuples -# (source start file, name, description, authors, manual section). -man_pages = [ - ('invoking-gdc', name, project, [authors], 1), -] - -texinfo_documents = [ - ('index', name, project, authors, None, None, None, True) -] - -set_common(name, globals())
\ No newline at end of file diff --git a/gcc/d/doc/copyright.rst b/gcc/d/doc/copyright.rst deleted file mode 100644 index 5afce61..0000000 --- a/gcc/d/doc/copyright.rst +++ /dev/null @@ -1,13 +0,0 @@ -.. - Copyright 1988-2022 Free Software Foundation, Inc. - This is part of the GCC manual. - For copying conditions, see the GPL license file - -Copyright -^^^^^^^^^ - -Permission is granted to copy, distribute and/or modify this document -under the terms of the GNU Free Documentation License, Version 1.3 or -any later version published by the Free Software Foundation; with no -Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. -A copy of the license is in the :ref:`gnu_fdl`.
\ No newline at end of file diff --git a/gcc/d/doc/general-public-license-3.rst b/gcc/d/doc/general-public-license-3.rst deleted file mode 100644 index becda77..0000000 --- a/gcc/d/doc/general-public-license-3.rst +++ /dev/null @@ -1,6 +0,0 @@ -.. - Copyright 1988-2022 Free Software Foundation, Inc. - This is part of the GCC manual. - For copying conditions, see the copyright.rst file. - -.. include:: ../../../doc/gpl-3.0.rst
\ No newline at end of file diff --git a/gcc/d/doc/gnu-free-documentation-license.rst b/gcc/d/doc/gnu-free-documentation-license.rst deleted file mode 100644 index 1de809b..0000000 --- a/gcc/d/doc/gnu-free-documentation-license.rst +++ /dev/null @@ -1,6 +0,0 @@ -.. - Copyright 1988-2022 Free Software Foundation, Inc. - This is part of the GCC manual. - For copying conditions, see the copyright.rst file. - -.. include:: ../../../doc/gnu_free_documentation_license.rst
\ No newline at end of file diff --git a/gcc/d/doc/index.rst b/gcc/d/doc/index.rst deleted file mode 100644 index 700a4a8..0000000 --- a/gcc/d/doc/index.rst +++ /dev/null @@ -1,22 +0,0 @@ -.. - Copyright 1988-2022 Free Software Foundation, Inc. - This is part of the GCC manual. - For copying conditions, see the copyright.rst file. - -The GNU D Compiler -================== - -This manual describes how to use :command:`gdc`, the GNU compiler for -the D programming language. This manual is specifically about -:command:`gdc`. For more information about the D programming -language in general, including language specifications and standard -package documentation, see https://dlang.org/. - -.. toctree:: - - copyright - invoking-gdc - general-public-license-3 - gnu-free-documentation-license - - indices-and-tables
\ No newline at end of file diff --git a/gcc/d/doc/indices-and-tables.rst b/gcc/d/doc/indices-and-tables.rst deleted file mode 100644 index 6c215a3..0000000 --- a/gcc/d/doc/indices-and-tables.rst +++ /dev/null @@ -1 +0,0 @@ -.. include:: ../../../doc/indices-and-tables.rst
\ No newline at end of file diff --git a/gcc/d/doc/invoking-gdc.rst b/gcc/d/doc/invoking-gdc.rst deleted file mode 100644 index be477b8..0000000 --- a/gcc/d/doc/invoking-gdc.rst +++ /dev/null @@ -1,48 +0,0 @@ -.. - Copyright 1988-2022 Free Software Foundation, Inc. - This is part of the GCC manual. - For copying conditions, see the copyright.rst file. - -.. _invoking-gdc: - -Invoking gdc ------------- - -.. only:: man - - Synopsis - ^^^^^^^^ - - gdc [ :option:`-c` | :option:`-S` ] [ :option:`-g` ] [ :option:`-pg` ] - [ :option:`-O`:samp:`{level}` ] [ :option:`-W`:samp:`{warn}`...] - [ :option:`-I`:samp:`{dir}`...] [ :option:`-L`:samp:`{dir}`...] - [ :option:`-f`:samp:`{option}`...] [ :option:`-m`:samp:`{machine-option}`...] - [ :option:`-o` :samp:`{outfile}` ] [@ :samp:`{file}` ] :samp:`{infile}`... - - Only the most useful options are listed here; see below for the - remainder. - -Description -^^^^^^^^^^^ - -The :command:`gdc` command is the GNU compiler for the D language and -supports many of the same options as :command:`gcc`. See :ref:`gcc:option-summary`. -This manual only documents the options specific to :command:`gdc`. - -Options -^^^^^^^ - -.. toctree:: - :maxdepth: 2 - - invoking-gdc/input-and-output-files - invoking-gdc/runtime-options - invoking-gdc/options-for-directory-search - invoking-gdc/code-generation - invoking-gdc/warnings - invoking-gdc/options-for-linking - invoking-gdc/developer-options - -.. only:: man - - .. include:: copyright.rst
\ No newline at end of file diff --git a/gcc/d/doc/invoking-gdc/code-generation.rst b/gcc/d/doc/invoking-gdc/code-generation.rst deleted file mode 100644 index 178b6f9..0000000 --- a/gcc/d/doc/invoking-gdc/code-generation.rst +++ /dev/null @@ -1,170 +0,0 @@ -.. - Copyright 1988-2022 Free Software Foundation, Inc. - This is part of the GCC manual. - For copying conditions, see the copyright.rst file. - -.. index:: options, code generation - -.. _code-generation: - -Code Generation -*************** - -In addition to the many :command:`gcc` options controlling code generation, -:command:`gdc` has several options specific to itself. - -.. option:: -H - - .. index:: -H - - Generates D interface files for all modules being compiled. The compiler - determines the output file based on the name of the input file, removes - any directory components and suffix, and applies the :samp:`.di` suffix. - -.. option:: -Hd dir - - .. index:: -Hd - - Same as :option:`-H`, but writes interface files to directory :samp:`{dir}`. - This option can be used with :option:`-Hf file` to independently set the - output file and directory path. - -.. option:: -Hf file - - .. index:: -Hf - - Same as :option:`-H` but writes interface files to :samp:`{file}`. This option can - be used with :option:`-Hd dir` to independently set the output file and - directory path. - -.. option:: -M - - .. index:: -M - - Output the module dependencies of all source files being compiled in a - format suitable for :command:`make`. The compiler outputs one - :command:`make` rule containing the object file name for that source file, - a colon, and the names of all imported files. - -.. option:: -MM - - .. index:: -MM - - Like :option:`-M` but does not mention imported modules from the D standard - library package directories. - -.. option:: -MF file - - .. index:: -MF - - When used with :option:`-M` or :option:`-MM`, specifies a :samp:`{file}` to write - the dependencies to. When used with the driver options :option:`-MD` or - :option:`-MMD`, :option:`-MF` overrides the default dependency output file. - -.. option:: -MG - - .. index:: -MG - - This option is for compatibility with :command:`gcc`, and is ignored by the - compiler. - -.. option:: -MP - - .. index:: -MP - - Outputs a phony target for each dependency other than the modules being - compiled, causing each to depend on nothing. - -.. option:: -MT target - - .. index:: -MT - - Change the :samp:`{target}` of the rule emitted by dependency generation - to be exactly the string you specify. If you want multiple targets, - you can specify them as a single argument to :option:`-MT`, or use - multiple :option:`-MT` options. - -.. option:: -MQ target - - .. index:: -MQ - - Same as :option:`-MT`, but it quotes any characters which are special to - :command:`make`. - -.. option:: -MD - - .. index:: -MD - - This option is equivalent to :option:`-M -MF file`. The driver - determines :samp:`{file}` by removing any directory components and suffix - from the input file, and then adding a :samp:`.deps` suffix. - -.. option:: -MMD - - .. index:: -MMD - - Like :option:`-MD` but does not mention imported modules from the D standard - library package directories. - -.. option:: -X - - .. index:: -X - - Output information describing the contents of all source files being - compiled in JSON format to a file. The driver determines :samp:`{file}` by - removing any directory components and suffix from the input file, and then - adding a :samp:`.json` suffix. - -.. option:: -Xf file - - .. index:: -Xf - - Same as :option:`-X`, but writes all JSON contents to the specified - :samp:`{file}`. - -.. option:: -fdoc - - .. index:: -fdoc - - Generates ``Ddoc`` documentation and writes it to a file. The compiler - determines :samp:`{file}` by removing any directory components and suffix - from the input file, and then adding a :samp:`.html` suffix. - -.. option:: -fdoc-dir=dir - - .. index:: -fdoc-dir - - Same as :option:`-fdoc`, but writes documentation to directory :samp:`{dir}`. - This option can be used with :option:`-fdoc-file=file` to - independently set the output file and directory path. - -.. option:: -fdoc-file=file - - .. index:: -fdoc-file - - Same as :option:`-fdoc`, but writes documentation to :samp:`{file}`. This - option can be used with :option:`-fdoc-dir=dir` to independently - set the output file and directory path. - -.. option:: -fdoc-inc=file - - .. index:: -fdoc-inc - - Specify :samp:`{file}` as a :samp:`{Ddoc}` macro file to be read. Multiple - :option:`-fdoc-inc` options can be used, and files are read and processed - in the same order. - -.. option:: -fdump-c++-spec={file} - - For D source files, generate corresponding C++ declarations in :samp:`{file}`. - -.. option:: -fdump-c++-spec-verbose - - In conjunction with :option:`-fdump-c++-spec=` above, add comments for ignored - declarations in the generated C++ header. - -.. option:: -fsave-mixins={file} - - Generates code expanded from D ``mixin`` statements and writes the - processed sources to :samp:`{file}`. This is useful to debug errors in compilation - and provides source for debuggers to show when requested.
\ No newline at end of file diff --git a/gcc/d/doc/invoking-gdc/developer-options.rst b/gcc/d/doc/invoking-gdc/developer-options.rst deleted file mode 100644 index 564ed36..0000000 --- a/gcc/d/doc/invoking-gdc/developer-options.rst +++ /dev/null @@ -1,31 +0,0 @@ -.. - Copyright 1988-2022 Free Software Foundation, Inc. - This is part of the GCC manual. - For copying conditions, see the copyright.rst file. - -.. index:: developer options, debug dump options, dump options - -.. _developer-options: - -Developer Options -***************** - -This section describes command-line options that are primarily of -interest to developers or language tooling. - -.. option:: -fdump-d-original - - .. index:: -fdump-d-original - - Output the internal front-end AST after the ``semantic3`` stage. - This option is only useful for debugging the GNU D compiler itself. - -.. option:: -v - - .. index:: -v - - Dump information about the compiler language processing stages as the source - program is being compiled. This includes listing all modules that are - processed through the ``parse``, ``semantic``, ``semantic2``, and - ``semantic3`` stages; all ``import`` modules and their file paths; - and all ``function`` bodies that are being compiled.
\ No newline at end of file diff --git a/gcc/d/doc/invoking-gdc/input-and-output-files.rst b/gcc/d/doc/invoking-gdc/input-and-output-files.rst deleted file mode 100644 index a4bce6b..0000000 --- a/gcc/d/doc/invoking-gdc/input-and-output-files.rst +++ /dev/null @@ -1,45 +0,0 @@ -.. - Copyright 1988-2022 Free Software Foundation, Inc. - This is part of the GCC manual. - For copying conditions, see the copyright.rst file. - -.. index:: suffixes for D source, D source file suffixes - -.. _input-and-output-files: - -Input and Output files -********************** - -For any given input file, the file name suffix determines what kind of -compilation is done. The following kinds of input file names are supported: - -:samp:`{file}.d` - D source files. - -:samp:`{file}.dd` - Ddoc source files. - -:samp:`{file}.di` - D interface files. - -You can specify more than one input file on the :command:`gdc` command line, -each being compiled separately in the compilation process. If you specify a -``-o file`` option, all the input files are compiled together, -producing a single output file, named :samp:`{file}`. This is allowed even -when using ``-S`` or ``-c``. - -.. index:: D interface files. - -A D interface file contains only what an import of the module needs, -rather than the whole implementation of that module. They can be created -by :command:`gdc` from a D source file by using the ``-H`` option. -When the compiler resolves an import declaration, it searches for matching -:samp:`.di` files first, then for :samp:`.d`. - -.. index:: Ddoc source files. - -A Ddoc source file contains code in the D macro processor language. It is -primarily designed for use in producing user documentation from embedded -comments, with a slight affinity towards HTML generation. If a :samp:`.d` -source file starts with the string ``Ddoc`` then it is treated as general -purpose documentation, not as a D source file.
\ No newline at end of file diff --git a/gcc/d/doc/invoking-gdc/options-for-directory-search.rst b/gcc/d/doc/invoking-gdc/options-for-directory-search.rst deleted file mode 100644 index 934b22d..0000000 --- a/gcc/d/doc/invoking-gdc/options-for-directory-search.rst +++ /dev/null @@ -1,92 +0,0 @@ -.. - Copyright 1988-2022 Free Software Foundation, Inc. - This is part of the GCC manual. - For copying conditions, see the copyright.rst file. - -.. index:: directory options, options, directory search, search path - -.. _directory-options: - -Options for Directory Search -**************************** - -These options specify directories to search for files, libraries, and -other parts of the compiler: - -.. option:: -Idir - - .. index:: -I - - Specify a directory to use when searching for imported modules at - compile time. Multiple :option:`-I` options can be used, and the - paths are searched in the same order. - -.. option:: -Jdir - - .. index:: -J - - Specify a directory to use when searching for files in string imports - at compile time. This switch is required in order to use - ``import(file)`` expressions. Multiple :option:`-J` options can be - used, and the paths are searched in the same order. - -.. option:: -Ldir - - .. index:: -L - - When linking, specify a library search directory, as with :command:`gcc`. - -.. option:: -Bdir - - .. index:: -B - - This option specifies where to find the executables, libraries, - source files, and data files of the compiler itself, as with :command:`gcc`. - -.. option:: -fmodule-file=module=spec - - .. index:: -fmodule-file - - This option manipulates file paths of imported modules, such that if an - imported module matches all or the leftmost part of :samp:`{module}`, the file - path in :samp:`{spec}` is used as the location to search for D sources. - This is used when the source file path and names are not the same as the - package and module hierarchy. Consider the following examples: - - .. code-block:: c++ - - gdc test.d -fmodule-file=A.B=foo.d -fmodule-file=C=bar - - This will tell the compiler to search in all import paths for the source - file :samp:`{foo.d}` when importing :samp:`{A.B}`, and the directory :samp:`{bar/}` - when importing :samp:`{C}`, as annotated in the following D code: - - .. code-block:: c++ - - module test; - import A.B; // Matches A.B, searches for foo.d - import C.D.E; // Matches C, searches for bar/D/E.d - import A.B.C; // No match, searches for A/B/C.d - -.. option:: -imultilib dir - - .. index:: -imultilib - - Use :samp:`{dir}` as a subdirectory of the gcc directory containing - target-specific D sources and interfaces. - -.. option:: -iprefix prefix - - .. index:: -iprefix - - Specify :samp:`{prefix}` as the prefix for the gcc directory containing - target-specific D sources and interfaces. If the :samp:`{prefix}` represents - a directory, you should include the final ``'/'``. - -.. option:: -nostdinc - - .. index:: -nostdinc - - Do not search the standard system directories for D source and interface - files. Only the directories that have been specified with :option:`-I` options - (and the directory of the current file, if appropriate) are searched.
\ No newline at end of file diff --git a/gcc/d/doc/invoking-gdc/options-for-linking.rst b/gcc/d/doc/invoking-gdc/options-for-linking.rst deleted file mode 100644 index dc64fcd..0000000 --- a/gcc/d/doc/invoking-gdc/options-for-linking.rst +++ /dev/null @@ -1,59 +0,0 @@ -.. - Copyright 1988-2022 Free Software Foundation, Inc. - This is part of the GCC manual. - For copying conditions, see the copyright.rst file. - -.. index:: options, linking, linking, static - -.. _linking: - -Options for Linking -******************* - -These options come into play when the compiler links object files into an -executable output file. They are meaningless if the compiler is not doing -a link step. - -.. option:: -defaultlib=libname - - .. index:: -defaultlib= - - Specify the library to use instead of libphobos when linking. Options - specifying the linkage of libphobos, such as :option:`-static-libphobos` - or :option:`-shared-libphobos`, are ignored. - -.. option:: -debuglib=libname - - .. index:: -debuglib= - - Specify the debug library to use instead of libphobos when linking. - This option has no effect unless the :option:`-g` option was also given - on the command line. Options specifying the linkage of libphobos, such - as :option:`-static-libphobos` or :option:`-shared-libphobos`, are ignored. - -.. option:: -nophoboslib - - .. index:: -nophoboslib - - Do not use the Phobos or D runtime library when linking. Options specifying - the linkage of libphobos, such as :option:`-static-libphobos` or - :option:`-shared-libphobos`, are ignored. The standard system libraries are - used normally, unless :option:`-nostdlib` or :option:`-nodefaultlibs` is used. - -.. option:: -shared-libphobos - - .. index:: -shared-libphobos - - On systems that provide :samp:`libgphobos` and :samp:`libgdruntime` as a - shared and a static library, this option forces the use of the shared - version. If no shared version was built when the compiler was configured, - this option has no effect. - -.. option:: -static-libphobos - - .. index:: -static-libphobos - - On systems that provide :samp:`libgphobos` and :samp:`libgdruntime` as a - shared and a static library, this option forces the use of the static - version. If no static version was built when the compiler was configured, - this option has no effect.
\ No newline at end of file diff --git a/gcc/d/doc/invoking-gdc/runtime-options.rst b/gcc/d/doc/invoking-gdc/runtime-options.rst deleted file mode 100644 index fda87c2..0000000 --- a/gcc/d/doc/invoking-gdc/runtime-options.rst +++ /dev/null @@ -1,314 +0,0 @@ -.. - Copyright 1988-2022 Free Software Foundation, Inc. - This is part of the GCC manual. - For copying conditions, see the copyright.rst file. - -.. index:: options, runtime - -.. _runtime-options: - -Runtime Options -*************** - -These options affect the runtime behavior of programs compiled with -:command:`gdc`. - -.. option:: -fall-instantiations - - .. index:: -fall-instantiations, -fno-all-instantiations - - Generate code for all template instantiations. The default template emission - strategy is to not generate code for declarations that were either - instantiated speculatively, such as from ``__traits(compiles, ...)``, or - that come from an imported module not being compiled. - -.. option:: -fno-assert - - .. index:: -fassert, -fno-assert - - Turn off code generation for ``assert`` contracts. - -.. option:: -fno-bounds-check - - .. index:: -fbounds-check, -fno-bounds-check - - Turns off array bounds checking for all functions, which can improve - performance for code that uses arrays extensively. Note that this - can result in unpredictable behavior if the code in question actually - does violate array bounds constraints. It is safe to use this option - if you are sure that your code never throws a ``RangeError``. - -.. option:: -fbounds-check=value - - .. index:: -fbounds-check= - - An alternative to :option:`-fbounds-check` that allows more control - as to where bounds checking is turned on or off. The following values - are supported: - - :samp:`on` - Turns on array bounds checking for all functions. - - :samp:`safeonly` - Turns on array bounds checking only for ``@safe`` functions. - - :samp:`off` - Turns off array bounds checking completely. - -.. option:: -fno-builtin - - .. index:: -fbuiltin, -fno-builtin - - Don't recognize built-in functions unless they begin with the prefix - :samp:`__builtin_`. By default, the compiler will recognize when a - function in the ``core.stdc`` package is a built-in function. - -.. option:: -fcheckaction - - This option controls what code is generated on an assertion, bounds check, or - final switch failure. The following values are supported: - - :samp:`context` - Throw an ``AssertError`` with extra context information. - - :samp:`halt` - Halt the program execution. - - :samp:`throw` - Throw an ``AssertError`` (the default). - -.. option:: -fdebug=value - - .. index:: -fno-debug - - Turn on compilation of conditional ``debug`` code into the program. - The :option:`-fdebug` option itself sets the debug level to ``1``, - while :option:`-fdebug=` enables ``debug`` code that are identified - by any of the following values: - - :samp:`level` - Sets the debug level to :samp:`{level}`, any ``debug`` code <= :samp:`{level}` - is compiled into the program. - - :samp:`ident` - Turns on compilation of any ``debug`` code identified by :samp:`{ident}`. - -.. option:: -fno-druntime - - .. index:: -fdruntime, -fno-druntime - - Implements https://dlang.org/spec/betterc.html. Assumes that - compilation targets an environment without a D runtime library. - - This is equivalent to compiling with the following options: - - .. code-block:: c++ - - gdc -nophoboslib -fno-exceptions -fno-moduleinfo -fno-rtti - -.. option:: -fextern-std=standard - - Sets the C++ name mangling compatibility to the version identified by - :samp:`{standard}`. The following values are supported: - - :samp:`c++98`, :samp:`c++03` - Sets ``__traits(getTargetInfo, "cppStd")`` to ``199711``. - - :samp:`c++11` - Sets ``__traits(getTargetInfo, "cppStd")`` to ``201103``. - - :samp:`c++14` - Sets ``__traits(getTargetInfo, "cppStd")`` to ``201402``. - - :samp:`c++17` - Sets ``__traits(getTargetInfo, "cppStd")`` to ``201703``. - This is the default. - - :samp:`c++20` - Sets ``__traits(getTargetInfo, "cppStd")`` to ``202002``. - -.. option:: -fno-invariants - - .. index:: -finvariants, -fno-invariants - - Turns off code generation for class ``invariant`` contracts. - -.. option:: -fmain - - Generates a default ``main()`` function when compiling. This is useful when - unittesting a library, as it enables running the unittests in a library without - having to manually define an entry-point function. This option does nothing - when ``main`` is already defined in user code. - -.. option:: -fno-moduleinfo - - Turns off generation of the ``ModuleInfo`` and related functions - that would become unreferenced without it, which may allow linking - to programs not written in D. Functions that are not be generated - include module constructors and destructors (``static this`` and - ``static ~this``), ``unittest`` code, and ``DSO`` registry - functions for dynamically linked code. - -.. option:: -fonly=filename - - .. index:: -fonly - - Tells the compiler to parse and run semantic analysis on all modules - on the command line, but only generate code for the module specified - by :samp:`{filename}`. - -.. option:: -fno-postconditions - - .. index:: -fpostconditions, -fno-postconditions - - Turns off code generation for postcondition ``out`` contracts. - -.. option:: -fno-preconditions - - .. index:: -fpreconditions, -fno-preconditions - - Turns off code generation for precondition ``in`` contracts. - -.. option:: -fpreview=id - - .. index:: -fpreview - - Turns on an upcoming D language change identified by :samp:`{id}`. The following - values are supported: - - :samp:`all` - Turns on all upcoming D language features. - - :samp:`dip1000` - Implements https://github.com/dlang/DIPs/blob/master/DIPs/other/DIP1000.md - (Scoped pointers). - - :samp:`dip1008` - Implements https://github.com/dlang/DIPs/blob/master/DIPs/other/DIP1008.md - (Allow exceptions in ``@nogc`` code). - - :samp:`dip1021` - Implements https://github.com/dlang/DIPs/blob/master/DIPs/accepted/DIP1021.md - (Mutable function arguments). - - :samp:`dip25` - Implements https://github.com/dlang/DIPs/blob/master/DIPs/archive/DIP25.md - (Sealed references). - - :samp:`dtorfields` - Turns on generation for destructing fields of partially constructed objects. - - :samp:`fieldwise` - Turns on generation of struct equality to use field-wise comparisons. - - :samp:`fixaliasthis` - Implements new lookup rules that check the current scope for ``alias this`` - before searching in upper scopes. - - :samp:`fiximmutableconv` - Disallows unsound immutable conversions that were formerly incorrectly - permitted. - - :samp:`in` - Implements ``in`` parameters to mean ``scope const [ref]`` and accepts - rvalues. - - :samp:`inclusiveincontracts` - Implements ``in`` contracts of overridden methods to be a superset of parent - contract. - - :samp:`intpromote` - Implements C-style integral promotion for unary ``+``, ``-`` and ``~`` - expressions. - - :samp:`nosharedaccess` - Turns off and disallows all access to shared memory objects. - - :samp:`rvaluerefparam` - Implements rvalue arguments to ``ref`` parameters. - - :samp:`systemvariables` - Disables access to variables marked ``@system`` from ``@safe`` code. - -.. option:: -frelease - - .. index:: -fno-release - - Turns on compiling in release mode, which means not emitting runtime - checks for contracts and asserts. Array bounds checking is not done - for ``@system`` and ``@trusted`` functions, and assertion - failures are undefined behavior. - - This is equivalent to compiling with the following options: - - .. code-block:: c++ - - gdc -fno-assert -fbounds-check=safe -fno-invariants \ - -fno-postconditions -fno-preconditions -fno-switch-errors - -.. option:: -frevert= - - .. index:: -frevert - - Turns off a D language feature identified by :samp:`{id}`. The following values - are supported: - - :samp:`all` - Turns off all revertable D language features. - - :samp:`dip25` - Reverts https://github.com/dlang/DIPs/blob/master/DIPs/archive/DIP25.md - (Sealed references). - - :samp:`dtorfields` - Turns off generation for destructing fields of partially constructed objects. - - :samp:`markdown` - Turns off Markdown replacements in Ddoc comments. - -.. option:: -fno-rtti - - .. index:: -frtti, -fno-rtti - - Turns off generation of run-time type information for all user defined types. - Any code that uses features of the language that require access to this - information will result in an error. - -.. option:: -fno-switch-errors - - .. index:: -fswitch-errors, -fno-switch-errors - - This option controls what code is generated when no case is matched - in a ``final switch`` statement. The default run time behavior - is to throw a ``SwitchError``. Turning off :option:`-fswitch-errors` - means that instead the execution of the program is immediately halted. - -.. option:: -funittest - - .. index:: -funittest, -fno-unittest - - Turns on compilation of ``unittest`` code, and turns on the - ``version(unittest)`` identifier. This implies :option:`-fassert`. - -.. option:: -fversion=value - - .. index:: -fversion - - Turns on compilation of conditional ``version`` code into the program - identified by any of the following values: - - :samp:`level` - Sets the version level to :samp:`{level}`, any ``version`` code >= :samp:`{level}` - is compiled into the program. - - :samp:`ident` - Turns on compilation of ``version`` code identified by :samp:`{ident}`. - -.. option:: -fno-weak-templates - - .. index:: -fweak-templates, -fno-weak-templates - - Turns off emission of declarations that can be defined in multiple objects as - weak symbols. The default is to emit all public symbols as weak, unless the - target lacks support for weak symbols. Disabling this option means that common - symbols are instead put in COMDAT or become private.
\ No newline at end of file diff --git a/gcc/d/doc/invoking-gdc/warnings.rst b/gcc/d/doc/invoking-gdc/warnings.rst deleted file mode 100644 index c9ed52e..0000000 --- a/gcc/d/doc/invoking-gdc/warnings.rst +++ /dev/null @@ -1,148 +0,0 @@ -.. - Copyright 1988-2022 Free Software Foundation, Inc. - This is part of the GCC manual. - For copying conditions, see the copyright.rst file. - -.. index:: options to control warnings, warning messages, messages, warning, suppressing warnings - -.. _warnings: - -Warnings -******** - -Warnings are diagnostic messages that report constructions that -are not inherently erroneous but that are risky or suggest there -is likely to be a bug in the program. Unless :option:`-Werror` is -specified, they do not prevent compilation of the program. - -.. option:: -Wall - - .. index:: -Wall, -Wno-all - - Turns on all warnings messages. Warnings are not a defined part of - the D language, and all constructs for which this may generate a - warning message are valid code. - -.. option:: -Walloca - - .. index:: -Walloca - - This option warns on all uses of "alloca" in the source. - -.. option:: -Walloca-larger-than=n - - .. index:: -Walloca-larger-than, -Wno-alloca-larger-than - - Warn on unbounded uses of alloca, and on bounded uses of alloca - whose bound can be larger than :samp:`{n}` bytes. - :option:`-Wno-alloca-larger-than` disables - :option:`-Walloca-larger-than` warning and is equivalent to - :option:`-Walloca-larger-than=SIZE_MAX` or larger. - -.. option:: -Wcast-result - - .. index:: -Wcast-result, -Wno-cast-result - - Warn about casts that will produce a null or zero result. Currently - this is only done for casting between an imaginary and non-imaginary - data type, or casting between a D and C++ class. - -.. option:: -Wno-deprecated - - .. index:: -Wdeprecated, -Wno-deprecated - - Do not warn about usage of deprecated features and symbols with - ``deprecated`` attributes. - -.. option:: -Werror - - .. index:: -Werror, -Wno-error - - Turns all warnings into errors. - -.. option:: -Wspeculative - - .. index:: -Wspeculative, -Wno-speculative - - List all error messages from speculative compiles, such as - ``__traits(compiles, ...)``. This option does not report - messages as warnings, and these messages therefore never become - errors when the :option:`-Werror` option is also used. - -.. option:: -Wtemplates - - .. index:: -Wtemplates, -Wno-templates - - Warn when a template instantiation is encountered. Some coding - rules disallow templates, and this may be used to enforce that rule. - -.. option:: -Wunknown-pragmas - - .. index:: -Wunknown-pragmas, -Wno-unknown-pragmas - - Warn when a ``pragma()`` is encountered that is not understood by - :command:`gdc`. This differs from :option:`-fignore-unknown-pragmas` - where a pragma that is part of the D language, but not implemented by - the compiler, won't get reported. - -.. option:: -Wno-varargs - - .. index:: Wvarargs, Wno-varargs - - Do not warn upon questionable usage of the macros used to handle variable - arguments like ``va_start``. - -.. option:: -fignore-unknown-pragmas - - .. index:: -fignore-unknown-pragmas, -fno-ignore-unknown-pragmas - - Turns off errors for unsupported pragmas. - -.. option:: -fmax-errors=n - - .. index:: -fmax-errors - - Limits the maximum number of error messages to :samp:`{n}`, at which point - :command:`gdc` bails out rather than attempting to continue processing the - source code. If :samp:`{n}` is 0 (the default), there is no limit on the - number of error messages produced. - -.. option:: -fsyntax-only - - .. index:: -fsyntax-only, -fno-syntax-only - - Check the code for syntax errors, but do not actually compile it. This - can be used in conjunction with :option:`-fdoc` or :option:`-H` to generate - files for each module present on the command-line, but no other output - file. - -.. option:: -ftransition=id - - .. index:: -ftransition - - Report additional information about D language changes identified by - :samp:`{id}`. The following values are supported: - - :samp:`all` - List information on all D language transitions. - - :samp:`complex` - List all usages of complex or imaginary types. - - :samp:`field` - List all non-mutable fields which occupy an object instance. - - :samp:`in` - List all usages of ``in`` on parameter. - - :samp:`nogc` - List all hidden GC allocations. - - :samp:`templates` - List statistics on template instantiations. - - :samp:`tls` - List all variables going into thread local storage. - - :samp:`vmarkdown` - List instances of Markdown replacements in Ddoc.
\ No newline at end of file |