Merge pull request #1113 from xorgy/preprocessor-int-min-over-negative-one

Preprocessor: Evaluate INT_MIN / -1 to 0.
This commit is contained in:
John Kessenich
2017-10-19 00:24:05 -06:00
committed by GitHub
4 changed files with 20 additions and 1 deletions

View File

@@ -0,0 +1,14 @@
cppIntMinOverNegativeOne.frag
Shader version: 100
0:? Sequence
0:? Linker Objects
Linked fragment stage:
ERROR: Linking fragment stage: Missing entry point: Each stage requires one entry point
Shader version: 100
0:? Sequence
0:? Linker Objects

View File

@@ -0,0 +1,3 @@
#if (-2147483648 / -1) != 0
#error INT_MIN / -1 should yield 0, something went wrong.
#endif