[Mesa-dev] [PATCH 04/24] i965: Make 'dw1' and 'bits' unnamed structures in brw_reg.
Emil Velikov
emil.l.velikov at gmail.com
Tue Nov 3 02:33:27 PST 2015
On 3 November 2015 at 00:29, Matt Turner <mattst88 at gmail.com> wrote:
> Generated by
>
> sed -i -e 's/\.bits\././g' *.c *.h *.cpp
> sed -i -e 's/dw1\.//g' *.c *.h *.cpp
>
> and then reverting changes to comments in gen7_blorp.cpp and
> brw_fs_generator.cpp.
>
> There wasn't any utility offered by forcing the programmer to list these
> to access their fields. Removing them will reduce churn in future
> commits.
>
> This is C11 (and gcc has apparently supported it for sometime
> "compatibility with other compilers")
>
> See https://gcc.gnu.org/onlinedocs/gcc/Unnamed-Fields.html
FYI on old versions of GCC where this extension is not enabled by
default, we flip in on. We're using -std=gnu99, although perhaps we
should use -fms-extensions - not a big deal either way.
Btw I had an almost identical patch locally :-)
-Emil
More information about the mesa-dev
mailing list