Commit 46e34f96 by Ziemowit Laski Committed by Ziemowit Laski

(This patch is part of merge of objc-improvements-branch into mainline.)

[gcc/ChangeLog]
2004-08-12  Ziemowit Laski  <zlaski@apple.com>

        (This patch is part of merge of objc-improvements-branch
        into mainline.)

        * doc/frontends.texi: Mention Objective-C++ in addition to
        Objective-C.
        * doc/install.texi: Add 'obj-c++' to list of configurable
        languages.
        * doc/invoke.texi: Rename Objective-C option headings to
        indicate they also apply to Objective-C++.  List file
        extensions for Objective-C++ sources.  Mention that
        ObjC and ObjC++ compilations may also use C and C++ options,
        respectively.  Point users to doc/standards.texi for
        further info on ObjC and ObjC++.
        * doc/sourcebuild.texi: Mention the objcp/ directory and
        the Objective-C++ sources it contains.
        * doc/standards.texi: Update link to Apple ObjC site;
        add link to gcc readings.html WWW doc.

From-SVN: r85842
parent 539599c1
2004-08-12 Ziemowit Laski <zlaski@apple.com>
(This patch is part of merge of objc-improvements-branch
into mainline.)
* doc/frontends.texi: Mention Objective-C++ in addition to
Objective-C.
* doc/install.texi: Add 'obj-c++' to list of configurable
languages.
* doc/invoke.texi: Rename Objective-C option headings to
indicate they also apply to Objective-C++. List file
extensions for Objective-C++ sources. Mention that
ObjC and ObjC++ compilations may also use C and C++ options,
respectively. Point users to doc/standards.texi for
further info on ObjC and ObjC++.
* doc/sourcebuild.texi: Mention the objcp/ directory and
the Objective-C++ sources it contains.
* doc/standards.texi: Update link to Apple ObjC site;
add link to gcc readings.html WWW doc.
2004-08-12 Alan Modra <amodra@bigpond.net.au> 2004-08-12 Alan Modra <amodra@bigpond.net.au>
* config/rs6000/rs6000.c (function_arg_padding): Revert 2004-07-28 * config/rs6000/rs6000.c (function_arg_padding): Revert 2004-07-28
......
...@@ -13,10 +13,12 @@ ...@@ -13,10 +13,12 @@
@cindex Fortran @cindex Fortran
@cindex Java @cindex Java
@cindex Objective-C @cindex Objective-C
@cindex Objective-C++
@cindex treelang @cindex treelang
GCC stands for ``GNU Compiler Collection''. GCC is an integrated GCC stands for ``GNU Compiler Collection''. GCC is an integrated
distribution of compilers for several major programming languages. These distribution of compilers for several major programming languages. These
languages currently include C, C++, Objective-C, Java, Fortran, and Ada. languages currently include C, C++, Objective-C, Objective-C++, Java,
Fortran, and Ada.
The abbreviation @dfn{GCC} has multiple meanings in common use. The The abbreviation @dfn{GCC} has multiple meanings in common use. The
current official meaning is ``GNU Compiler Collection'', which refers current official meaning is ``GNU Compiler Collection'', which refers
...@@ -57,5 +59,5 @@ have been implemented as ``preprocessors'' which emit another high ...@@ -57,5 +59,5 @@ have been implemented as ``preprocessors'' which emit another high
level language such as C@. None of the compilers included in GCC are level language such as C@. None of the compilers included in GCC are
implemented this way; they all generate machine code directly. This implemented this way; they all generate machine code directly. This
sort of preprocessor should not be confused with the @dfn{C sort of preprocessor should not be confused with the @dfn{C
preprocessor}, which is an integral feature of the C, C++, and preprocessor}, which is an integral feature of the C, C++, Objective-C
Objective-C languages. and Objective-C++ languages.
...@@ -1038,7 +1038,7 @@ grep language= */config-lang.in ...@@ -1038,7 +1038,7 @@ grep language= */config-lang.in
@end smallexample @end smallexample
Currently, you can use any of the following: Currently, you can use any of the following:
@code{ada}, @code{c}, @code{c++}, @code{f77}, @code{f95}, @code{java}, @code{ada}, @code{c}, @code{c++}, @code{f77}, @code{f95}, @code{java},
@code{objc}. @code{objc}, @code{obj-c++}.
Building the Ada compiler has special requirements, see below.@* Building the Ada compiler has special requirements, see below.@*
If you do not pass this flag, all languages available in the @file{gcc} If you do not pass this flag, all languages available in the @file{gcc}
sub-tree will be configured. Re-defining @code{LANGUAGES} when calling sub-tree will be configured. Re-defining @code{LANGUAGES} when calling
......
...@@ -121,7 +121,8 @@ only one of these two forms, whichever one is not the default. ...@@ -121,7 +121,8 @@ only one of these two forms, whichever one is not the default.
* Invoking G++:: Compiling C++ programs. * Invoking G++:: Compiling C++ programs.
* C Dialect Options:: Controlling the variant of C language compiled. * C Dialect Options:: Controlling the variant of C language compiled.
* C++ Dialect Options:: Variations on C++. * C++ Dialect Options:: Variations on C++.
* Objective-C Dialect Options:: Variations on Objective-C. * Objective-C and Objective-C++ Dialect Options:: Variations on Objective-C
and Objective-C++.
* Language Independent Options:: Controlling how diagnostics should be * Language Independent Options:: Controlling how diagnostics should be
formatted. formatted.
* Warning Options:: How picky should the compiler be? * Warning Options:: How picky should the compiler be?
...@@ -190,8 +191,9 @@ in the following sections. ...@@ -190,8 +191,9 @@ in the following sections.
-Woverloaded-virtual -Wno-pmf-conversions @gol -Woverloaded-virtual -Wno-pmf-conversions @gol
-Wsign-promo -Wsynth} -Wsign-promo -Wsynth}
@item Objective-C Language Options @item Objective-C and Objective-C++ Language Options
@xref{Objective-C Dialect Options,,Options Controlling Objective-C Dialect}. @xref{Objective-C and Objective-C++ Dialect Options,,Options Controlling
Objective-C and Objective-C++ Dialects}.
@gccoptlist{ @gccoptlist{
-fconstant-string-class=@var{class-name} @gol -fconstant-string-class=@var{class-name} @gol
-fgnu-runtime -fnext-runtime @gol -fgnu-runtime -fnext-runtime @gol
...@@ -710,7 +712,8 @@ See S/390 and zSeries Options. ...@@ -710,7 +712,8 @@ See S/390 and zSeries Options.
or preprocessed source. or preprocessed source.
* C Dialect Options:: Controlling the variant of C language compiled. * C Dialect Options:: Controlling the variant of C language compiled.
* C++ Dialect Options:: Variations on C++. * C++ Dialect Options:: Variations on C++.
* Objective-C Dialect Options:: Variations on Objective-C. * Objective-C and Objective-C++ Dialect Options:: Variations on Objective-C
and Objective-C++.
* Language Independent Options:: Controlling how diagnostics should be * Language Independent Options:: Controlling how diagnostics should be
formatted. formatted.
* Warning Options:: How picky should the compiler be? * Warning Options:: How picky should the compiler be?
...@@ -752,14 +755,24 @@ C source code which should not be preprocessed. ...@@ -752,14 +755,24 @@ C source code which should not be preprocessed.
C++ source code which should not be preprocessed. C++ source code which should not be preprocessed.
@item @var{file}.m @item @var{file}.m
Objective-C source code. Note that you must link with the library Objective-C source code. Note that you must link with the @file{libobjc}
@file{libobjc.a} to make an Objective-C program work. library to make an Objective-C program work.
@item @var{file}.mi @item @var{file}.mi
Objective-C source code which should not be preprocessed. Objective-C source code which should not be preprocessed.
@item @var{file}.mm
@itemx @var{file}.M
Objective-C++ source code. Note that you must link with the @file{libobjc}
library to make an Objective-C++ program work. Note that @samp{.M} refers
to a literal capital M@.
@item @var{file}.mii
Objective-C++ source code which should not be preprocessed.
@item @var{file}.h @item @var{file}.h
C or C++ header file to be turned into a precompiled header. C, C++, Objective-C or Objective-C++ header file to be turned into a
precompiled header.
@item @var{file}.cc @item @var{file}.cc
@itemx @var{file}.cp @itemx @var{file}.cp
...@@ -838,9 +851,10 @@ Specify explicitly the @var{language} for the following input files ...@@ -838,9 +851,10 @@ Specify explicitly the @var{language} for the following input files
name suffix). This option applies to all following input files until name suffix). This option applies to all following input files until
the next @option{-x} option. Possible values for @var{language} are: the next @option{-x} option. Possible values for @var{language} are:
@smallexample @smallexample
c c-header cpp-output c c-header c-cpp-output
c++ c++-header c++-cpp-output c++ c++-header c++-cpp-output
objective-c objective-c-header objc-cpp-output objective-c objective-c-header objective-c-cpp-output
objective-c++ objective-c++-header objective-c++-cpp-output
assembler assembler-with-cpp assembler assembler-with-cpp
ada ada
f77 f77-cpp-input ratfor f77 f77-cpp-input ratfor
...@@ -1011,7 +1025,8 @@ explanations of options that are meaningful only for C++ programs. ...@@ -1011,7 +1025,8 @@ explanations of options that are meaningful only for C++ programs.
@cindex options, dialect @cindex options, dialect
The following options control the dialect of C (or languages derived The following options control the dialect of C (or languages derived
from C, such as C++ and Objective-C) that the compiler accepts: from C, such as C++, Objective-C and Objective-C++) that the compiler
accepts:
@table @gcctabopt @table @gcctabopt
@cindex ANSI support @cindex ANSI support
...@@ -1767,19 +1782,20 @@ In this example, G++ will synthesize a default @samp{A& operator = ...@@ -1767,19 +1782,20 @@ In this example, G++ will synthesize a default @samp{A& operator =
(const A&);}, while cfront will use the user-defined @samp{operator =}. (const A&);}, while cfront will use the user-defined @samp{operator =}.
@end table @end table
@node Objective-C Dialect Options @node Objective-C and Objective-C++ Dialect Options
@section Options Controlling Objective-C Dialect @section Options Controlling Objective-C and Objective-C++ Dialects
@cindex compiler options, Objective-C @cindex compiler options, Objective-C and Objective-C++
@cindex Objective-C options, command line @cindex Objective-C and Objective-C++ options, command line
@cindex options, Objective-C @cindex options, Objective-C and Objective-C++
(NOTE: This manual does not describe the Objective-C language itself. See (NOTE: This manual does not describe the Objective-C and Objective-C++
@w{@uref{http://gcc.gnu.org/readings.html}} for references.) languages themselves. See @xref{Standards,,Language Standards
Supported by GCC}, for references.)
This section describes the command-line options that are only meaningful 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 for Objective-C and Objective-C++ programs, but you can also use most of
options regardless of what language your program is in. For example, the language-independent GNU compiler options.
you might compile a file @code{some_class.m} like this: For example, you might compile a file @code{some_class.m} like this:
@smallexample @smallexample
gcc -g -fgnu-runtime -O -c some_class.m gcc -g -fgnu-runtime -O -c some_class.m
...@@ -1787,11 +1803,16 @@ gcc -g -fgnu-runtime -O -c some_class.m ...@@ -1787,11 +1803,16 @@ gcc -g -fgnu-runtime -O -c some_class.m
@noindent @noindent
In this example, @option{-fgnu-runtime} is an option meant only for In this example, @option{-fgnu-runtime} is an option meant only for
Objective-C programs; you can use the other options with any language Objective-C and Objective-C++ programs; you can use the other options with
supported by GCC@. any language supported by GCC@.
Note that since Objective-C is an extension of the C language, Objective-C
compilations may also use options specific to the C front-end (e.g.,
@option{-Wtraditional}). Similarly, Objective-C++ compilations may use
C++-specific options (e.g., @option{-Wabi}).
Here is a list of options that are @emph{only} for compiling Objective-C Here is a list of options that are @emph{only} for compiling Objective-C
programs: and Objective-C++ programs:
@table @gcctabopt @table @gcctabopt
@item -fconstant-string-class=@var{class-name} @item -fconstant-string-class=@var{class-name}
...@@ -1820,8 +1841,8 @@ used. ...@@ -1820,8 +1841,8 @@ used.
@opindex fno-nil-receivers @opindex fno-nil-receivers
Assume that all Objective-C message dispatches (e.g., Assume that all Objective-C message dispatches (e.g.,
@code{[receiver message:arg]}) in this translation unit ensure that the receiver @code{[receiver message:arg]}) in this translation unit ensure that the receiver
is not @code{nil}. This allows for more efficient entry points in the runtime to be is not @code{nil}. This allows for more efficient entry points in the runtime
used. Currently, this option is only available in conjunction with to be used. Currently, this option is only available in conjunction with
the NeXT runtime on Mac OS X 10.3 and later. the NeXT runtime on Mac OS X 10.3 and later.
@item -fobjc-exceptions @item -fobjc-exceptions
...@@ -2045,7 +2066,8 @@ two forms, whichever is not the default. ...@@ -2045,7 +2066,8 @@ two forms, whichever is not the default.
The following options control the amount and kinds of warnings produced The following options control the amount and kinds of warnings produced
by GCC; for further, language-specific options also refer to by GCC; for further, language-specific options also refer to
@ref{C++ Dialect Options} and @ref{Objective-C Dialect Options}. @ref{C++ Dialect Options} and @ref{Objective-C and Objective-C++ Dialect
Options}.
@table @gcctabopt @table @gcctabopt
@cindex syntax checking @cindex syntax checking
...@@ -2210,7 +2232,7 @@ requiring a non-null value by the @code{nonnull} function attribute. ...@@ -2210,7 +2232,7 @@ requiring a non-null value by the @code{nonnull} function attribute.
@option{-Wnonnull} is included in @option{-Wall} and @option{-Wformat}. It @option{-Wnonnull} is included in @option{-Wall} and @option{-Wformat}. It
can be disabled with the @option{-Wno-nonnull} option. can be disabled with the @option{-Wno-nonnull} option.
@item -Winit-self @r{(C, C++, and Objective-C only)} @item -Winit-self @r{(C, C++, Objective-C and Objective-C++ only)}
@opindex Winit-self @opindex Winit-self
Warn about uninitialized variables which are initialized with themselves. Warn about uninitialized variables which are initialized with themselves.
Note this option can only be used with the @option{-Wuninitialized} option, Note this option can only be used with the @option{-Wuninitialized} option,
...@@ -2260,7 +2282,7 @@ int a[2][2] = @{ 0, 1, 2, 3 @}; ...@@ -2260,7 +2282,7 @@ int a[2][2] = @{ 0, 1, 2, 3 @};
int b[2][2] = @{ @{ 0, 1 @}, @{ 2, 3 @} @}; int b[2][2] = @{ @{ 0, 1 @}, @{ 2, 3 @} @};
@end smallexample @end smallexample
@item -Wmissing-include-dirs @r{(C, C++, and Objective-C only)} @item -Wmissing-include-dirs @r{(C, C++, Objective-C and Objective-C++ only)}
@opindex Wmissing-include-dirs @opindex Wmissing-include-dirs
Warn if a user-supplied include directory does not exist. Warn if a user-supplied include directory does not exist.
...@@ -2554,7 +2576,7 @@ warnings about constructions that some users consider questionable, and ...@@ -2554,7 +2576,7 @@ warnings about constructions that some users consider questionable, and
that are easy to avoid (or modify to prevent the warning), even in that are easy to avoid (or modify to prevent the warning), even in
conjunction with macros. This also enables some language-specific conjunction with macros. This also enables some language-specific
warnings described in @ref{C++ Dialect Options} and warnings described in @ref{C++ Dialect Options} and
@ref{Objective-C Dialect Options}. @ref{Objective-C and Objective-C++ Dialect Options}.
@end table @end table
The following @option{-W@dots{}} options are not implied by @option{-Wall}. The following @option{-W@dots{}} options are not implied by @option{-Wall}.
...@@ -5491,7 +5513,7 @@ and searches several directories. ...@@ -5491,7 +5513,7 @@ and searches several directories.
@item -lobjc @item -lobjc
@opindex lobjc @opindex lobjc
You need this special case of the @option{-l} option in order to You need this special case of the @option{-l} option in order to
link an Objective-C program. link an Objective-C or Objective-C++ program.
@item -nostartfiles @item -nostartfiles
@opindex nostartfiles @opindex nostartfiles
......
...@@ -79,7 +79,7 @@ The @code{libmudflap} library, used for instrumenting pointer and array ...@@ -79,7 +79,7 @@ The @code{libmudflap} library, used for instrumenting pointer and array
dereferencing operations. dereferencing operations.
@item libobjc @item libobjc
The Objective-C runtime library. The Objective-C and Objective-C++ runtime library.
@item libstdc++-v3 @item libstdc++-v3
The C++ runtime library. The C++ runtime library.
...@@ -128,11 +128,11 @@ The @file{gcc} directory contains the following subdirectories: ...@@ -128,11 +128,11 @@ The @file{gcc} directory contains the following subdirectories:
@item @var{language} @item @var{language}
Subdirectories for various languages. Directories containing a file Subdirectories for various languages. Directories containing a file
@file{config-lang.in} are language subdirectories. The contents of @file{config-lang.in} are language subdirectories. The contents of
the subdirectories @file{cp} (for C++) and @file{objc} (for the subdirectories @file{cp} (for C++), @file{objc} (for Objective-C)
Objective-C) are documented in this manual (@pxref{Passes, , Passes and @file{objcp} (for Objective-C++) are documented in this manual
and Files of the Compiler}); those for other languages are not. (@pxref{Passes, , Passes and Files of the Compiler}); those for other
@xref{Front End, , Anatomy of a Language Front End}, for details of languages are not. @xref{Front End, , Anatomy of a Language Front End},
the files in these directories. for details of the files in these directories.
@item config @item config
Configuration files for supported architectures and operating Configuration files for supported architectures and operating
......
...@@ -156,20 +156,25 @@ information concerning the history of C that is available online, see ...@@ -156,20 +156,25 @@ information concerning the history of C that is available online, see
@c FIXME: details of C++ standard. @c FIXME: details of C++ standard.
There is no formal written standard for Objective-C@. The most @cindex Objective-C
@cindex Objective-C++
There is no formal written standard for Objective-C or Objective-C++@. The most
authoritative manual is ``Object-Oriented Programming and the authoritative manual is ``Object-Oriented Programming and the
Objective-C Language'', available at a number of web sites Objective-C Language'', available at a number of web sites:
@itemize @itemize
@item @item
@uref{http://developer.apple.com/techpubs/macosx/Cocoa/ObjectiveC/} @uref{http://developer.apple.com/documentation/Cocoa/Conceptual/ObjectiveC/}
is a recent version is a recent (and periodically updated) version;
@item @item
@uref{http://www.toodarkpark.org/computers/objc/} @uref{http://www.toodarkpark.org/computers/objc/}
is an older example is an older example;
@item @item
@uref{http://www.gnustep.org} @uref{http://www.gnustep.org}
has additional useful information and
@uref{http://gcc.gnu.org/readings.html}
have additional useful information.
@end itemize @end itemize
@cindex treelang @cindex treelang
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment