hexonal 2cd3227b89 Skip c-test on clang++-3.6 due to pre-3.8 _Generic decay bug
Now that CC correctly matches CXX for this job, test/c-test.c is
compiled with real Clang 3.6.2 for the first time, which fails on
string-literal arguments to fmt's C API macros ("too many arguments
to function call, expected 0, have 1").

Root cause: fmt-c.h's FMT_MAKE_ARG uses a C11 _Generic dispatch with
a 0-arg fmt_unsupported_type default. Whether the controlling
expression of _Generic undergoes array-to-pointer decay was
genuinely ambiguous in C11 wording (WG14 N1930); Clang treated it as
an unconverted lvalue and did not decay arrays until the fix for
LLVM PR16340 landed in November 2015 (clang 3.8). Clang 3.6.2
(Feb 2015) predates that fix, so a string literal like "foo" (type
char[4]) never matches the char*/const char* cases and falls
through to the default, which then gets called with an argument.

Verified this is specific to old Clang, not a general fmt-c.h bug:
- Compiled test/c-test.c against fmt-c.h with a modern Clang
  locally; it builds cleanly, confirming decay works correctly once
  PR16340 is fixed.
- Confirmed no safe macro-level workaround exists: forcing decay
  uniformly (e.g. `(x) + 0` or `1 ? (x) : (x)`) triggers ordinary
  integer promotion for the small-integer cases (char, bool, short,
  etc.), silently routing them to the wrong fmt_from_* function on
  *all* compilers. A per-type-conditional wrapper isn't expressible
  without already knowing the type, i.e. without _Generic itself.

Given this is a real, long-since-fixed upstream compiler bug in a
10-year-old Clang release, and no low-risk fix at the fmt-c.h level
exists that doesn't risk changing dispatch behavior on every other
compiler, skip just c-test (via ctest -E) for the clang++-3.6 job.
The C++ test suite for that job is unaffected and still runs.

The exclude value must be double-quoted when assigned from the
templated expression, since GitHub Actions substitutes it inline and
an unquoted assignment containing a space (e.g. exclude=-E ^c-test$)
does not parse as a single shell assignment - it splits into a
variable-scoped-to-command form that tries to execute a nonexistent
'^c-test$' command, aborting the step under bash's default -e.
Verified both branches (clang++-3.6 and every other matrix entry) by
actually executing the resulting snippet with bash -eo pipefail.
2026-07-22 22:20:53 -04:00
..
codeql.yml Bump actions/checkout from 6.0.0 to 7.0.0 (#4835) 2026-07-01 09:07:12 -07:00
doc.yml Bump actions/checkout from 6.0.0 to 7.0.0 (#4835) 2026-07-01 09:07:12 -07:00
fuzz.yml Rename CIFuzz workflow to fuzz 2026-06-01 12:03:52 -07:00
lint.yml Bump actions/checkout from 6.0.0 to 7.0.0 (#4835) 2026-07-01 09:07:12 -07:00
linux.yml Skip c-test on clang++-3.6 due to pre-3.8 _Generic decay bug 2026-07-22 22:20:53 -04:00
macos.yml Bump actions/checkout from 6.0.0 to 7.0.0 (#4835) 2026-07-01 09:07:12 -07:00
release.yml Bump actions/checkout from 6.0.0 to 7.0.0 (#4835) 2026-07-01 09:07:12 -07:00
supply-chain.yml Bump actions/checkout from 6.0.0 to 7.0.0 (#4835) 2026-07-01 09:07:12 -07:00
windows.yml Bump actions/checkout from 6.0.0 to 7.0.0 (#4835) 2026-07-01 09:07:12 -07:00