build: separate compiler and libs
This commit is contained in:
17
compiler/cl/_testlibc/setjmp/in.go
Normal file
17
compiler/cl/_testlibc/setjmp/in.go
Normal file
@@ -0,0 +1,17 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"github.com/goplus/llgo/c"
|
||||
)
|
||||
|
||||
func main() {
|
||||
jb := c.AllocaSigjmpBuf()
|
||||
switch ret := c.Sigsetjmp(jb, 0); ret {
|
||||
case 0:
|
||||
cstr := c.Str("??Hello, setjmp!\n")
|
||||
c.Fprintf(c.Stderr, c.Str("%s"), c.Advance(c.Pointer(c.Advance(cstr, 1)), 1))
|
||||
c.Siglongjmp(jb, 1)
|
||||
default:
|
||||
println("exception:", ret)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user