[Mesa-dev] [PATCH] glsl: remove trailing comma in enum lists to silence warning

Eric Anholt eric at anholt.net
Mon May 9 19:29:30 UTC 2016


Ian Romanick <idr at freedesktop.org> writes:

> On 05/03/2016 10:17 PM, Eric Anholt wrote:
>> Brian Paul <brianp at vmware.com> writes:
>> 
>>> On 05/02/2016 06:15 PM, Ilia Mirkin wrote:
>>>> I know I've been sticking commas at the end of enums left and right
>>>> for the past several years, and haven't heard any complaints. The nice
>>>> thing about the trailing comma is that you avoid having to change
>>>> unrelated lines when adding entries. This leads to cleaner per-line
>>>> histories, which can be useful to see when something was added.
>>>
>>> Yeah, I'd like to use trailing commas too, but I'd rather not see 
>>> warnings.  I'm not sure why/when this started.
>> 
>> I think we should just refuse to build with -Wpedantic, instead.
>
> I believe Jose recently added -Wpedantic to catch some things that GCC
> normally allows that MSVC does not.  Something about mixing C99 with
> C++?  I don't recall the details.

So pick the warning you want, don't just enable the collection of
garbage warnings that is known as -Wpedantic.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 818 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20160509/906f0e33/attachment.sig>


More information about the mesa-dev mailing list