Compiler Options In Dev C++

-->

This table contains an alphabetical list of compiler options. For a list of compiler options by category, see the Compiler options listed by category article. /auto-tune-dish-tv.html.

Jan 06, 2006  Dev-cpp - compiler options I just recently switched to Dev-Cpp 4.9.9.2 and I'm wondering how I can force the compiler to conform to ANSI C and such things. As it is now, it lets me get away with quite a lot of strange things. Options, that you specify when you invoke the compiler, override installation defaults and compiler options that are specified through a #pragma options directive. The compiler option defaults that are supplied by IBM can be changed to other selected defaults when z/OS® XL C/C is installed. For further information, see Customizing default. Compiler Options.; 2 minutes to read; In this article. Cl.exe is a tool that controls the Microsoft C (MSVC) C and C compilers and linker. Cl.exe can be run only on operating systems that support Microsoft Visual Studio for Windows.

Dev

Compiler options

OptionPurpose
@Specifies a response file.
/?Lists the compiler options.
/AISpecifies a directory to search to resolve file references passed to the #using directive.
/analyzeEnable code analysis.
/archSpecifies the architecture for code generation.
/awaitEnable coroutines (resumable functions) extensions.
/bigobjIncreases the number of addressable sections in an .obj file.
/CPreserves comments during preprocessing.
/cCompiles without linking.
/cgthreadsSpecifies number of cl.exe threads to use for optimization and code generation.
/clrProduces an output file to run on the common language runtime.
/constexprControl constexpr evaluation at compile time.
/DDefines constants and macros.
/diagnosticsControls the format of diagnostic messages.
/docProcess documentation comments to an XML file.
/ECopies preprocessor output to standard output.
/EHSpecifies the model of exception handling.
/EPCopies preprocessor output to standard output.
/errorReportDeprecated. Error reporting is controlled by Windows Error Reporting (WER) settings.
/execution-charsetSet the execution character set.
/experimental:moduleEnables experimental module support.
/experimental:preprocessorEnables experimental conforming preprocessor support.
/FSets stack size.
/favorProduces code optimized for a specific x64 architecture. Or, for the specific micro-architectures in both the AMD64 and EM64T architectures.
/FACreates a listing file.
/FaSets the listing file name.
/FCDisplay full path of source code files passed to cl.exe in diagnostic text.
/FdRenames program database file.
/FeRenames the executable file.
/FIPreprocesses the specified include file.
/FiSets the preprocessed output file name.
/FmCreates a map file.
/FoCreates an object file.
/fpSpecify floating-point behavior.
/FpSpecifies a precompiled header file name.
/FR
/Fr
Generates browser files. /Fr is deprecated.
/FSForces serialization of all writes to the program database (PDB) file through MSPDBSRV.EXE.
/FUForces the use of a file name as if it had been passed to the #using directive.
/FxMerges injected code with source file.
/GAOptimizes code for Windows application.
/GdUses the __cdecl calling convention (x86 only).
/GeDeprecated. Activates stack probes.
/GFEnables string pooling.
/GHCalls hook function _pexit.
/GhCalls hook function _penter.
/GLEnables whole program optimization.
/GmDeprecated. Enables minimal rebuild.
/GREnables run-time type information (RTTI).
/GrUses the __fastcall calling convention (x86 only).
/GSBuffers security check.
/GsControls stack probes.
/GTSupports fiber safety for data allocated using static thread-local storage.
/guard:cfAdds control flow guard security checks.
/GvUses the __vectorcall calling convention. (x86 and x64 only)
/GwEnables whole-program global data optimization.
/GXDeprecated. Enables synchronous exception handling. Use /EH instead.
/GyEnables function-level linking.
/GZDeprecated. Same as /RTC1.
/GzUses the __stdcall calling convention (x86 only).
/HDeprecated. Restricts the length of external (public) names.
/HELPLists the compiler options.
/homeparamsForces parameters passed in registers to be written to their locations on the stack upon function entry. This compiler option is only for the x64 compilers (native and cross compile).
/hotpatchCreates a hot-patchable image.
/ISearches a directory for include files.
/JChanges the default char type.
/JMCSupports native C++ Just My Code debugging.
/kernelThe compiler and linker will create a binary that can be executed in the Windows kernel.
/LDCreates a dynamic-link library.
/LDdCreates a debug dynamic-link library.
/linkPasses the specified option to LINK.
/LNCreates an MSIL module.
/MDCreates a multithreaded DLL using MSVCRT.lib.
/MDdCreates a debug multithreaded DLL using MSVCRTD.lib.
/MPCompiles multiple source files by using multiple processes.
/MTCreates a multithreaded executable file using LIBCMT.lib.
/MTdCreates a debug multithreaded executable file using LIBCMTD.lib.
/nologoSuppresses display of sign-on banner.
/O1Creates small code.
/O2Creates fast code.
/ObControls inline expansion.
/OdDisables optimization.
/OgDeprecated. Uses global optimizations.
/OiGenerates intrinsic functions.
/openmpEnables the #pragma omp directive in source code.
/OsFavors small code.
/OtFavors fast code.
/OxA subset of /O2 that doesn't include /GF or /Gy.
/OyOmits frame pointer (x86 only).
/PWrites preprocessor output to a file.
/permissive-Set standard-conformance mode.
/Qfast_transcendentalsGenerates fast transcendentals.
/QIfistDeprecated. Suppresses _ftol when a conversion from a floating-point type to an integral type is required (x86 only).
/Qimprecise_fwaitsRemoves fwait commands inside try blocks.
/QIntel-jcc-erratumMitigates the performance impact of the Intel JCC erratum microcode update.
/Qpar (Auto-Parallelizer)Enables automatic parallelization of loops that are marked with the #pragma loop() directive.
/Qsafe_fp_loadsUses integer move instructions for floating-point values and disables certain floating point load optimizations.
/QspectreSpecifies compiler generation of instructions to mitigate certain Spectre variant 1 security vulnerabilities.
/Qspectre-loadSpecifies compiler generation of serializing instructions to mitigate Spectre security vulnerabilities based on load instructions.
/Qspectre-load-cfSpecifies compiler generation of serializing instructions to mitigate Spectre security vulnerabilities based on control flow instructions that load memory.
/Qvec-report (Auto-Vectorizer Reporting Level)Enables reporting levels for automatic vectorization.
/RTCEnables run-time error checking.
/sdlEnables additional security features and warnings.
/showIncludesDisplays a list of include files during compilation.
/source-charsetSet source character set.
/stdC++ standard version compatibility selector.
/TcSpecifies a C source file.
/TCSpecifies all source files are C.
/TpSpecifies a C++ source file.
/TPSpecifies all source files are C++.
/URemoves a predefined macro.
/uRemoves all predefined macros.
/utf-8Set source and execution character sets to UTF-8.
/VDeprecated. Sets the .obj file version string.
/validate-charsetValidate UTF-8 files for only compatible characters.
/vdSuppresses or enables hidden vtordisp class members.
/vmbUses best base for pointers to members.
/vmgUses full generality for pointers to members.
/vmmDeclares multiple inheritance.
/vmsDeclares single inheritance.
/vmvDeclares virtual inheritance.
/volatileSelects how the volatile keyword is interpreted.
/wDisables all warnings.
/W0, /W1, /W2, /W3, /W4Sets which warning level to output.
/w1, /w2, /w3, /w4Sets the warning level for the specified warning.
/WallEnables all warnings, including warnings that are disabled by default.
/wdDisables the specified warning.
/weTreats the specified warning as an error.
/WLEnables one-line diagnostics for error and warning messages when compiling C++ source code from the command line.
/woDisplays the specified warning only once.
/Wp64Obsolete. Detects 64-bit portability problems.
/WvDisplays no warnings introduced after the specified version of the compiler.
/WXTreats all warnings as errors.
/XIgnores the standard include directory.
/Y-Ignores all other precompiled-header compiler options in the current build.
/YcCreates a precompiled header file.
/YdDeprecated. Places complete debugging information in all object files. Use /Zi instead.
/YlInjects a PCH reference when creating a debug library
/YuUses a precompiled header file during build.
/Z7Generates C 7.0-compatible debugging information.
/ZaDisables language extensions.
/ZcSpecifies standard behavior under /Ze./Za, /Ze (Disable Language Extensions)
/ZeDeprecated. Enables language extensions.
/ZfImproves PDB generation time in parallel builds.
/ZgRemoved in Visual Studio 2015. Generates function prototypes.
/ZHSpecifies MD5, SHA-1, or SHA-256 for checksums in debug info.
/ZIIncludes debug information in a program database compatible with Edit and Continue.
/ZiGenerates complete debugging information.
/ZlRemoves default library name from .obj file (x86 only).
/ZmSpecifies the precompiled header memory allocation limit.
/ZoGenerates enhanced debugging information for optimized code.
/ZpPacks structure members.
/ZsChecks syntax only.
/ZWProduces an output file to run on the Windows Runtime.
  1. I just recently switched to Dev-Cpp 4.9.9.2 and I'm wondering how I can force the compiler to conform to ANSI C and such things. As it is now, it lets me get away with quite a lot of strange things.
  2. Nov 29, 2016 Delphi is the ultimate IDE for creating cross-platform, natively compiled apps. Are you ready to design the best UIs of your life? Our award winning VCL framework for Windows and FireMonkey (FMX) visual framework for cross-platform UIs provide you with the foundation for intuitive, beautiful.

