This is the mail archive of the gcc-patches@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]

Re: PATCH: PR objc/18971



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


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