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 // tests for macro redifinition (t2) and the #if and #else nestings. |
| 30 // takes care of elif also. |
| 31 |
| 32 #define t1 (1+2) |
| 33 #define t2 2 |
| 34 #define t2 3 |
| 35 |
| 36 // testing the if depth |
| 37 #if (t1==3) |
| 38 #define t3 3 |
| 39 #if defined t2 |
| 40 #define t4 4 |
| 41 #if defined(t3) |
| 42 #define t5 5 |
| 43 #ifdef t5 |
| 44 #define t6 6 |
| 45 #ifndef t7 |
| 46 #define t7 7 |
| 47 #else |
| 48 #define t8 8 |
| 49 #endif |
| 50 #endif |
| 51 #else |
| 52 #ifndef t8 |
| 53 #define t8 8 |
| 54 #elif (t8==8) |
| 55 #define t9 9 |
| 56 #else |
| 57 #if defined t7 |
| 58 #define t9 9 |
| 59 #endif |
| 60 #endif |
| 61 #endif |
| 62 #else |
| 63 #define t10 10 |
| 64 #endif |
| 65 #endif |
| 66 |
| 67 |
| 68 #define t8 8 |
| 69 #define t9 9 |
| 70 #define t10 10 |
| 71 |
| 72 void main(void) |
| 73 { |
| 74 int sum=1 ; |
| 75 sum = t1+t2; |
| 76 sum = t3+t4; |
| 77 sum = t5+t6; |
| 78 sum = t7+t8; |
| 79 sum = t9+t10; |
| 80 } |
| 81 |
OLD | NEW |