C is Brittle D is Plastic

Forum User forumuser at example.com
Tue Mar 31 19:39:20 UTC 2026


On Monday, 30 March 2026 at 14:23:35 UTC, Dennis wrote:

> ```C
> #define ArrayCount(a) (sizeof(a) / sizeof((a)[0]))
> ```

Is this a valid C translation unit?

    #include <stdio.h>

    int (*fun) ();

    int main ()
    {
       printf ("%zu\n", sizeof fun);
       printf ("%zu\n", sizeof (fun) ());
    }

If it is compiled on an LP64 system, what will be printed?


More information about the Digitalmars-d mailing list