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

Valery Ushakov <[email protected]>
Newsgroups gmane.os.netbsd.devel.toolchain
Message-ID <Y64icTBPAHwc/[email protected]>
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.