tinycc-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Tinycc-devel] pointers to static functions inside a static table


From: Stephan Beal
Subject: Re: [Tinycc-devel] pointers to static functions inside a static table
Date: Thu, 19 May 2011 12:31:47 +0200

On Thu, May 19, 2011 at 10:03 AM, Jay Foad <address@hidden> wrote:
>>       static struct s {
>>               void (*elem)();
>>       } t[] = {
>>               { func }        /* tcc requires these braces! */
>>       };

The braces aren't required by C standards. That's why GCC *only* gives
a warning, not an error.

Out of curiosity: why are they not strictly required? Because there is only one element in the struct?

--
----- stephan beal
http://wanderinghorse.net/home/stephan/

reply via email to

[Prev in Thread] Current Thread [Next in Thread]