Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix struct stat #22161

Merged
merged 1 commit into from
Jun 27, 2023
Merged

fix struct stat #22161

merged 1 commit into from
Jun 27, 2023

Conversation

arnetheduck
Copy link
Contributor

Undo damage of #14170

@Araq Araq merged commit 4b76129 into nim-lang:devel Jun 27, 2023
19 checks passed
@github-actions
Copy link
Contributor

Thanks for your hard work on this PR!
The lines below are statistics of the Nim compiler built from 4b76129

Hint: mm: orc; opt: speed; options: -d:release
168057 lines; 8.745s; 612.219MiB peakmem

@c-blake
Copy link
Contributor

c-blake commented Jun 27, 2023

As done here, this program no longer compiles:

import posix, tables

type Foo = object
  bar: Stat
  x: string

proc foo() =
  var f = initTable[int, Foo](4)
  f[0] = Foo()

foo()

because the generated C refers to a not defined reserved field of the C struct (It's called __glibc_reserved for me). There are also problems with many other tables procs, and presumably many other uses of Stat.

@Araq mentioned in #14170 needing a new {.padding.} or {.hidden.} annotation, also mentioned in the RFC mentioned there. There may be a more specific workaround here, but you might consider rolling back this change until it is fixed.

Araq added a commit that referenced this pull request Jun 27, 2023
@Araq Araq mentioned this pull request Jun 27, 2023
Araq added a commit that referenced this pull request Jun 27, 2023
Revert "fix struct stat (#22161)"

This reverts commit 4b76129.
bung87 pushed a commit to bung87/Nim that referenced this pull request Jul 29, 2023
bung87 pushed a commit to bung87/Nim that referenced this pull request Jul 29, 2023
Revert "fix struct stat (nim-lang#22161)"

This reverts commit 4b76129.
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.

None yet

4 participants