PATCH: PR objc/18971

Andrew Pinski pinskia@physics.uc.edu
Fri Dec 24 22:16:00 GMT 2004


On Dec 24, 2004, at 4:52 PM, Ziemowit Laski wrote:

> This was noticed by Alex, and it turned out that ObjC method 
> parameters were not being properly decayed from arrays to pointers.  
> This patch hopefully fixes this, along with ObjC pretty-printing of 
> array types.
>
> I see absolutely no regressions with this, but I'll wait until next 
> week before committing so that people may comment.  Happy holidays to 
> all...


I just want to check to make sure that it also fixes the following
related testcase:
#include <objc/Object.h>

@interface Test : Object
-(void) test2: (int [5][10])a;
@end

@implementation Test
-(void) test2: (int [5][10])a
{
   printf("%s a=%p\n",__PRETTY_FUNCTION__,a);
}
@end

typedef int a[10];

a *b;
int main(int argc, char **argv)
{
   Test *t;

   t = [Test new];
   [t test2: b];

   return 0;
}


Thanks,
Andrew Pinski



More information about the Gcc-patches mailing list