mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-13 23:43:40 +00:00
cgo: define idents referenced only from macros
This commit is contained in:
committed by
Ron Evans
parent
8068419854
commit
c4867c8743
Vendored
+3
@@ -3,10 +3,13 @@ package main
|
||||
/*
|
||||
#define foo 3
|
||||
#define bar foo
|
||||
#define unreferenced 4
|
||||
#define referenced unreferenced
|
||||
*/
|
||||
import "C"
|
||||
|
||||
const (
|
||||
Foo = C.foo
|
||||
Bar = C.bar
|
||||
Baz = C.referenced
|
||||
)
|
||||
|
||||
Vendored
+2
@@ -47,3 +47,5 @@ type (
|
||||
|
||||
const C.foo = 3
|
||||
const C.bar = C.foo
|
||||
const C.unreferenced = 4
|
||||
const C.referenced = C.unreferenced
|
||||
|
||||
Reference in New Issue
Block a user