This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug objc/7098] ObjC front end doesn't understand attributes on method parameters
- From: "dominiq at lps dot ens dot fr" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 19 Sep 2008 18:32:34 -0000
- Subject: [Bug objc/7098] ObjC front end doesn't understand attributes on method parameters
- References: <bug-7098-222@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #7 from dominiq at lps dot ens dot fr 2008-09-19 18:32 -------
Although I know this is not the right way to fix pr34310 I have done the
following change to /usr/include/objc/Protocol.h:
--- /usr/include/objc/Protocol.h-orig 2008-09-19 17:16:42.000000000 +0200
+++ /usr/include/objc/Protocol.h 2008-09-19 17:19:36.000000000 +0200
@@ -43,16 +43,16 @@
/* Obtaining attributes intrinsic to the protocol */
-- (const char *)name OBJC2_UNAVAILABLE;
+- (const char *)name; /* OBJC2_UNAVAILABLE; */
/* Testing protocol conformance */
-- (BOOL) conformsTo: (Protocol *)aProtocolObject OBJC2_UNAVAILABLE;
+- (BOOL) conformsTo: (Protocol *)aProtocolObject; /* OBJC2_UNAVAILABLE; */
/* Looking up information specific to a protocol */
-- (struct objc_method_description *) descriptionForInstanceMethod:(SEL)aSel
DEPRECATED_IN_MAC_OS_X_VERSION_10_5_AND_LATER;
-- (struct objc_method_description *) descriptionForClassMethod:(SEL)aSel
DEPRECATED_IN_MAC_OS_X_VERSION_10_5_AND_LATER;
+- (struct objc_method_description *) descriptionForInstanceMethod:(SEL)aSel;
/* DEPRECATED_IN_MAC_OS_X_VERSION_10_5_AND_LATER; */
+- (struct objc_method_description *) descriptionForClassMethod:(SEL)aSel; /*
DEPRECATED_IN_MAC_OS_X_VERSION_10_5_AND_LATER; */
@end
and the number of failures has gone fom:
=== objc Summary for unix ===
# of expected passes 2896
# of unexpected failures 85
# of expected failures 7
# of unresolved testcases 74
# of unsupported tests 2
to
=== objc Summary ===
# of expected passes 3047
# of unexpected failures 9
# of expected failures 7
# of unresolved testcases 2
# of unsupported tests 2
Now the failures are
FAIL: objc.dg/headers.m (test for excess errors)
...
/System/Library/Frameworks/Foundation.framework/Headers/NSString.h:345: error:
expected ';' before '__attribute__'
...
FAIL: objc.dg/no-extra-load.m (test for excess errors)
...
/System/Library/Frameworks/Foundation.framework/Headers/NSObject.h:122: error:
expected ';' before '__attribute__'
...
/System/Library/Frameworks/Foundation.framework/Headers/NSPointerFunctions.h:59:
error: stray '@' in program
...
FAIL: objc.dg/stret-2.m scan-assembler objc_msgSend_stret
FAIL: objc.dg/stret-2.m scan-assembler-not objc_msgSend[^_S]
FAIL: objc.dg/stret-2.m scan-assembler-not objc_msgSendSuper[^_]
...
FAIL: objc.dg/stubify-1.m (test for excess errors) -|
...
|--> see pr37589
FAIL: objc.dg/stubify-2.m (test for excess errors) -|
...
FAIL: objc.dg/stubify-2.m scan-rtl-dump-not jump "symbol_ref.*"objc_msgSend"":
dump file does not exist
...
FAIL: objc.dg/symtab-1.m scan-assembler
L_OBJC_SYMBOLS.*:\n\t.long\t0\n\t.long\t0\n\t.short\t2\n\t.short\t0\n\t.long\tL_OBJC_CLASS_Derived.*\n\t.long\tL_OBJC_CLASS_Base.*\n
...
I have also done similar changes to
/System/Library/Frameworks/Foundation.framework/Headers/NSArray.h-mine
/System/Library/Frameworks/Foundation.framework/Headers/NSCoder.h-mine
/System/Library/Frameworks/Foundation.framework/Headers/NSDictionary.h-mine
/System/Library/Frameworks/Foundation.framework/Headers/NSObject.h-mine
/System/Library/Frameworks/Foundation.framework/Headers/NSRunLoop.h-mine
/System/Library/Frameworks/Foundation.framework/Headers/NSSet.h-mine
/System/Library/Frameworks/Foundation.framework/Headers/NSString.h-mine
/System/Library/Frameworks/Foundation.framework/Headers/NSURL.h-mine
/System/Library/Frameworks/Foundation.framework/Headers/NSURLHandle.h-mine
but all of them only fix objc.dg/headers.m because I have been unable to find
what to change in
/System/Library/Frameworks/Foundation.framework/Headers/NSPointerFunctions.h
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=7098