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 // testing for char constants in #if and #elif |
| 30 // Also checking whether reserved words can be redefined. |
| 31 |
| 32 #define t1 c |
| 33 #define t2 d |
| 34 #define asm a |
| 35 |
| 36 #if(t1==c) |
| 37 #define t3 3 |
| 38 #elif(t1==d) |
| 39 #define t4 4 |
| 40 #elif(t2==c) |
| 41 #define t5 5 |
| 42 #endif |
| 43 |
| 44 #ifndef t1 |
| 45 #define t7 7 |
| 46 #elif (t2==d) |
| 47 #define t6 6 |
| 48 #endif |
| 49 |
| 50 #if (t2=='d') |
| 51 #define half 5 |
| 52 #else |
| 53 #define half 8 |
| 54 #endif |
| 55 |
| 56 #ifdef t22 |
| 57 #define x 5 |
| 58 #endif |
| 59 |
| 60 void main(void) |
| 61 { |
| 62 int sum =0,a=9; |
| 63 |
| 64 sum = half + sum; |
| 65 sum = asm + a; |
| 66 |
| 67 } |
| 68 |
OLD | NEW |