diff options
author | Stan Shebs <shebs@apple.com> | 2001-04-30 18:17:13 +0000 |
---|---|---|
committer | Stan Shebs <shebs@gcc.gnu.org> | 2001-04-30 18:17:13 +0000 |
commit | 60de6385e1b6b764dca5e467fa2c17e8822777f1 (patch) | |
tree | 30ab26ac683e616e86e0a9690489e89d9e2007a6 /gcc | |
parent | 2458d950f4711dacfd0c517675bd7b0624d8e30d (diff) | |
download | gcc-60de6385e1b6b764dca5e467fa2c17e8822777f1.zip gcc-60de6385e1b6b764dca5e467fa2c17e8822777f1.tar.gz gcc-60de6385e1b6b764dca5e467fa2c17e8822777f1.tar.bz2 |
* invoke.texi: Add a section documenting Objective-C options.
From-SVN: r41692
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/invoke.texi | 62 |
2 files changed, 66 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 3e8dd6e..a5f274b 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2001-04-30 Stan Shebs <shebs@apple.com> + + * invoke.texi: Add a section documenting Objective-C options. + 2001-04-27 Andrew Haley <aph@cambridge.redhat.com> * emit-rtl.c (try_split): Copy EH notes to sequence. diff --git a/gcc/invoke.texi b/gcc/invoke.texi index e573452..2db022b 100644 --- a/gcc/invoke.texi +++ b/gcc/invoke.texi @@ -115,6 +115,7 @@ only one of these two forms, whichever one is not the default. * Invoking G++:: Compiling C++ programs. * C Dialect Options:: Controlling the variant of C language compiled. * C++ Dialect Options:: Variations on C++. +* Objective-C Dialect Options:: Variations on Objective-C. * Language Independent Options:: Controlling how diagnostics should be formatted. * Warning Options:: How picky should the compiler be? @@ -184,6 +185,13 @@ in the following sections. -Woverloaded-virtual -Wno-pmf-conversions @gol -Wsign-promo -Wsynth} +@item Objective-C Language Options +@xref{Objective-C Dialect Options,,Options Controlling Objective-C Dialect}. +@gccoptlist{ +-fconstant-string-class=@var{class name} @gol +-fgnu-runtime -fnext-runtime -gen-decls +-Wno-protocol -Wselector} + @item Language Independent Options @xref{Language Independent Options,,Options to Control Diagnostic Messages Formatting}. @gccoptlist{ @@ -596,6 +604,7 @@ in the following sections. or preprocessed source. * C Dialect Options:: Controlling the variant of C language compiled. * C++ Dialect Options:: Variations on C++. +* Objective-C Dialect Options:: Variations on Objective-C. * Language Independent Options:: Controlling how diagnostics should be formatted. * Warning Options:: How picky should the compiler be? @@ -1541,6 +1550,59 @@ In this example, g++ will synthesize a default @samp{A& operator = (const A&);}, while cfront will use the user-defined @samp{operator =}. @end table +@node Objective-C Dialect Options +@section Options Controlling Objective-C Dialect + +@cindex compiler options, Objective-C +@cindex Objective-C options, command line +@cindex options, Objective-C +This section describes the command-line options that are only meaningful +for Objective-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 @code{some_class.m} like this: + +@example +gcc -g -fgnu-runtime -O -c some_class.m +@end example + +@noindent +In this example, only @samp{-fgnu-runtime} is an option meant only for +Objective-C programs; you can use the other options with any language +supported by GCC. + +Here is a list of options that are @emph{only} for compiling Objective-C +programs: + +@table @gcctabopt +@item -fconstant-string-class=@var{class name} +Use @var{class name} as the name of the class to instantiate for each +literal string specified with the syntax @code{@@"..."}. The default +class name is @code{NXConstantString}. + +@item -fgnu-runtime +Generate object code compatible with the standard GNU Objective-C +runtime. This is the default for most types of systems. + +@item -fnext-runtime +Generate output compatible with the NeXT runtime. This is the default +for NeXT-based systems, including Darwin and Mac OS X. + +@item -gen-decls +Dump interface declarations for all classes seen in the source file to a +file named @file{@var{sourcename}.decl}. + +@item -Wno-protocol +Do not warn if methods required by a protocol are not implemented +in the class adopting it. + +@item -Wselector +Warn if a selector has multiple methods of different types defined. + +@c not documented because only avail via -Wp +@c @item -print-objc-runtime-info + +@end table + @node Language Independent Options @section Options to Control Diagnostic Messages Formatting @cindex options to control diagnostics formatting |