mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
Add @const attribute for macros, for better error messages with constant macros #1293
This commit is contained in:
@@ -149,7 +149,7 @@ const bool NETBSD = LIBC && OS_TYPE == NETBSD;
|
||||
const bool WASI = LIBC && OS_TYPE == WASI;
|
||||
const bool WASM_NOLIBC @builtin = !LIBC && ARCH_TYPE == ArchType.WASM32 || ARCH_TYPE == ArchType.WASM64;
|
||||
|
||||
macro bool os_is_darwin()
|
||||
macro bool os_is_darwin() @const
|
||||
{
|
||||
$switch (OS_TYPE)
|
||||
$case IOS:
|
||||
@@ -162,7 +162,7 @@ macro bool os_is_darwin()
|
||||
$endswitch
|
||||
}
|
||||
|
||||
macro bool os_is_posix()
|
||||
macro bool os_is_posix() @const
|
||||
{
|
||||
$switch (OS_TYPE)
|
||||
$case IOS:
|
||||
|
||||
Reference in New Issue
Block a user