OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc1/] [gcc/] [testsuite/] [obj-c++.dg/] [objc-gc-3.mm] - Diff between revs 308 and 338

Only display areas with differences | Details | Blame | View Log

Rev 308 Rev 338
/* Test looking up fields in superclasses in the context of write-barriers
/* Test looking up fields in superclasses in the context of write-barriers
   (where component references get rewritten).  */
   (where component references get rewritten).  */
/* Contributed by Ziemowit Laski   */
/* Contributed by Ziemowit Laski   */
/* { dg-do compile } */
/* { dg-do compile } */
/* { dg-options "-fobjc-gc" } */
/* { dg-options "-fobjc-gc" } */
/* { dg-prune-output "cc1objplus: warning: '-fobjc-gc' is ignored for '-fgnu-runtime'" } */
/* { dg-prune-output "cc1objplus: warning: '-fobjc-gc' is ignored for '-fgnu-runtime'" } */
#include "../objc-obj-c++-shared/Object1.h"
#include "../objc-obj-c++-shared/Object1.h"
@class MyWindow;
@class MyWindow;
@interface MyDocument : Object {
@interface MyDocument : Object {
    MyWindow *_window;
    MyWindow *_window;
}
}
@end
@end
@interface MyFileDocument : MyDocument {
@interface MyFileDocument : MyDocument {
     struct {
     struct {
        unsigned int autoClose:1;
        unsigned int autoClose:1;
        unsigned int openForUI:1;
        unsigned int openForUI:1;
        unsigned int isClosing:1;
        unsigned int isClosing:1;
        unsigned int needsDiskCheck:1;
        unsigned int needsDiskCheck:1;
        unsigned int isWritable:1;
        unsigned int isWritable:1;
        unsigned int representsFileOnDisk:1;
        unsigned int representsFileOnDisk:1;
        unsigned int RESERVED:26;
        unsigned int RESERVED:26;
    } _fdFlags;
    } _fdFlags;
}
}
@end
@end
@interface MyTextFileDocument : MyFileDocument {
@interface MyTextFileDocument : MyFileDocument {
    Object *_textStorage;
    Object *_textStorage;
    struct __tfdFlags {
    struct __tfdFlags {
        unsigned int immutable:1;
        unsigned int immutable:1;
        unsigned int lineEnding:2;
        unsigned int lineEnding:2;
        unsigned int isClosing:1;
        unsigned int isClosing:1;
        unsigned int settingsAreSet:1;
        unsigned int settingsAreSet:1;
        unsigned int usesTabs:1;
        unsigned int usesTabs:1;
        unsigned int isUTF8WithBOM:1;
        unsigned int isUTF8WithBOM:1;
        unsigned int wrapsLines:1;
        unsigned int wrapsLines:1;
        unsigned int usingDefaultLanguage:1;
        unsigned int usingDefaultLanguage:1;
        unsigned int RESERVED:23;
        unsigned int RESERVED:23;
    } _tfdFlags;
    } _tfdFlags;
    int _tabWidth;
    int _tabWidth;
    int _indentWidth;
    int _indentWidth;
}
}
@end
@end
@interface MyRTFFileDocument : MyTextFileDocument
@interface MyRTFFileDocument : MyTextFileDocument
- (BOOL)readFromFile:(const char *)fileName ofType:(const char *)type;
- (BOOL)readFromFile:(const char *)fileName ofType:(const char *)type;
@end
@end
@implementation MyRTFFileDocument
@implementation MyRTFFileDocument
- (BOOL)readFromFile:(const char *)fileName ofType:(const char *)type {
- (BOOL)readFromFile:(const char *)fileName ofType:(const char *)type {
        if (_textStorage && fileName) {
        if (_textStorage && fileName) {
            [_textStorage free];
            [_textStorage free];
            return YES;
            return YES;
        } else if (type) {
        } else if (type) {
            _textStorage = [MyRTFFileDocument new];
            _textStorage = [MyRTFFileDocument new];
            return NO;
            return NO;
        }
        }
   return (fileName && type);
   return (fileName && type);
}
}
@end
@end
 
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.