From: Fariborz Jahanian Date: Fri, 22 Oct 2010 22:35:51 +0000 (+0000) Subject: Update compatibility page for objective-c. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ddfa6c38854a4bac67d78e5e21d8a00a4c979573;p=clang Update compatibility page for objective-c. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117168 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/www/compatibility.html b/www/compatibility.html index 4196e880ec..bd22f9a8dc 100644 --- a/www/compatibility.html +++ b/www/compatibility.html @@ -42,6 +42,7 @@
  • Cast of super
  • Size of interfaces
  • Internal Objective-C types
  • +
  • C variables in @class or @protocol
  • C++ compatibility @@ -282,6 +283,24 @@ void f(id x);

    Code should use types id, SEL, and Class instead of the internal types.

    + +

    C variables in @class or @protocol

    + + +

    GCC allows declaration of C variables in a @class or @protocol, but not +C functions. Clang does not allow variable or C function declarations. External +declarations, however, is allowed. Variables may only be declared in an +@implementation. + +

    +@interface XX
    +int x;  //  not allowed in clang
    +int one=1;  //  not allowed in clang
    +extern int OK;
    +@end
    +
    +
    +

    C++ compatibility