Message ID | 1286308732.39247124@192.168.2.231 |
---|---|
State | New |
Headers | show |
On Oct 5, 2010, at 12:58 PM, Nicola Pero wrote: > This patch fixes PR objc++/23614. > It was not a bug in the ObjC++ compiler; it was a bug in the test. > - MyWidget *widget = nil; > + MyWidget *widget; No, please just change to 0.
Thanks Mike you're right - and I had fixed that before pinging - my ping had a NULL there. ;-) But I can put 0, if you prefer. Ok to apply with a 0 in there ? Thanks -----Original Message----- From: "Mike Stump" <mikestump@comcast.net> Sent: Thursday, 7 October, 2010 20:20 To: "Nicola Pero" <nicola.pero@meta-innovation.com> Cc: "gcc-patches@gnu.org" <gcc-patches@gnu.org> Subject: Re: Fix for PR objc++/23614 On Oct 5, 2010, at 12:58 PM, Nicola Pero wrote: > This patch fixes PR objc++/23614. > It was not a bug in the ObjC++ compiler; it was a bug in the test. > - MyWidget *widget = nil; > + MyWidget *widget; No, please just change to 0.
On Oct 7, 2010, at 11:22 AM, Nicola Pero wrote:
> Ok to apply with a 0 in there ?
Ok.
Index: ChangeLog =================================================================== --- ChangeLog (revision 164997) +++ ChangeLog (working copy) @@ -1,5 +1,11 @@ 2010-10-05 Nicola Pero <nicola.pero@meta-innovation.com> + PR objc++/23614 + * obj-c++.dg/lookup-2.mm: Do not assign 'nil' to a pointer to a + C++ class. Removed XFAIL. + +2010-10-05 Nicola Pero <nicola.pero@meta-innovation.com> + PR objc++/28050 * obj-c++.dg/syntax-error-10.mm: New. Index: obj-c++.dg/lookup-2.mm =================================================================== --- obj-c++.dg/lookup-2.mm (revision 164996) +++ obj-c++.dg/lookup-2.mm (working copy) @@ -1,5 +1,4 @@ /* { dg-do run } */ -/* { dg-xfail-if "PR23614" { "*-*-*" } { "*" } { "-fnext-runtime" } } */ /* { dg-xfail-run-if "Needs OBJC2 ABI" { *-*-darwin* && { lp64 && { ! objc2 } } } { "-fnext-runtime" } { "" } } */ #include "../objc-obj-c++-shared/Object1.h" #include <stdlib.h> @@ -38,7 +37,7 @@ MyWidget gWidget; @implementation Container + (MyWidget *)elementForView:(Foo *)view { - MyWidget *widget = nil; + MyWidget *widget; if ([view conformsTo:@protocol(MyProto)]) { widget = [(Foo <MyProto> *)view widget]; }