Skip to content

Initialize ccKey from default cc so defined(gcc) works without --cc. - #2172

Draft
gmpreussner wants to merge 3 commits into
nim-lang:masterfrom
gmpreussner:nif-config-cckey-init
Draft

Initialize ccKey from default cc so defined(gcc) works without --cc.#2172
gmpreussner wants to merge 3 commits into
nim-lang:masterfrom
gmpreussner:nif-config-cckey-init

Conversation

@gmpreussner

Copy link
Copy Markdown
Contributor

Fixes #2148

@gmpreussner

gmpreussner commented Jul 22, 2026

Copy link
Copy Markdown
Contributor Author

The {.passC: "-Wno-builtin-declaration-mismatch".} in posix.nim sits inside when defined(gcc):. That only takes effect if nimsem sees defined(gcc) as true during semantic analysis.

Nimony’s defined(...) checks config.isDefined(), which treats the C compiler as defined via config.ccKey

The default compiler is "gcc", but ccKey was only set when --cc: was passed explicitly

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

hastur: conflicting types for built-in function execve

1 participant