Skip to content

Generate c code cannot compile with recent devel version #13645

Closed
@slangmgh

Description

@slangmgh

With latest devel version ,the code can be compiled with -d:release, but not without release mode. The version about two days before is fine.

Example

# a.nim
import times
echo now()

Current Output

> nim c -d:release a.nim
Hint: 39170 LOC; 0.788 sec; 31.332MiB peakmem; Release build; proj: a; out: D:\Work\Stock\a.exe [SuccessX]

> nim c a.nim
CC: stdlib_times.nim                                                                                                  
stdlib_times.nim.c                                                                                                    
D:\Tmp\Temp\vcc\nimcache\d\stdlib_times.nim.c(310) : error C2059: syntax error : ','                                  
D:\Tmp\Temp\vcc\nimcache\d\stdlib_times.nim.c(310) : error C2143: syntax error : missing ')' before '('               
D:\Tmp\Temp\vcc\nimcache\d\stdlib_times.nim.c(310) : error C2091: function returns function                           
D:\Tmp\Temp\vcc\nimcache\d\stdlib_times.nim.c(310) : error C2059: syntax error : ')'                                  
D:\Tmp\Temp\vcc\nimcache\d\stdlib_times.nim.c(310) : error C2085: 'res' : not in formal parameter list                
D:\Tmp\Temp\vcc\nimcache\d\stdlib_times.nim.c(311) : error C2085: 'toBiggestFloat__hTpm9cXKgh17pxyZUsNnUyQsystem' : no
t in formal parameter list                                                                                            
D:\Tmp\Temp\vcc\nimcache\d\stdlib_times.nim.c(312) : error C2085: 'nimFrame' : not in formal parameter list           
.......

$ nim -v
Nim Compiler Version 1.1.1 [Windows: i386]
Compiled at 2020-03-14
Copyright (c) 2006-2019 by Andreas Rumpf

active boot switches: -d:release

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions