[Mesa-dev] [RFCv3 01/11] gallium: refactor pipe_shader_state to support multiple IR's

Rob Clark robdclark at gmail.com
Wed Mar 30 15:46:11 UTC 2016


On Wed, Mar 30, 2016 at 11:03 AM, Jose Fonseca <jfonseca at vmware.com> wrote:
> On 30/03/16 14:59, Rob Clark wrote:
>>
>> hmm, well nir permits c99, which I thought some other parts of the
>> code did not..  could be just some of the compiler flags we use on
>> parts of the code are more restrictive than they need to be?  I do
>> remember it was initially resulting in a bunch of compiler warnings
>> but I'll have to check again.
>
>
> No idea...  You'll have to show me those warnings if you ever see them
> again.
>
> MSVC compilers support nameless unions eons ago (they are commonly used in
> Windows headers.)
>
> I also believe anonymous unions are not part of C99 neither.  They're simply
> a virtually universally implemented extension.
>
> The only way I know one would get warnings is if one passes -std=cXX or
> -std=c++XX instead of -std=gnuXXX, or -pedantic to GCC.  As those would
> disable non-standard GCC extensions.

and the winner is.... pedantic:

In file included from xa_priv.h:39:0,
                 from xa_composite.c:32:
../../../../src/gallium/include/pipe/p_state.h:237:5: warning: ISO C99
doesn’t support unnamed structs/unions [-Wpedantic]
    };
     ^

BR,
-R


More information about the mesa-dev mailing list