Re: [GIT] Networking
From: Rustad, Mark D
Date: Tue Sep 08 2015 - 12:51:12 EST
> On Sep 7, 2015, at 4:02 AM, David Laight <David.Laight@xxxxxxxxxx> wrote:
>
> Feed:
> int bar(int (*f)[10]) { return sizeof *f; }
> into cc -O2 -S and look at the generated code - returns 40 not 4.
Yes, indeed it does. And with clang too. I guess I was too easily discouraged when looking for a workable syntax some years ago. At the time I stopped when the typedef worked, which really just encapsulates this. I should have recognized that then. Thanks for making it all so clear.
--
Mark Rustad, Networking Division, Intel Corporation
Attachment:
signature.asc
Description: Message signed with OpenPGP using GPGMail