John Kessenich | 38c507e | 2013-02-08 18:56:56 +0000 | [diff] [blame] | 1 | #version 110 |
| 2 | |
John Kessenich | 464f6d9 | 2013-02-06 00:14:16 +0000 | [diff] [blame] | 3 | #define ON |
| 4 | |
| 5 | float sum = 0.0; |
| 6 | |
| 7 | void main() |
| 8 | { |
| 9 | |
| 10 | #ifdef ON |
| 11 | //yes |
| 12 | sum += 1.0; |
| 13 | #endif |
| 14 | |
| 15 | #ifdef OFF |
| 16 | //no |
| 17 | sum += 20.0; |
| 18 | #endif |
| 19 | |
| 20 | #if defined(ON) |
| 21 | //yes |
| 22 | sum += 300.0; |
| 23 | #endif |
| 24 | |
| 25 | #if defined(OFF) |
| 26 | //no |
| 27 | sum += 4000.0; |
| 28 | #endif |
| 29 | |
| 30 | #if !defined(ON) |
| 31 | //no |
| 32 | sum += 50000.0; |
| 33 | #endif |
| 34 | |
| 35 | #if !defined(OFF) |
| 36 | //yes |
| 37 | sum += 600000.0; |
| 38 | #endif |
| 39 | |
| 40 | #if defined (ON) && defined (OFF) |
| 41 | //no |
| 42 | sum += 7000000.0; |
| 43 | #endif |
| 44 | |
| 45 | #if defined ( ON ) && ! defined(OFF) |
| 46 | //yes |
| 47 | sum += 80000000.0; |
| 48 | #endif |
| 49 | |
| 50 | #if defined(OFF) || defined(ON) |
| 51 | //yes |
| 52 | sum += 900000000.0; |
| 53 | #endif |
| 54 | |
| 55 | // sum should be 980600301.0 |
| 56 | gl_Position = vec4(sum); |
| 57 | } |
John Kessenich | fcb4ed0 | 2013-12-30 20:34:28 +0000 | [diff] [blame] | 58 | |
| 59 | #define FUNC(a,b) a+b |
| 60 | // needs to be last test in file due to syntax error |
John Kessenich | 31a51be | 2016-07-19 14:32:52 -0600 | [diff] [blame] | 61 | void foo986(){ FUNC( (((2)))), 4); } // ERROR, too few arguments ) |