Re: unreachable

2025-02-04 Thread Bruno Haible via Gnulib discussion list
Paul Eggert wrote: > For situations like these I prefer "default: unreachable ();" to > "default: abort ();", as "unreachable ()" lets the builder decide > whether to abort or optimize; but it's no big deal. If there's only the slightest chance of that 'default:' case being reached (possibly thr

Re: [PATCH 2/4] quotearg: pacify -Wswitch-enum

2025-02-04 Thread Paul Eggert
On 2/4/25 02:57, Bruno Haible wrote: It's a maintainability issue: Assume that in the future the enum definition gets extended. When the programmer had omitted the 'default: break;' clause, they are now *relying* on gcc's -Wswitch-enum to tell them when to adapt the code. Whereas with the 'defau

Re: gnulib-tool: Apply libgnu.{, l}a specific CFLAGS to all its object files

2025-02-04 Thread Bruno Haible via Gnulib discussion list
> 2025-02-03 Bruno Haible > > gnulib-tool: Apply libgnu.{,l}a specific CFLAGS to all its object files. Oops, this change broke the --create-testdir option. How to reproduce: $ ./gnulib-tool --create-testdir --dir=../testdir1 --with-c++-tests --without-privileged-tests --single-configur

Re: [PATCH 2/4] quotearg: pacify -Wswitch-enum

2025-02-04 Thread Bruno Haible via Gnulib discussion list
Paul Eggert wrote: > That being said, I'll try to keep in mind that you prefer "default: > break;"s in code you've written. Definitely, yes, please keep them. It's a maintainability issue: Assume that in the future the enum definition gets extended. When the programmer had omitted the 'default: