OLD | NEW |
(Empty) | |
| 1 |
| 2 /* |
| 3 ** Copyright (c) 2012 The Khronos Group Inc. |
| 4 ** |
| 5 ** Permission is hereby granted, free of charge, to any person obtaining a |
| 6 ** copy of this software and/or associated documentation files (the |
| 7 ** "Materials"), to deal in the Materials without restriction, including |
| 8 ** without limitation the rights to use, copy, modify, merge, publish, |
| 9 ** distribute, sublicense, and/or sell copies of the Materials, and to |
| 10 ** permit persons to whom the Materials are furnished to do so, subject to |
| 11 ** the following conditions: |
| 12 ** |
| 13 ** The above copyright notice and this permission notice shall be included |
| 14 ** in all copies or substantial portions of the Materials. |
| 15 ** |
| 16 ** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, |
| 17 ** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF |
| 18 ** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. |
| 19 ** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY |
| 20 ** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, |
| 21 ** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE |
| 22 ** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. |
| 23 */ |
| 24 |
| 25 |
| 26 #ifdef GL_ES |
| 27 precision mediump float; |
| 28 #endif |
| 29 // Extensive testing on #if #else #elif #ifdef, #ifndef and #endif. |
| 30 |
| 31 |
| 32 #define t1 1 |
| 33 |
| 34 #if(t1==1) |
| 35 #define t2 2 |
| 36 #endif |
| 37 |
| 38 #if (t2!=2) |
| 39 #define t3 33 |
| 40 #else |
| 41 #define t3 3 |
| 42 #endif |
| 43 |
| 44 #if (t3!=3) |
| 45 #define t4 4 |
| 46 #elif (t3==3) |
| 47 #define t4 44 |
| 48 #else |
| 49 #define t4 0 |
| 50 #endif |
| 51 |
| 52 #if defined(t5) |
| 53 #define t6 6 |
| 54 #elif (t3!=3) |
| 55 #define t5 5 |
| 56 #elif (t3==3) |
| 57 #define t5 5 |
| 58 #endif |
| 59 |
| 60 #ifdef t5 |
| 61 #define t6 6 |
| 62 #else |
| 63 #define t7 7 |
| 64 #endif |
| 65 |
| 66 #ifndef t8 |
| 67 #define t8 8 |
| 68 #endif |
| 69 |
| 70 #if defined t8 |
| 71 #define t9 |
| 72 #ifdef t9 |
| 73 #define t10 10 |
| 74 #endif |
| 75 #elif |
| 76 #define t11 11 |
| 77 #endif |
| 78 |
| 79 #ifndef t8 |
| 80 #define t12 12 |
| 81 #else |
| 82 #define t12 12 |
| 83 #ifndef t13 |
| 84 #define t13 13 |
| 85 #endif |
| 86 #ifdef t14 |
| 87 #define t15 15 |
| 88 #else |
| 89 #if defined t8 |
| 90 #define t16 16 |
| 91 #endif |
| 92 #endif |
| 93 #endif |
| 94 |
| 95 #ifdef t1 |
| 96 #ifdef t10 |
| 97 #if defined t8 |
| 98 #if defined(t3) |
| 99 #ifndef t20 |
| 100 #define t25 25 |
| 101 #endif |
| 102 #else |
| 103 #define t15 15 |
| 104 #define t24 24 |
| 105 #endif |
| 106 #endif |
| 107 #endif |
| 108 #else |
| 109 #ifdef t21 |
| 110 #define t22 22 |
| 111 #else |
| 112 #define t23 23 |
| 113 #endif |
| 114 #endif |
| 115 #define t7 7 |
| 116 #define t11 11 |
| 117 #define t14 14 |
| 118 #define t15 15 |
| 119 #define t20 20 |
| 120 #define t22 22 |
| 121 #define t23 23 |
| 122 #define t24 42 |
| 123 |
| 124 void main(void) |
| 125 { |
| 126 int sum =0; |
| 127 sum = t1+t2+t3+t4+t5; |
| 128 sum = t6+t7+t8+t9+t10; |
| 129 sum = t11+t12+t13+t14+t15; |
| 130 sum = t16+t20+t22+t23+t25+t24; |
| 131 } |
| 132 |
OLD | NEW |