neulab/tldr huggingface dataset:
-o file Place output in file file.  This applies regardless to whatever sort of output is being produced, whether it be an executable file, an object file, an assembler file or preprocessed C code.
-### Like -v except the commands are not executed and all command arguments are quoted.  This is useful for shell scripts to capture the driver-generated command lines.
-combine If you are compiling multiple source files, this option tells the driver to pass all the source files to the compiler at once (for those languages for which the compiler can handle this).  This will allow intermodule analysis (IMA) to be performed by the compiler. Currently the only language for which this is supported is C.  If you pass source files for multiple languages to the driver, using this option, the driver will invoke the compiler(s) that support IMA once each, passing each compiler all the source files appropriate for it. For those languages that do not support IMA this option will be ignored, and the compiler will be invoked once for each source file in that language.  If you use this option in conjunction with -save-temps, the compiler will generate multiple pre-processed files (one for each source file), but only one (combined) .o or .s file.
--help Print (on the standard output) a description of the command line options understood by gcc.  If the -v option is also specified then --help will also be passed on to the various processes invoked by gcc, so that they can display the command line options they accept. If the -Wextra option is also specified then command line options which have no documentation associated with them will also be displayed.
--target-help Print (on the standard output) a description of target specific command line options for each tool.
Compiling C++ Programs C++ source files conventionally use one of the suffixes .C, .cc, .cpp, .CPP, .c++, .cp, or .cxx; C++ header files often use .hh or .H; and preprocessed C++ files use the suffix .ii.  GCC recognizes files with these names and compiles them as C++ programs even if you call the compiler the same way as for compiling C programs (usually with the name gcc).
However, the use of gcc does not add the C++ library.  g++ is a program that calls GCC and treats .c, .h and .i files as C++ source files instead of C source files unless -x is used, and automatically specifies linking against the C++ library.  This program is also useful when precompiling a C header file with a .h extension for use in C++ compilations.  On many systems, g++ is also installed with the name c++.
-ansi In C mode, support all ISO C90 programs.  In C++ mode, remove GNU extensions that conflict with ISO C++.
The -ansi option does not cause non-ISO programs to be rejected gratuitously.  For that, -pedantic is required in addition to -ansi.
Functions which would normally be built in but do not have semantics defined by ISO C (such as "alloca" and "ffs") are not built-in functions with -ansi is used.
-std= Determine the language standard.  This option is currently only supported when compiling C or C++.  A value for this option must be provided; possible values are
c89 iso9899:1990 ISO C90 (same as -ansi).
c99 c9x iso9899:1999 iso9899:199x ISO C99.  Note that this standard is not yet fully supported; see <http://gcc.gnu.org/gcc-4.2/c99status.html> for more information. The names c9x and iso9899:199x are deprecated.
gnu89 Default, ISO C90 plus GNU extensions (including some C99 features).
gnu99 gnu9x ISO C99 plus GNU extensions.  When ISO C99 is fully implemented in GCC, this will become the default.  The name gnu9x is deprecated.
c++98 The 1998 ISO C++ standard plus amendments.
gnu++98 The same as -std=c++98 plus GNU extensions.  This is the default for C++ code.
Even when this option is not specified, you can still use some of the features of newer standards in so far as they do not conflict with previous C standards.  For example, you may use "__restrict__" even when -std=c99 is not specified.
The -std options specifying some version of ISO C have the same effects as -ansi, except that features that were not in ISO C90 but are in the specified version (for example, // comments and the "inline" keyword in ISO C99) are not disabled.
-fgnu89-inline The option -fgnu89-inline tells GCC to use the traditional GNU semantics for "inline" functions when in C99 mode. Using this option is roughly equivalent to adding the "gnu_inline" function attribute to all inline functions.
This option is accepted by GCC versions 4.1.3 and up.  In GCC versions /* APPLE LOCAL extern inline */ prior to 4.3 (4.2 for Apple's gcc), C99 inline semantics are not supported, and thus this option is effectively assumed to be present regardless of whether or not it is specified; the only effect of specifying it explicitly is to disable warnings about using inline functions in C99 mode. Likewise, the option -fno-gnu89-inline is not supported in versions of /* APPLE LOCAL extern inline */ GCC before 4.3 (4.2 for Apple's gcc).  It is supported only in C99 or gnu99 mode, not in C89 or gnu89 mode.
The preprocesor macros "__GNUC_GNU_INLINE__" and "__GNUC_STDC_INLINE__" may be used to check which semantics are in effect for "inline" functions.
-faltivec This flag is provided for compatibility with Metrowerks CodeWarrior and MrC compilers as well as previous Apple versions of GCC.  It causes the -mpim-altivec option to be turned on.
-fasm-blocks Enable the use of blocks and entire functions of assembly code within a C or C++ file.  The syntax follows that used in CodeWarrior.  This option is not supported for ARM targets.  (APPLE ONLY)
-fno-blocks Disable the use of blocks.  In -std=c99 mode, blocks are turned off by default.  -fblocks can be used to re-enable the feature, if off. Runtime support for blocks first appeared in Mac OS X 10.6.  When targeting 10.6 (see -mmacosx-version-min) and later, the extension is on by default.
GCC normally generates special code to handle certain built-in functions more efficiently; for instance, calls to "alloca" may become single instructions that adjust the stack directly, and calls to "memcpy" may become inline copy loops.  The resulting code is often both smaller and faster, but since the function calls no longer appear as such, you cannot set a breakpoint on those calls, nor can you change the behavior of the functions by linking with a different library.  In addition, when a function is recognized as a built-in function, GCC may use information about that function to warn about problems with calls to that function, or to generate more efficient code, even if the resulting code still contains calls to that function.  For example, warnings are given with -Wformat for bad calls to "printf", when "printf" is built in, and "strlen" is known not to modify global memory.
With the -fno-builtin-function option only the built-in function function is disabled.  function must not begin with __builtin_.  If a function is named this is not built-in in this version of GCC, this option is ignored.  There is no corresponding -fbuiltin-function option; if you wish to enable built-in functions selectively when using -fno-builtin or -ffreestanding, you may define macros such as:
-fhosted Assert that compilation takes place in a hosted environment.  This implies -fbuiltin.  A hosted environment is one in which the entire standard library is available, and in which "main" has a return type of "int".  Examples are nearly everything except a kernel.  This is equivalent to -fno-freestanding.
-ffreestanding Assert that compilation takes place in a freestanding environment. This implies -fno-builtin.  A freestanding environment is one in which the standard library may not exist, and program startup may not necessarily be at "main".  The most obvious example is an OS kernel. This is equivalent to -fno-hosted.
-fopenmp Enable handling of OpenMP directives "#pragma omp" in C/C++ and "!$omp" in Fortran.  When -fopenmp is specified, the compiler generates parallel code according to the OpenMP Application Program Interface v2.5 <http://www.openmp.org/>.
-trigraphs Support ISO C trigraphs.  The -ansi option (and -std options for strict ISO C conformance) implies -trigraphs.
-no-integrated-cpp Performs a compilation in two passes: preprocessing and compiling. This option allows a user supplied "cc1", "cc1plus", or "cc1obj" via the -B option.  The user supplied compilation step can then add in an additional preprocessing step after normal preprocessing but before compiling.  The default is to use the integrated cpp (internal cpp)
The semantics of this option will change if "cc1", "cc1plus", and "cc1obj" are merged.
-traditional -traditional-cpp Formerly, these options caused GCC to attempt to emulate a pre- standard C compiler.  They are now only supported with the -E switch. The preprocessor continues to support a pre-standard mode.  See the GNU CPP manual for details.
-fno-nested-functions Disable nested functions.  This option is not supported for C++ or Objective-C++.  On Darwin, nested functions are disabled by default.
-fpch-preprocess Enable PCH processing even when -E or -save-temps is used.
-fnon-lvalue-assign C and C++ forbid the use of casts and conditional expressions as lvalues, e.g.:
float *p, q, r; ((int *)p)++; (cond ? q : r) = 3.0;
As a transitional measure, the Apple version of GCC 4.0 allows casts and conditional expressions to be used as lvalues in certain situations.  This is accomplished via the -fnon-lvalue-assign switch, which is on by default.  Whenever an lvalue cast or an lvalue conditional expression is encountered, the compiler will issue a deprecation warning and then rewrite the expression as follows:
(type)expr                ---becomes--->      *(type *)&expr cond ? expr1 : expr2      ---becomes--->      *(cond ? &expr1 : &expr2)
To disallow lvalue casts and lvalue conditional expressions altogether, specify -fno-non-lvalue-assign; lvalue casts and lvalue conditional expressions will be disallowed in future versions of Apple's GCC.
-fconstant-cfstrings Enable the automatic creation of a CoreFoundation-type constant string whenever a special builtin "__builtin__CFStringMakeConstantString" is called on a literal string.  (APPLE ONLY)
-Wnonportable-cfstrings Warn if constant CFString objects contain non-portable characters (default behavior)
-fglobal-alloc-prefer-bytes -fno-global-alloc-prefer-bytes For the x86_32 architecture, prefer byte or short values to word values during global register allocation.  Some of the registers on this target can't be used with values smaller than a 32-bit word; allocating these values earlier increases the chance they will get a byte-capable (or short-capable) register.  Ignored for other targets. Defaults on with global register allocation ("-Os", "-O2", or "-O3"). (APPLE ONLY)
-fwritable-strings Store string constants in the writable data segment and don't uniquize them.  This is for compatibility with old programs which assume they can write into string constants.
Writing into string constants is a very bad idea; "constants" should be constant.
Options Controlling C++ Dialect This section describes the command-line options that are only meaningful for C++ programs; but you can also use most of the GNU compiler options regardless of what language your program is in.  For example, you might compile a file "firstClass.C" like this:
g++ -g -frepo -O -c firstClass.C
In this example, only -frepo is an option meant only for C++ programs; you can use the other options with any language supported by GCC.
-fabi-version=n Use version n of the C++ ABI.  Version 2 is the version of the C++ ABI that first appeared in G++ 3.4.  Version 1 is the version of the C++ ABI that first appeared in G++ 3.2.  Version 0 will always be the version that conforms most closely to the C++ ABI specification. Therefore, the ABI obtained using version 0 will change as ABI bugs are fixed.
The default is version 2.
-fcheck-new Check that the pointer returned by "operator new" is non-null before attempting to modify the storage allocated.  This check is normally unnecessary because the C++ standard specifies that "operator new" will only return 0 if it is declared throw(), in which case the compiler will always check the return value even without this option. In all other cases, when "operator new" has a non-empty exception specification, memory exhaustion is signalled by throwing "std::bad_alloc".  See also new (nothrow).
-fconserve-space Put uninitialized or runtime-initialized global variables into the common segment, as C does.  This saves space in the executable at the cost of not diagnosing duplicate definitions.  If you compile with this flag and your program mysteriously crashes after "main()" has completed, you may have an object that is being destroyed twice because two definitions were merged.
This option is no longer useful on most targets, now that support has been added for putting variables into BSS without making them common.
-ffriend-injection Inject friend functions into the enclosing namespace, so that they are visible outside the scope of the class in which they are declared.  Friend functions were documented to work this way in the old Annotated C++ Reference Manual, and versions of G++ before 4.1 always worked that way.  However, in ISO C++ a friend function which is not declared in an enclosing scope can only be found using argument dependent lookup.  This option causes friends to be injected as they were in earlier releases.
This option is for compatibility, and may be removed in a future release of G++.
-fno-elide-constructors The C++ standard allows an implementation to omit creating a temporary which is only used to initialize another object of the same type.  Specifying this option disables that optimization, and forces G++ to call the copy constructor in all cases.
-fno-enforce-eh-specs Don't generate code to check for violation of exception specifications at runtime.  This option violates the C++ standard, but may be useful for reducing code size in production builds, much like defining NDEBUG.  This does not give user code permission to throw exceptions in violation of the exception specifications; the compiler will still optimize based on the specifications, so throwing an unexpected exception will result in undefined behavior.
-ffor-scope -fno-for-scope If -ffor-scope is specified, the scope of variables declared in a for-init-statement is limited to the for loop itself, as specified by the C++ standard.  If -fno-for-scope is specified, the scope of variables declared in a for-init-statement extends to the end of the enclosing scope, as was the case in old versions of G++, and other (traditional) implementations of C++.
The default if neither flag is given to follow the standard, but to allow and give a warning for old-style code that would otherwise be invalid, or have different behavior.
-fno-gnu-keywords Do not recognize "typeof" as a keyword, so that code can use this word as an identifier.  You can use the keyword "__typeof__" instead. -ansi implies -fno-gnu-keywords.
-fno-implicit-templates Never emit code for non-inline templates which are instantiated implicitly (i.e. by use); only emit code for explicit instantiations.
-fno-implicit-inline-templates Don't emit code for implicit instantiations of inline templates, either.  The default is to handle inlines differently so that compiles with and without optimization will need the same set of explicit instantiations.
-fno-implement-inlines To save space, do not emit out-of-line copies of inline functions controlled by #pragma implementation.  This will cause linker errors if these functions are not inlined everywhere they are called.
-fms-extensions Disable pedantic warnings about constructs used in MFC, such as implicit int and getting a pointer to member function via non- standard syntax.
-fpermissive Downgrade some diagnostics about nonconformant code from errors to warnings.  Thus, using -fpermissive will allow some nonconforming code to compile.
-frepo Enable automatic template instantiation at link time.  This option also implies -fno-implicit-templates.
-fno-rtti Disable generation of information about every class with virtual functions for use by the C++ runtime type identification features (dynamic_cast and typeid).  If you don't use those parts of the language, you can save some space by using this flag.  Note that exception handling uses the same information, but it will generate it as needed. The dynamic_cast operator can still be used for casts that do not require runtime type information, i.e. casts to "void *" or to unambiguous base classes.
-fstats Emit statistics about front-end processing at the end of the compilation.  This information is generally only useful to the G++ development team.
-ftemplate-depth-n Set the maximum instantiation depth for template classes to n.  A limit on the template instantiation depth is needed to detect endless recursions during template class instantiation.  ANSI/ISO C++ conforming programs must not rely on a maximum depth greater than 17.
-fuse-cxa-atexit Register destructors for objects with static storage duration with the "__cxa_atexit" function rather than the "atexit" function.  This option is required for fully standards-compliant handling of static destructors, but will only work if your C library supports "__cxa_atexit".
-fno-use-cxa-get-exception-ptr Don't use the "__cxa_get_exception_ptr" runtime routine.  This will cause "std::uncaught_exception" to be incorrect, but is necessary if the runtime routine is not available.
-fvisibility-inlines-hidden This switch declares that the user does not attempt to compare pointers to inline methods where the addresses of the two functions were taken in different shared objects.
The behaviour of this switch is not quite the same as marking the methods as hidden directly, because it does not affect static variables local to the function or cause the compiler to deduce that the function is defined in only one shared object.
You may mark a method as having a visibility explicitly to negate the effect of the switch for that method.  For example, if you do want to compare pointers to a particular inline method, you might mark it as having default visibility.  Marking the enclosing class with explicit visibility will have no effect.
1. It sets the default visibility to 'hidden', like -fvisibility=hidden.  2. Types, but not their members, are not hidden by default.  3. The One Definition Rule is relaxed for types without explicit visibility specifications which are defined in more than one different shared object: those declarations are permitted if they would have been permitted when this option was not used.
This option is discouraged, rather, it is preferable for types to be explicitly exported as desired on a per-class basis.  Unfortunately because Visual Studio can't compare two different hidden types as unequal for the purposes of type_info and exception handling, users are able to write code that relies upon this behavior.
Among the consequences of these changes are that static data members of the same type with the same name but defined in different shared objects will be different, so changing one will not change the other; and that pointers to function members defined in different shared objects will not compare equal.  When this flag is given, it is a violation of the ODR to define types with the same name differently.
-fno-weak Do not use weak symbol support, even if it is provided by the linker. By default, G++ will use weak symbols if they are available.  This option exists only for testing, and should not be used by end-users; it will result in inferior code and has no benefits.  This option may be removed in a future release of G++.
In addition, these optimization, warning, and code generation options have meanings only for C++ programs:
-fno-default-inline Do not assume inline for functions defined inside a class scope. Note that these functions will have linkage like inline functions; they just won't be inlined by default.
-Wabi (C++ only) Warn when G++ generates code that is probably not compatible with the vendor-neutral C++ ABI.  Although an effort has been made to warn about all such cases, there are probably some cases that are not warned about, even though G++ is generating incompatible code.  There may also be cases where warnings are emitted even though the code that is generated will be compatible.
The known incompatibilities at this point include:
•   Incorrect handling of tail-padding for bit-fields.  G++ may attempt to pack data into the same byte as a base class.  For example:
struct A { virtual void f(); int f1 : 1; }; struct B : public A { int f2 : 1; };
In this case, G++ will place "B::f2" into the same byte as"A::f1"; other compilers will not.  You can avoid this problem by explicitly padding "A" so that its size is a multiple of the byte size on your platform; that will cause G++ and other compilers to layout "B" identically.
•   Incorrect handling of tail-padding for virtual bases.  G++ does not use tail padding when laying out virtual bases.  For example:
struct A { virtual void f(); char c1; }; struct B { B(); char c2; }; struct C : public A, public virtual B {};
In this case, G++ will not place "B" into the tail-padding for "A"; other compilers will.  You can avoid this problem by explicitly padding "A" so that its size is a multiple of its alignment (ignoring virtual base classes); that will cause G++ and other compilers to layout "C" identically.
•   Incorrect handling of bit-fields with declared widths greater than that of their underlying types, when the bit-fields appear in a union.  For example:
union U { int i : 4096; };
Assuming that an "int" does not have 4096 bits, G++ will make the union too small by the number of bits in an "int".
•   Empty classes can be placed at incorrect offsets.  For example:
struct A {};
struct B { A a; virtual void f (); };
struct C : public B, public A {};
G++ will place the "A" base class of "C" at a nonzero offset; it should be placed at offset zero.  G++ mistakenly believes that the "A" data member of "B" is already at offset zero.
•   Names of template functions whose types involve "typename" or template template parameters can be mangled incorrectly.
template <typename Q> void f(typename Q::X) {}
template <template <typename> class Q> void f(typename Q<int>::X) {}
Instantiations of these templates may be mangled incorrectly.
-Wctor-dtor-privacy (C++ only) Warn when a class seems unusable because all the constructors or destructors in that class are private, and it has neither friends nor public static member functions.
-Wnon-virtual-dtor (C++ only) Warn when a class appears to be polymorphic, thereby requiring a virtual destructor, yet it declares a non-virtual one.  This warning is also enabled if -Weffc++ is specified.
-Wreorder (C++ only) Warn when the order of member initializers given in the code does not match the order in which they must be executed.  For instance:
The compiler will rearrange the member initializers for i and j to match the declaration order of the members, emitting a warning to that effect.  This warning is enabled by -Wall.
The following -W... options are not affected by -Wall.
-Weffc++ (C++ only) Warn about violations of the following style guidelines from Scott Meyers' Effective C++ book:
•   Item 11:  Define a copy constructor and an assignment operator for classes with dynamically allocated memory.
•   Item 12:  Prefer initialization to assignment in constructors.
•   Item 14:  Make destructors virtual in base classes.
•   Item 15:  Have "operator=" return a reference to *this.
•   Item 23:  Don't try to return a reference when you must return an object.
Also warn about violations of the following style guidelines from Scott Meyers' More Effective C++ book:
•   Item 6:  Distinguish between prefix and postfix forms of increment and decrement operators.
•   Item 7:  Never overload "&&", "||", or ",".
-Wno-deprecated (C++ only) Do not warn about usage of deprecated features.
-Wstrict-null-sentinel (C++ only) Warn also about the use of an uncasted "NULL" as sentinel.  When compiling only with GCC this is a valid sentinel, as "NULL" is defined to "__null".  Although it is a null pointer constant not a null pointer, it is guaranteed to of the same size as a pointer.  But this use is not portable across different compilers.
-Wno-non-template-friend (C++ only) Disable warnings when non-templatized friend functions are declared within a template.  Since the advent of explicit template specification support in G++, if the name of the friend is an unqualified-id (i.e., friend foo(int)), the C++ language specification demands that the friend declare or define an ordinary, nontemplate function.  (Section 14.5.3).  Before G++ implemented explicit specification, unqualified-ids could be interpreted as a particular specialization of a templatized function.  Because this non-conforming behavior is no longer the default behavior for G++, -Wnon-template-friend allows the compiler to check existing code for potential trouble spots and is on by default.  This new compiler behavior can be turned off with -Wno-non-template-friend which keeps the conformant compiler code but disables the helpful warning.
-Wold-style-cast (C++ only) Warn if an old-style (C-style) cast to a non-void type is used within a C++ program.  The new-style casts (dynamic_cast, static_cast, reinterpret_cast, and const_cast) are less vulnerable to unintended effects and much easier to search for.
-Woverloaded-virtual (C++ only) Warn when a function declaration hides virtual functions from a base class.  For example, in:
will fail to compile.
-Wno-pmf-conversions (C++ only) Disable the diagnostic for converting a bound pointer to member function to a plain pointer.
-Wsign-promo (C++ only) Warn when overload resolution chooses a promotion from unsigned or enumerated type to a signed type, over a conversion to an unsigned type of the same size.  Previous versions of G++ would try to preserve unsignedness, but the standard mandates the current behavior.
struct A { operator int (); A& operator = (int); };
main () { A a,b; a = b; }
In this example, G++ will synthesize a default A& operator = (const A&);, while cfront will use the user-defined operator =.
Options Controlling Objective-C and Objective-C++ Dialects (NOTE: This manual does not describe the Objective-C and Objective-C++ languages themselves.  See
This section describes the command-line options that are only meaningful for Objective-C and Objective-C++ programs, but you can also use most of the language-independent GNU compiler options.  For example, you might compile a file "some_class.m" like this:
-fconstant-string-class=class-name Use class-name as the name of the class to instantiate for each literal string specified with the syntax "@"..."".  The default class name is "NXConstantString" if the GNU runtime is being used, and "NSConstantString" if the NeXT runtime is being used (see below). The -fconstant-cfstrings option, if also present, will override the -fconstant-string-class setting and cause "@"..."" literals to be laid out as constant CoreFoundation strings.
-fno-nil-receivers Assume that all Objective-C message dispatches (e.g., "[receiver message:arg]") in this translation unit ensure that the receiver is not "nil".  This allows for more efficient entry points in the runtime to be used.  Currently, this option is only available in conjunction with the NeXT runtime on Mac OS X 10.3 and later.
-fobjc-call-cxx-cdtors For each Objective-C class, check if any of its instance variables is a C++ object with a non-trivial default constructor.  If so, synthesize a special "- (id) .cxx_construct" instance method that will run non-trivial default constructors on any such instance variables, in order, and then return "self".  Similarly, check if any instance variable is a C++ object with a non-trivial destructor, and if so, synthesize a special "- (void) .cxx_destruct" method that will run all such default destructors, in reverse order.
The "- (id) .cxx_construct" and/or "- (void) .cxx_destruct" methods thusly generated will only operate on instance variables declared in the current Objective-C class, and not those inherited from superclasses.  It is the responsibility of the Objective-C runtime to invoke all such methods in an object's inheritance hierarchy.  The "- (id) .cxx_construct" methods will be invoked by the runtime immediately after a new object instance is allocated; the "- (void) .cxx_destruct" methods will be invoked immediately before the runtime deallocates an object instance.
-fobjc-sjlj-exceptions Enable syntactic support for structured exception handling in Objective-C, similar to what is offered by C++ and Java.  This option is unavailable in conjunction with the NeXT runtime on Mac OS X 10.2 and earlier.  This option is on by default with the NeXT runtime.
@try { ... @throw expr; ... } @catch (AnObjCClass *exc) { ... @throw expr; ... @throw; ... } @catch (AnotherClass *exc) { ... } @catch (id allOthers) { ... } @finally { ... @throw expr; ... }
The @throw statement may appear anywhere in an Objective-C or Objective-C++ program; when used inside of a @catch block, the @throw may appear without an argument (as shown above), in which case the object caught by the @catch will be rethrown.
Note that only (pointers to) Objective-C objects may be thrown and caught using this scheme.  When an object is thrown, it will be caught by the nearest @catch clause capable of handling objects of that type, analogously to how "catch" blocks work in C++ and Java.  A "@catch(id ...)" clause (as shown above) may also be provided to catch any and all Objective-C exceptions not caught by previous @catch clauses (if any).
The @finally clause, if present, will be executed upon exit from the immediately preceding "@try ... @catch" section.  This will happen regardless of whether any exceptions are thrown, caught or rethrown inside the "@try ... @catch" section, analogously to the behavior of the "finally" clause in Java.
There are several caveats to using the new exception mechanism:
•   Although currently designed to be binary compatible with "NS_HANDLER"-style idioms provided by the "NSException" class, the new exceptions can only be used on Mac OS X 10.3 (Panther) and later systems, due to additional functionality needed in the (NeXT) Objective-C runtime.
•   As mentioned above, the new exceptions do not support handling types other than Objective-C objects.   Furthermore, when used from Objective-C++, the Objective-C exception model does not interoperate with C++ exceptions at this time.  This means you cannot @throw an exception from Objective-C and "catch" it in C++, or vice versa (i.e., "throw ... @catch").
The -fobjc-sjlj-exceptions switch also enables the use of synchronization blocks for thread-safe execution:
@synchronized (ObjCClass *guard) { ... }
Upon entering the @synchronized block, a thread of execution shall first check whether a lock has been placed on the corresponding "guard" object by another thread.  If it has, the current thread shall wait until the other thread relinquishes its lock.  Once "guard" becomes available, the current thread will place its own lock on it, execute the code contained in the @synchronized block, and finally relinquish the lock (thereby making "guard" available to other threads).
Unlike Java, Objective-C does not allow for entire methods to be marked @synchronized.  Note that throwing exceptions out of @synchronized blocks is allowed, and will cause the guarding object to be unlocked properly.
-fobjc-gc Enable garbage collection (GC) in Objective-C and Objective-C++ programs.  The resulting binary requires additional runtime support which is present on Mac OS X Version 10.5 (Leopard) and later.  All Objective-C objects are presumed to be garbage collected. To aid in this effort, compiler implements assignments of Objective-C object pointers via runtime support functions. These functions work correctly in non-GC environments as well, in case this code is used as part of a library.  Assignments of objects into instance variables of other objects are intercepted, so are assignments to global object variables. In general, assignments through pointers to objects are intercepted. Additionally, assignments of objects as fields within structures are intercepted.
In addition, other pointer variables may be marked with the __strong storage class modifier to indicate to the compiler that these assignments need to use the assignment runtime functions as well, allowing the memory referenced by these pointers to be allocated from the collector. A __weak storage class modifier for pointers is also introduced to indicate a zero-ing weak reference. This is permitted only for instance variables of an object or globals.  The compiler arranges for all reads as well as writes to these variables to occur via runtime support functions.  Under garbage collection these variables are not consulted when determining what is not garbage and they are set to nil (zero) if the memory they reference is deemed garbage and is collected.
__strong void *p;  // assignments to 'p' will have runtime support calls int *q;            // assignments to 'q' ordinarly will not ... (__strong int *)q = 0;   // this assignment will call a runtime support function
Conversely, the "__weak" type qualifier may be used to call weak runtime functions.
__weak id q;      // assignments to 'q' will have the '__weak' semantics id p;             // assignments to 'p' will have the "__strong' semantics ... (__weak id)p = 0;   // Fall back to '__weak' semantics in this assignment.
-fobjc-gc-only Use this option to indicate that the Objective-C program supports garbage collection (GC) only - that is, it does not contain retain/release logic.  This flag implies -fobjc-gc as well. With this flag, framework is marked as not honoring retain/release.
-fzero-link When compiling for the NeXT runtime, the compiler ordinarily replaces calls to "objc_getClass("...")" (when the name of the class is known at compile time) with static class references that get initialized at load time, which improves run-time performance.  Specifying the -fzero-link flag suppresses this behavior and causes calls to "objc_getClass("...")"  to be retained.  This is useful in Zero-Link debugging mode, since it allows for individual class implementations to be modified during program execution.
-Wassign-intercept Warn whenever an Objective-C assignment is being intercepted by the garbage collector.
-Wno-protocol If a class is declared to implement a protocol, a warning is issued for every method in the protocol that is not implemented by the class.  The default behavior is to issue a warning for every method not explicitly implemented in the class, even if a method implementation is inherited from the superclass.  If you use the -Wno-protocol option, then methods inherited from the superclass are considered to be implemented, and no warning is issued for them.
-Wselector Warn if multiple methods of different types for the same selector are found during compilation.  The check is performed on the list of methods in the final stage of compilation.  Additionally, a check is performed for each selector appearing in a "@selector(...)" expression, and a corresponding method for that selector has been found during compilation.  Because these checks scan the method table only at the end of compilation, these warnings are not produced if the final stage of compilation is not reached, for example because an error is found during compilation, or because the -fsyntax-only option is being used.
-Wproperty-assign-default Warn if no "assign", "retain", or "copy" attribute is specified on a property of pointer to object type. Property is then assumed to be "assign" by default.
-Wdirect-ivar-access Warn if ivar of pointer to object type is directly accessed in non-gc mode, instead of using property syntax access.
-Wstrict-selector-match Warn if multiple methods with differing argument and/or return types are found for a given selector when attempting to send a message using this selector to a receiver of type "id" or "Class".  When this flag is off (which is the default behavior), the compiler will omit such warnings if any differences found are confined to types which share the same size and alignment.
-Wundeclared-selector Warn if a "@selector(...)" expression referring to an undeclared selector is found.  A selector is considered undeclared if no method with that name has been declared before the "@selector(...)" expression, either explicitly in an @interface or @protocol declaration, or implicitly in an @implementation section.  This option always performs its checks as soon as a "@selector(...)" expression is found, while -Wselector only performs its checks in the final stage of compilation.  This also enforces the coding style convention that methods and selectors must be declared before being used.
Options to Control Diagnostic Messages Formatting Traditionally, diagnostic messages have been formatted irrespective of the output device's aspect (e.g. its width, ...).  The options described below can be used to control the diagnostic messages formatting algorithm, e.g. how many characters per line, how often source location information should be reported.  Right now, only the C++ front end can honor these options.  However it is expected, in the near future, that the remaining front ends would be able to digest them correctly.
-fmessage-length=n Try to format error messages so that they fit on lines of about n characters.  The default is 72 characters for g++ and 0 for the rest of the front ends supported by GCC.  If n is zero, then no line- wrapping will be done; each error message will appear on a single line.
-fdiagnostics-show-location=once Only meaningful in line-wrapping mode.  Instructs the diagnostic messages reporter to emit once source location information; that is, in case the message is too long to fit on a single physical line and has to be wrapped, the source location won't be emitted (as prefix) again, over and over, in subsequent continuation lines.  This is the default behavior.
-fdiagnostics-show-option This option instructs the diagnostic machinery to add text to each diagnostic emitted, which indicates which command line option directly controls that diagnostic, when such an option is known to the diagnostic machinery.
Options to Request or Suppress Warnings Warnings are diagnostic messages that report constructions which are not inherently erroneous but which are risky or suggest there may have been an error.
You can request many specific warnings with options beginning -W, for example -Wimplicit to request warnings on implicit declarations.  Each of these specific warning options also has a negative form beginning -Wno- to turn off warnings; for example, -Wno-implicit.  This manual lists only one of the two forms, whichever is not the default.
The following options control the amount and kinds of warnings produced by GCC; for further, language-specific options also refer to C++ Dialect Options and Objective-C and Objective-C++ Dialect Options.
-pedantic Issue all the warnings demanded by strict ISO C and ISO C++; reject all programs that use forbidden extensions, and some other programs that do not follow ISO C and ISO C++.  For ISO C, follows the version of the ISO C standard specified by any -std option used.
Valid ISO C and ISO C++ programs should compile properly with or without this option (though a rare few will require -ansi or a -std option specifying the required version of ISO C).  However, without this option, certain GNU extensions and traditional C and C++ features are supported as well.  With this option, they are rejected.
-pedantic does not cause warning messages for use of the alternate keywords whose names begin and end with __.  Pedantic warnings are also disabled in the expression that follows "__extension__". However, only system header files should use these escape routes; application programs should avoid them.
Some users try to use -pedantic to check programs for strict ISO C conformance.  They soon find that it does not do quite what they want: it finds some non-ISO practices, but not all---only those for which ISO C requires a diagnostic, and some others for which diagnostics have been added.
A feature to report any failure to conform to ISO C might be useful in some instances, but would require considerable additional work and would be quite different from -pedantic.  We don't have plans to support such a feature in the near future.
Where the standard specified with -std represents a GNU extended dialect of C, such as gnu89 or gnu99, there is a corresponding base standard, the version of ISO C on which the GNU extended dialect is based.  Warnings from -pedantic are given where they are required by the base standard.  (It would not make sense for such warnings to be given only for features not in the specified GNU C dialect, since by definition the GNU dialects of C include all features the compiler supports with the given option, and there would be nothing to warn about.)
-pedantic-errors Like -pedantic, except that errors are produced rather than warnings.
-Wno-import Inhibit warning messages about the use of #import.
-Wno-#warnings Inhibit warning messages issued by #warning.
-Wextra-tokens Warn about extra tokens at the end of prepreprocessor directives. (APPLE ONLY)
-Wnewline-eof Warn about files missing a newline at the end of the file.  (APPLE ONLY)
-Wno-altivec-long-deprecated Do not warn about the use of the deprecated 'long' keyword in AltiVec data types.  (APPLE ONLY)
-Wcomment Warn whenever a comment-start sequence /* appears in a /* comment, or whenever a Backslash-Newline appears in a // comment.  This warning is enabled by -Wall.
-Wno-format Check calls to "printf" and "scanf", etc., to make sure that the arguments supplied have types appropriate to the format string specified, and that the conversions specified in the format string make sense.  This includes standard functions, and others specified by format attributes, in the "printf", "scanf", "strftime" and "strfmon" (an X/Open extension, not in the C standard) families (or other target-specific families).  Which functions are checked without format attributes having been specified depends on the standard version selected, and such checks of functions without the attribute specified are disabled by -ffreestanding or -fno-builtin.
The formats are checked against the format features supported by GNU libc version 2.2.  These include all ISO C90 and C99 features, as well as features from the Single Unix Specification and some BSD and GNU extensions.  Other library implementations may not support all these features; GCC does not support warning about features that go beyond a particular library's limitations.  However, if -pedantic is used with -Wformat, warnings will be given about format features not in the selected standard version (but not for "strfmon" formats, since those are not in any version of the C standard).
Since -Wformat also checks for null format arguments for several functions, -Wformat also implies -Wnonnull.
-Wformat is included in -Wall.  For more control over some aspects of format checking, the options -Wformat-y2k, -Wno-format-extra-args, -Wno-format-zero-length, -Wformat-nonliteral, -Wformat-security, and -Wformat=2 are available, but are not included in -Wall.
-Wformat-y2k If -Wformat is specified, also warn about "strftime" formats which may yield only a two-digit year.
Where the unused arguments lie between used arguments that are specified with $ operand number specifications, normally warnings are still given, since the implementation could not know what type to pass to "va_arg" to skip the unused arguments.  However, in the case of "scanf" formats, this option will suppress the warning if the unused arguments are all pointers, since the Single Unix Specification says that such unused arguments are allowed.
-Wno-format-security If -Wformat is specified, also warn about uses of format functions that represent possible security problems.  At present, this warns about calls to "printf" and "scanf" functions where the format string is not a string literal and there are no format arguments, as in "printf (foo);".  This may be a security hole if the format string came from untrusted input and contains %n.  (This is currently a subset of what -Wformat-nonliteral warns about, but in future warnings may be added to -Wformat-security that are not included in -Wformat-nonliteral.)
-Wformat=2 Enable -Wformat plus format checks not included in -Wformat. Currently equivalent to -Wformat -Wformat-nonliteral -Wformat-security -Wformat-y2k.
-Wglobal-constructors Warn about namespace scope data that requires construction or destruction, or functions that use the constructor attribute or the destructor attribute.  Additionally warn if the Objective-C GNU runtime is used to initialize various metadata.
-Winit-self (C, C++, Objective-C and Objective-C++ only) Warn about uninitialized variables which are initialized with themselves.  Note this option can only be used with the -Wuninitialized option, which in turn only works with -O1 and above.
For example, GCC will warn about "i" being uninitialized in the following snippet only when -Winit-self has been specified:
-Wimplicit-int Warn when a declaration does not specify a type.  This warning is enabled by -Wall.
-Wimplicit-function-declaration -Werror-implicit-function-declaration Give a warning (or error) whenever a function is used before being declared.  The form -Wno-error-implicit-function-declaration is not supported.  This warning is enabled by -Wall (as a warning, not an error).
-Wimplicit Same as -Wimplicit-int and -Wimplicit-function-declaration.  This warning is enabled by -Wall.
-Wmain Warn if the type of main is suspicious.  main should be a function with external linkage, returning int, taking either zero arguments, two, or three arguments of appropriate types.  This warning is enabled by -Wall.
-Wmissing-braces Warn if an aggregate or union initializer is not fully bracketed.  In the following example, the initializer for a is not fully bracketed, but that for b is fully bracketed.
-Wparentheses Warn if parentheses are omitted in certain contexts, such as when there is an assignment in a context where a truth value is expected, or when operators are nested whose precedence people often get confused about.  Only the warning for an assignment used as a truth value is supported when compiling C++; the other warnings are only supported when compiling C.
Also warn if a comparison like x<=y<=z appears; this is equivalent to (x<=y ? 1 : 0) <= z, which is a different interpretation from that of ordinary mathematical notation.
Also warn about constructions where there may be confusion to which "if" statement an "else" branch belongs.  Here is an example of such a case:
In C, every "else" branch belongs to the innermost possible "if" statement, which in this example is "if (b)".  This is often not what the programmer expected, as illustrated in the above example by indentation the programmer chose.  When there is the potential for this confusion, GCC will issue a warning when this flag is specified. To eliminate the warning, add explicit braces around the innermost "if" statement so there is no way the "else" could belong to the enclosing "if".  The resulting code would look like this:
The C and C++ standards defines the order in which expressions in a C/C++ program are evaluated in terms of sequence points, which represent a partial ordering between the execution of parts of the program: those executed before the sequence point, and those executed after it.  These occur after the evaluation of a full expression (one which is not part of a larger expression), after the evaluation of the first operand of a "&&", "||", "? :" or "," (comma) operator, before a function is called (but after the evaluation of its arguments and the expression denoting the called function), and in certain other places.  Other than as expressed by the sequence point rules, the order of evaluation of subexpressions of an expression is not specified.  All these rules describe only a partial order rather than a total order, since, for example, if two functions are called within one expression with no sequence point between them, the order in which the functions are called is not specified.  However, the standards committee have ruled that function calls do not overlap.
-Wreturn-type Warn whenever a function is defined with a return-type that defaults to "int".  Also warn about any "return" statement with no return- value in a function whose return-type is not "void".