diff options
author | Nicola Pero <n.pero@mi.flashnet.it> | 2002-08-30 00:50:27 +0200 |
---|---|---|
committer | Nicola Pero <nicola@gcc.gnu.org> | 2002-08-29 22:50:27 +0000 |
commit | 1f67610074a2d6c22413bf0690927282dee2dce5 (patch) | |
tree | 91362e7c51ef31f510cdfdb144ade271ed7e720a | |
parent | 23532de9e517d125c6971c5ad5354265a814aee6 (diff) | |
download | gcc-1f67610074a2d6c22413bf0690927282dee2dce5.zip gcc-1f67610074a2d6c22413bf0690927282dee2dce5.tar.gz gcc-1f67610074a2d6c22413bf0690927282dee2dce5.tar.bz2 |
Extended documentation on ObjC macros and flags
From-SVN: r56668
-rw-r--r-- | gcc/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/doc/cpp.texi | 6 | ||||
-rw-r--r-- | gcc/doc/invoke.texi | 39 |
3 files changed, 45 insertions, 7 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index d4d1608..273f16d 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +Fri Aug 30 00:33:37 2002 Nicola Pero <n.pero@mi.flashnet.it> + + * doc/cpp.texi (__NEXT_RUNTIME__): Extended documentation. + * doc/invoke.texi (-fnext-runtime, -Wno-protocol, -Wselector): + Extended, updated documentation. + (-Wundeclared-selector): Documented. + 2002-08-29 Jason Thorpe <thorpej@wasabisystems.com> * config/chorus.h: Consistently define *_DEBUGGING_INFO with diff --git a/gcc/doc/cpp.texi b/gcc/doc/cpp.texi index 0770e41..e84cf5f 100644 --- a/gcc/doc/cpp.texi +++ b/gcc/doc/cpp.texi @@ -2028,8 +2028,10 @@ mechanism based on @code{setjmp} and @code{longjmp} for exception handling. @item __NEXT_RUNTIME__ -This macro is defined, with value 1, when the NeXT runtime -(as in @option{-fnext-runtime}) is in use for Objective-C. +This macro is defined, with value 1, if (and only if) the NeXT runtime +(as in @option{-fnext-runtime}) is in use for Objective-C. If the GNU +runtime is used, this macro is not defined, so that you can use this +macro to determine which runtime (NeXT or GNU) is being used. @item __TARGET_BITS_ORDER__ This macro describes the target's bits order in a byte. Its value is diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index d4bd453..2ab4069 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -199,7 +199,7 @@ in the following sections. @gccoptlist{ -fconstant-string-class=@var{class-name} @gol -fgnu-runtime -fnext-runtime -gen-decls @gol --Wno-protocol -Wselector} +-Wno-protocol -Wselector -Wundeclared-selector} @item Language Independent Options @xref{Language Independent Options,,Options to Control Diagnostic Messages Formatting}. @@ -1731,7 +1731,9 @@ runtime. This is the default for most types of systems. @item -fnext-runtime @opindex fnext-runtime Generate output compatible with the NeXT runtime. This is the default -for NeXT-based systems, including Darwin and Mac OS X@. +for NeXT-based systems, including Darwin and Mac OS X@. The macro +@code{__NEXT_RUNTIME__} is predefined if (and only if) this option is +used. @item -gen-decls @opindex gen-decls @@ -1740,12 +1742,39 @@ file named @file{@var{sourcename}.decl}. @item -Wno-protocol @opindex Wno-protocol -Do not warn if methods required by a protocol are not implemented -in the class adopting it. +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 behaviour 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 @code{-Wno-protocol} option, then +methods inherited from the superclass are considered to be implemented, +and no warning is issued for them. @item -Wselector @opindex Wselector -Warn if a selector has multiple methods of different types defined. +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 +that for each selector appearing in a @code{@@selector(@dots{})} +expression, a corresponding method with 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 @code{-fsyntax-only} option is +being used. + +@item -Wundeclared-selector +@opindex Wundeclared-selector +Warn if a @code{@@selector(@dots{})} expression referring to an +undeclared selector is found. A selector is considered undeclared if no +method with that name has been declared (explicitly, in an +@code{@@interface} or @code{@@protocol} declaration, or implicitly, in +an @code{@@implementation} section) before the +@code{@@selector(@dots{})} expression. This option always performs its +checks as soon as a @code{@@selector(@dots{})} expression is found +(while @code{-Wselector} only performs its checks in the final stage of +compilation), and so additionally enforces the coding style convention +that methods and selectors must be declared before being used. @c not documented because only avail via -Wp @c @item -print-objc-runtime-info |