[Mesa-dev] [PATCH] nir/builder: fix C90 build errors
robdclark at gmail.com
Sun Dec 20 07:43:08 PST 2015
On Sun, Dec 20, 2015 at 12:25 AM, Connor Abbott <cwabbott0 at gmail.com> wrote:
>> But, this would still be an issue for tgsi_to_nir, which I guess
>> wouldn't make sense in glsl/nir. Although turns out we solve that
>> today by:
>> #ifdef __GNUC__
>> #pragma GCC diagnostic ignored "-Wdeclaration-after-statement"
>> which we could drop with this patch. We could ofc also stuff the same
>> into nir_emulate. Tbh dropping the gcc specific pragma's and
>> tolerating C90 in the nir header files seems nicer.
> Although, dropping the pragma's also opens the door for more build breakage...
> It seems like tgsi_to_nir already has this hack. IMHO it would be
> better if you built a separate libgallium_nir.a without the
> -Werror-declaration-after-statement to avoid this, but if you agree
> with the above I guess that can wait.
Well, I guess I'll just go w/ the #ifdef / #pragma / #endif for now..
although IMO it wouldn't really be such a big PITA to keep NIR headers
C90 safe. I mean, after all this time it was just a couple minor
tweaks. We've already spent more energy arguing about it than I think
it would ever take to keep the headers C90 safe.
And, I do really think it is good idea to rebuild all the users after
header file changes.. and turns out if you configure your mesa to
build the other drivers, automake will do exactly that for you ;-)
Anyways, I do have freedreno and vc4 building w/ tinderbox so I'll
notice quickly enough if someone breaks something.
More information about the mesa-dev