https://github.com/shader-slang/slang
Raw File
Tip revision: 195af97638e59539cd9c14d16338789b6d683f3f authored by Yong He on 12 April 2023, 01:14:49 UTC
Fix missing `f` suffix for float lits in CUDA backend. (#2791)
Tip revision: 195af97
undef.slang
//TEST:SIMPLE:
// #undef support

// warning: undef of something not defined
#undef FOO

#define BAR 1.0f

float foo() { return BAR + 2.0; }

#ifdef BAR
// okay
#else
#error not okay
#endif

#undef BAR

typedef float BAR;

BAR bar() { return 2.0; }

#if !defined(BAR)
// okay
#else
#error not okay
#endif


#define FOO

#undef FOO
back to top