Parameter of macro mixed with field of structure
<p>So I have macro like this:</p>

<pre><code>#define some_macro(param1)    \
static some_struct_t struct = \
{                             \
    .param1 = param1          \
}
</code></pre>

<p>When I call this macro from main with direct value:</p>

<pre><code>some_macro(50);
</code></pre>

<p>I got an error : </p>

<pre><code>..\..\main.c(185): error:  #29: expected an expression
</code></pre>

<p>I found 2 ways to solve it, first was to declare const value within main and pass to macro and second to change name of parameter not be the same as in macro.</p>

<p>So it works but I do not what caused error. Any ideas?</p>