This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libobjc/14382] [libobjc] Calling +initialize on a per category basis


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-03-02 15:49 -------
Confirmed, here is a simple testcase:
#include <objc/objc.h>
#include <objc/Object.h>
int i = 0;
@interface A : Object
+initialize;
@end
@implementation A
+initialize
{
  printf("A\n");
  i++;
}
@end
@interface A(B)
+initialize;
@end
@implementation A(B)
+initialize
{
  printf("A(B)\n");
  i++;
}
@end
int main()
{
        A *b = [A new];
        if (i!=2)
          abort();
        return 0;
}

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2004-03-02 15:49:35
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14382


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]