Sujet : Re: question about linker
De : tr.17687 (at) *nospam* z991.linuxsc.com (Tim Rentsch)
Groupes : comp.lang.cDate : 24. Dec 2024, 01:02:26
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <8634iedk31.fsf@linuxsc.com>
References : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
User-Agent : Gnus/5.11 (Gnus v5.11) Emacs/22.4 (gnu/linux)
Michael S <
already5chosen@yahoo.com> writes:
On Wed, 11 Dec 2024 21:19:54 +0000
bart <bc@freeuk.com> wrote:
>
This also comes up with 'while (cond); {...}'.
>
$ cat foo.c
void foo(int x)
{
while (x--);
bar();
}
>
$ clang-format < foo.c
void foo(int x) {
while (x--)
;
bar();
}
>
Do I use clamg-format myself? No, I don't.
>
And I don't know why C formatters are generally less popular among C
programmers then, for example, go formater among Go programmers or Rust
formatter among Rust programmers.
I don't have any experience with Go formatters or Rust formatters.
My experience with C formatters is that they format too much; in
some ways they help, but in other ways they interfere with choices
that are incidental to the high-level adjustments desired. It
would be nice to see a code formatter that respects low-level
choices while adjusting high-level format rules. To say this
another way, the formatting that is done is too rigid - the tool
always adjusts everything, instead of adjusting only those aspects
that are needed to fix the high-level transgressions.