>>>>> "Jason" == Jason Merrill <[email protected]> writes:

>> IIRC gdb and gcc don't really agree on formatting.  Someone who knows
>> the gcc style well would have to go through all the settings to see.

Jason> How does this file differ from contrib/clang-format?

I finally got around to comparing the two.

The proposed gdb file seems more complete -- it has many more settings.
The gcc file mentions clang-format 7.0.1, but the gdb one was most
recently tested with a minimum version of clang-format 18.

Leaving aside the settings that only appear in the gdb file, gdb and gcc
differ on a few:

* BraceWrapping->AfterNamespace.  gcc uses false but gdb doesn't use a
  custom setting here and relies on BreakBeforeBraces=true.

* ForEachMacros (gdb removed all such macros during C++ification, but it
  wouldn't hurt to share this list)

* ColumnLimit.  gdb uses 79, gcc uses 80.  This is probably unimportant.

* AlignEscapedNewlines: gdb uses Left, gcc uses Right.
  Could go either way on this one.

* AlwaysBreakTemplateDeclarations: gdb uses Yes, gcc uses MultiLine.
  I believe that the essence of the GNU style is that vertical
  space is free.

Anyway these are closer than I thought.  Only programmers could possibly
notice the differences.

Tom

Reply via email to