https://github.com/shader-slang/slang
Raw File
Tip revision: b059de80b7619e4406dbddf26fd7f2fb7ce6a965 authored by jsmall-nvidia on 14 February 2019, 13:27:46 UTC
* Add cross compile test (#849)
Tip revision: b059de8
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