Re: style change: explicitly permit braces for single statements

2020-07-12 Thread Greg A. Woods
At Sun, 12 Jul 2020 10:01:36 +1000, Luke Mewburn wrote: Subject: style change: explicitly permit braces for single statements > > I propose that the NetBSD C style guide in to /usr/share/misc/style > is reworded to more explicitly permit braces around single statements, > instead of the current di

Re: style change: explicitly permit braces for single statements

2020-07-12 Thread Michael Cheponis
A few years ago when I worked at Tesla, we had to have our production code pass a MISRA C linter: https://gimpel.com/ MISRA C requires braces even with a single clause. I'm not going to try to justify MISRA C's rules; but only say that 'programmers in automobile / embedded' world probably find t

Re: style change: explicitly permit braces for single statements

2020-07-12 Thread Robert Elz
Date:Sun, 12 Jul 2020 13:01:59 +1000 From:Luke Mewburn Message-ID: <20200712030159.gh12...@mewburn.net> | | IMHO, permitting braces to be consistently used: | | - Adds to clarity of intent. | | - Aids code review. | | - Avoids gotofail: https://en.wi