Closed c-blake closed 2 weeks ago
Possibly also of interest, I tried the same Uid/Gid test program from the linked issue on Nim-1.2, 1.4, 1.6 and it worked with both gcc & clang with either cpp
or gcc-14 with every combination.
So, it seems this is a relatively recent problem and git bisecting Nim could probably isolate the changes that caused it.
Possibly also of interest, I tried the same Uid/Gid test program from the linked issue on Nim-1.2, 1.4, 1.6 and it worked with both gcc & clang with either cpp or gcc-14 with every combination.
Probably not because it has been broken with old versions with ORC. It works well with refc.
Aha - yes, I did not take the default gc/mm changing into account in my tests. Good catch!
Description
Nim Version
nim-devel HEAD from yesterday
Current Output
The example program fails under
nim cpp --cc=gcc
ornim cpp --cc=clang
with any backend versions and withnim c --cc=gcc typeAliasSeq.nim
under gcc-14 (without--passC=-Wno-error=incompatible-pointer-types
- it works with that). The error message is roughly the same in all 3 failure cases:Expected Output
Should compile and run without errors. It does so with
nim c --cc=clang
, or with early gcc versions and --cc=gcc, but does NOT withnim cpp -cc=clang
or later gcc versions.Possible Solution
Commenting out the
Uid
type and its two procs makes the problem go away. This is admittedly more of a "hint" to the solution and relates to my issue title than an actual solution.Additional Information
The problem also goes away if
cuint
is changed to simplyint
(orint8
or etc. magic int types). So, AFAICT, the problem may only apply toimportc
types, but it may also be more broad like generic types, etc. Worth making a test that tries several things before concluding that it's solved.