Path: csiph.com!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Tim Rentsch Newsgroups: comp.lang.c Subject: Re: question about linker Date: Mon, 23 Dec 2024 16:02:26 -0800 Organization: A noiseless patient Spider Lines: 36 Message-ID: <8634iedk31.fsf@linuxsc.com> References: <87ldwx10gv.fsf@bsb.me.uk> <86ser1kgp5.fsf@linuxsc.com> <87ldwtzlc0.fsf@nosuchdomain.example.com> <20241212000300.00001c20@yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Date: Tue, 24 Dec 2024 01:02:28 +0100 (CET) Injection-Info: dont-email.me; posting-host="0b35227985084685f7db26e049ff6a4a"; logging-data="1520983"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+yEV9OiNq+PXUibgbaNkEEYR8lASbXAQ4=" User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.4 (gnu/linux) Cancel-Lock: sha1:PuQsy3H9r1hMPV9+F3+bKBmdmsE= sha1:nBRH5KuVceEzyugXfV6b7FnkFKw= Xref: csiph.com comp.lang.c:389808 Michael S writes: > On Wed, 11 Dec 2024 21:19:54 +0000 > bart 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.