See also

MSVC compiler options
MSVC compiler command-line syntax

hello altogether,
my name is Wolfram Pagels, Berlin, Germany
my status is :retired but enthusiastic c++-fan;

Dev

I use Dev-C++ since 3 month ago; in the 70th I programmed in Fortran;
after a long break I enjoy to learn c++11;

e.g.: the day before yesterday I got the following message from Dev-C++:

My second question to you: * h o w to enable (these) options at my installed and running actual mingw compiler as part of Dev-C++ IDE ?

Thank you in advance for your time,

Compile In Dev C++

yours sincerely

Compiler Options In Dev C Windows 10

Edited by mike_2000_17: Removed email address. Fixed formatting.

Dev C Compiler

  • 4 Contributors
  • forum 3 Replies
  • 3,592 Views
  • 23 Hours Discussion Span
  • commentLatest Postby Ancient DragonLatest Post

Dev C++ Compiler Options

mike_2000_172,669

Well, the answer to your problem (but not to your question) is to change your IDE. Dev-C++ is far too old to support C++11. The MinGW GCC version that ships with Dev-C++ is version 3.4.2, which is really old. Decent support for C++11 starts roughly from 4.6.0, but since it is still experimental, the newer the better. Currently, you can get 4.7.1 version through '>TDM-GCC ports. I recommend switching to '>CodeBlocks, which you can download as an installer that includes TDM-GCC 4.7.1. That should allow you to have decent C++11 support.

Dev C++ Compiler Setup

As for setting compiler options, you typically have to navigate the 'Build Configuration' or 'Project Properties' or similar panels. Usually, you will find a place to put 'custom compiler options' where you can place the exact command-line compiler option (like -std=c++11), that is, if you can't find a checkbox for the particular option you need.