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.
@Araq Araq closed this Sep 10, 2025
@Araq Araq reopened this Sep 10, 2025
@Araq
Copy link
Member

Araq commented Sep 11, 2025

CI fails with some super weird changes in the stack tracing. No idea, ping @ringabout

@Araq Araq closed this Sep 12, 2025
@Araq Araq reopened this Sep 12, 2025
@ringabout
Copy link
Member

I think it marks a real issue of the change, though I have no clue for now

@ringabout
Copy link
Member

ringabout commented Sep 12, 2025

It seems that some C warnings disturbing the output comparing of testament, which causes CI to fail. I guess warnings are needed to be suppressed somehow

+/home/vsts/.cache/nim/trunnableexamples_d/runnableExamples/@[email protected]:163:291: warning: initialization discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
2025-09-12T13:29:12.4470025Z +  163 | N_LIB_PRIVATE TNimTypeV2 NTIv2__4rjmsYJxlo49cXH3mEZVmZg_ = {.destructor = ((void*) rttiDestroy__systemZexceptions_u56), .size = sizeof(tyObject_OverflowDefect__4rjmsYJxlo49cXH3mEZVmZg), .align = ((NI16) NIM_ALIGNOF(tyObject_OverflowDefect__4rjmsYJxlo49cXH3mEZVmZg)), .depth = 4, .display = TM__TzI3paKQY09cLjc9cmCvur3A_3, .traceImpl = ((void*) eqtrace___system_u5268), .flags = 0};
2025-09-12T13:29:12.4470814Z +      |                                                                                                                                                                                                                                                                                                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

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

Successfully merging this pull request may close these issues.

3 participants