From ddfa6c38854a4bac67d78e5e21d8a00a4c979573 Mon Sep 17 00:00:00 2001 From: Fariborz Jahanian Date: Fri, 22 Oct 2010 22:35:51 +0000 Subject: [PATCH] Update compatibility page for objective-c. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117168 91177308-0d34-0410-b5e6-96231b3b80d8 --- www/compatibility.html | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) 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

    -- 2.40.0