tech-toolchain archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: [patch] C99 & /usr/share/misc/style



On Thu, Dec 29, 2022 at 19:15:58 +0000, Joseph Koshy wrote:

> +/*
> + * Enum constants are capitalized.  Commas are recommended for the last
> + * element as using them can minimize diffs.
> + */
>  enum enumtype {
>  	ONE,
> -	TWO
> +	TWO,
>  };

This is in general my preference too, but spare a thought for C++
where that comma is a -Wpedantic warning.  Probably need to say
something about not using that in a header file that can be included
by C++ programs.

-uwe


Home | Main Index | Thread Index | Old Index