Elektrine lite

← Feed

@fugueish@wandering.shop

Post #1723772

2026-04-27 01:17 UTC

@joe@f.duriansoftware.com Yeah, I'm waiting for that, but I can't seem to get demo.c from https://nullprogram.com/blog/2025/06/26/ working with ``` % clang -v Apple clang version 21.0.0 (clang-2100.0.123.102) Target: arm64-apple-darwin25.4.0 Thread model: posix InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin ```

Replies (1)

  • @joe@f.duriansoftware.com 2026-04-27 17:59

    @fugueish@wandering.shop hmm yeah looks like clang hasn't gotten the memo yet. i can get this to work with gcc, but the standard doesn't allow type definitions in "underspecified" `auto` declarations, so i had to write ``` #define $Option(T) struct Option##T { T value; bool valid; } #define $Some(T, v) ($Option(T)){ .value = v, .valid = true } void printOption($Option(int) x) { ... } int main() { // can't use auto $Option(int) o = $Some(int, 42); printOption(o); } ```

    Open ##1723771