Movatterモバイル変換


[0]ホーム

URL:


D Logo
Menu
Search

Library Reference

version 2.112.0

overview

Report a bug
If you spot a problem with this page, click here to create a Bugzilla issue.
Improve this page
Quickly fork, edit online, and submit a pull request for this page.Requires a signed-in GitHub account. This works well for small changes.If you'd like to make larger changes you may want to consider usinga local clone.

dmd.globals

Stores command line options and contains other miscellaneous declarations.
Authors:
Walter Bright
License:
Boost License 1.0

Sourceglobals.d

Documentationhttps://dlang.org/phobos/dmd_globals.html

Coveragehttps://codecov.io/gh/dlang/dmd/src/master/compiler/src/dmd/globals.d

enumDiagnosticReporting: ubyte;
Defines a setting for how compiler warnings and deprecations are handled
error
generate an error
inform
generate a warning
off
disable diagnostic
enumJsonFieldFlags: uint;
Each flag represents a field that can be included in the JSON output.

NOTEset type to uint so its size matches C++ unsigned type

enumCppStdRevision: uint;
Version of C++ standard to support
enumFeatureState: ubyte;
Trivalent boolean to represent the state of arevertable change
default_
Not specified by the user
disabled
Specified as-revert=
enabled
Specified as-preview=
enumCLIIdentifierTable: ubyte;
Different identifier tables specifiable by CLI
default_
Not specified by user
C99
Tables from C99 standard
C11
Tables from C11 standard
UAX31
Tables from the Unicode Standard Annex 31: UNICODE IDENTIFIERS AND SYNTAX
All
The least restrictive set of all other tables
enumErrorPrintMode: ubyte;
Specifies the mode for error printing
structHelp;
Command line state related to printing usage about other switches
structParam;
Put command line switches in here
booltimeTrace;
Whether profiling of compile time is enabled
uinttimeTraceGranularityUs;
In microseconds, minimum event size to report
const(char)*timeTraceFile;
File path of output file
@safe boolparsingUnittestsRequired();
structGlobal;
Collection of global compiler settings and global state used by the frontend
const(char)[]inifilename;
filename of configuration file as given by-conf=, or default value
Array!ImportPathInfopath;
Array of path informations which form the import lookup path
Array!(const(char)*)importPaths;
Array of char*'s which form the import lookup path without metadata
Array!(const(char)*)filePath;
Array of char*'s which form the file import lookup path
char[26]datetime;
string returned by ctime()
Paramparams;
command line parameters
uinterrors;
number of errors reported so far
uintdeprecations;
number of deprecations reported so far
uintwarnings;
number of warnings reported so far
uintgag;
!=0 means gag reporting of errors & warnings
uintgaggedErrors;
number of errors reported while gagged
uintgaggedDeprecations;
number of deprecations reported while gagged
void*console;
opaque pointer to console for controlling text attributes
Array!Identifierversionids;
command line versions and predefined versions
Array!Identifierdebugids;
command line debug versions and predefined versions
boolhasMainFunction;
Whether a main function has already been compiled in (for -main switch)
uintvarSequenceNumber;
Relative lifetime ofVarDeclaration within a function, used forscope checks
FileManagerfileManager;
Cache files read from disk
enum intrecursionLimit;
number of recursive template expansions before abort
ErrorSinkerrorSink;
where the error messages go
ErrorSinkerrorSinkNull;
where the error messages are ignored
nothrow @safe uintstartGagging();
Start ignoring compile errors instead of reporting them.
Used for speculative compilation like__traits(compiles, XXX), but also internally to e.g. try out analias this rewrite without comitting to it.
Works like a stack, so N calls tostartGagging should be paired with N calls toendGagging.
Returns:
the current number of gagged errors, which should later be passed toendGagging
nothrow @safe boolendGagging(uintoldGagged);
Stop gagging, restoring the old gagged state before the most recent call tostartGagging.
Parameters:
uintoldGaggedthe previous number of errors, as returned bystartGagging
Returns:
true if errors occurred while gagged.
nothrow @safe voidincreaseErrorCount();
Increment the error count to record that an error has occurred in the current context.
An error message may or may not have been printed.
nothrow voiddeinitialize();
Deinitializes the global state of the compiler.
This can be used to restore the state set by_init to its original state.
nothrow voidplugErrorSinks();
Indicate to stateful error sinks that no more errors can be produced. This is to support error sinks that collect information to produce a single (say) report.
nothrow @safe uintversionNumber();
Returns:
the version as the number that would be returned for __VERSION__
nothrow @safe stringversionString();
Returns:
compiler version string.
nothrow const(char*)versionChars();
Returns:
compiler version as char string.
Globalglobal;
Collection of global state
Copyright © 1999-2026 by theD Language Foundation | Page generated byDdoc on Sat Feb 21 00:04:46 2026

[8]ページ先頭

©2009-2026 Movatter.jp