Skip to content

Conversation

bptato
Copy link
Contributor

@bptato bptato commented Jul 22, 2025

Workaround for #24596.

I also took the liberty to disable it on all targets with GCC, since their documentation claims that it is also enabled on -Os.

Workaround for nim-lang#24596.

I also took the liberty to disable it on all targets with GCC, since
their documentation claims that it is also enabled on -Os.
bptato added a commit to bptato/Nim that referenced this pull request Jul 23, 2025
Alternative to nim-lang#25067; fixes nim-lang#24596.

Pros:
* No codegen changes needed.
* No negative changes in generated code size.
* Works with all standard-conforming C compilers - conceptually, memcpy
  treats both structs as character types, which are compatible with
  all types.

Cons: it's very ugly.
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.

1 participant