[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Tinycc-devel] pointers to static functions inside a static table
From: |
Jay Foad |
Subject: |
Re: [Tinycc-devel] pointers to static functions inside a static table |
Date: |
Thu, 19 May 2011 09:03:04 +0100 |
>> static struct s {
>> void (*elem)();
>> } t[] = {
>> { func } /* tcc requires these braces! */
>> };
> A bit late for a correct answer but in fact these parenthesis *are* needed.
> There is one set of parenthesis for the array initialization and then one for
> the structure. Gcc with -Wall gives a warning now (since version 4.6).
The braces aren't required by C standards. That's why GCC *only* gives
a warning, not an error.
Jay.