www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 24181] New: dmd compiled tinylisp.c runtime error

https://issues.dlang.org/show_bug.cgi?id=24181

          Issue ID: 24181
           Summary: dmd compiled tinylisp.c runtime error
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: blocker
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: mingwu gmail.com

Created attachment 1893
  --> https://issues.dlang.org/attachment.cgi?id=1893&action=edit
single file, 99 lines tinylisp.c

I'm playing with

https://github.com/Robert-van-Engelen/tinylisp/blob/main/src/tinylisp.c

single file, 99 lines

with GCC:
```
$ make -B tinylisp 
cc    -c -o tinylisp.o tinylisp.c
cc   tinylisp.o   -o tinylisp
$ ./tinylisp 
tinylisp
930>(+ 2 3)
5
```

wich dmd (importC):
```

$ ./tinylisp 
tinylisp
930>(+ 2 3)
ERR
930>^C

```

something goes wrong at runtime for such simple example.

--
Oct 08 2023