https://github.com/shader-slang/slang
Raw File
Tip revision: e752a957c452abc1db2e160c738496b47aad2858 authored by Yong He on 01 March 2024, 21:48:46 UTC
Update doc TOC (#3657)
Tip revision: e752a95
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