#pragma Directives Overview Index

From RAD Studio
Jump to: navigation, search

Go Up to The Preprocessor Index


C++Builder supports the following #pragma directives:

Directive Description
#pragma alias Indicates that two identifier names are equivalent.
#pragma alignment Prints the alignment setting and enum size.
#pragma anon_struct Allows compiling anonymous structures.
#pragma argsused Inhibits warning about unused arguments.
#pragma checkoption Verifies that the specified options are set.
#pragma codeseg Indicates the code segment for function allocation.
#pragma codestring Emits bytes into the code segment.
#pragma comment Writes a comment record in the object file.
#pragma defineonoption Defines the specified symbol if the specified options are set.
#pragma delphiheader Indicates the bounds of a Delphi header.
#pragma exit Indicates a function to be run on program exit (before _exit).
#pragma explicit_rtti Specifies for what class or record members (public, protected, and so on) RTTI should be generated.
#pragma extref Forces an external reference for the specified symbol.
#pragma hdrfile Specifies the name of the precompiled header.
#pragma hdrignore Obsolete.
#pragma hdrstop Stops the precompiling after the current header.
#pragma implements Emits a comment record containing the name of the current unit to the object file.
#pragma init_seg Affects the order in which startup code is executed.
#pragma inline Causes the compiler to restart itself with the option -B.
#pragma intrinsic Overrides the options that control the inlining of functions.
#pragma link Instructs the linker to link the file into an executable file.
#pragma message Prints the specified message at compile time.
#pragma nopushoptwarn Suppresses the warnings about mismatched #pragma option push/pop.
#pragma nopackwarning Suppresses the warnings about mismatched #pragma pack push/pop.
#pragma noretval Indicates that a function doesn't return.
#pragma obsolete Indicates that the specified symbol is obsolete.
#pragma once Indicates that the current header file must be included once.
#pragma option Saves the current options and sets the specified options.
#pragma pack Sets the structure packing alignment.
#pragma package Controls the initialization order of packages and other aspects related to packages.
#pragma region/end_region Indicates code regions. Used by the IDE editor for code folding.
#pragma resource Emits a comment record that instructs the linker to mark the file as a form unit.
#pragma samecodeseg Places the specified functions in the same code segment.
#pragma sizeof Prints the size of the specified aggregate.
#pragma startup Indicates a function to be run on program startup (before main).
#pragma sysheader Indicates the bounds of a system header.
#pragma undefineonoption Undefines the specified symbol if the specified options are set.
#pragma warn Enables/disables warnings.