extern variables and object-like macro consts

This commit is contained in:
2026-06-17 21:52:05 +02:00
parent f5605fd3ec
commit 19e9fbdd4b
33 changed files with 3136 additions and 116 deletions
+15 -3
View File
@@ -6,7 +6,14 @@ use_enum :: c_func(value native.Imported_Enum) void
use_opaque :: c_func(value native.Imported_Handle) void
main :: func() void {
_ = native.IMPORTED_MACRO
_ = native.IMPORTED_BAD_EXPR
_ = native.IMPORTED_REDEFINED_BAD
_ = native.IMPORTED_GONE
_ = native.IMPORTED_TOO_MANY_COLOR
_ = native.IMPORTED_SIGNED_NARROW_BAD
_ = native.IMPORTED_SHADOW_UNSUPPORTED
_ = native.IMPORTED_FLOAT_OVERFLOW
_ = native.IMPORTED_EMPTY_SHADOW
_ = native.imported_by_value()
_ = native.imported_bitfield()
_ = native.imported_packed()
@@ -16,6 +23,11 @@ main :: func() void {
_ = native.imported_anonymous()
_ = native.imported_volatile()
_ = native.imported_bool()
_ = native.imported_global
_ = native.imported_inline(1)
native.imported_const_global = 1
native.imported_const_array = [1, 2]
native.imported_typedef_const_array = [1, 2]
native.imported_typedef_const_array[0] = 1
native.imported_const_array_record.values[0] = 42
_ = native.imported_tls_global
_ = native.imported_inline_variadic(1)
}