1617a3babSopenharmony_ci#version 300 es 2617a3babSopenharmony_ci#define ON1 3617a3babSopenharmony_ci#define ON2 4617a3babSopenharmony_cifloat sum = 0.0; 5617a3babSopenharmony_ci 6617a3babSopenharmony_civoid main() 7617a3babSopenharmony_ci{ 8617a3babSopenharmony_ci#if defined(ON1) && (defined(OFF) || defined(ON2)) 9617a3babSopenharmony_ci//yes 10617a3babSopenharmony_ci sum += 1.0; 11617a3babSopenharmony_ci#endif 12617a3babSopenharmony_ci 13617a3babSopenharmony_ci#if !defined(ON1) || (defined(OFF) || (!defined(OFF2) && defined(ON2))) 14617a3babSopenharmony_ci//yes 15617a3babSopenharmony_ci sum += 20.0; 16617a3babSopenharmony_ci#endif 17617a3babSopenharmony_ci 18617a3babSopenharmony_ci#if defined(ON1) && (defined(OFF) || !defined(ON2)) 19617a3babSopenharmony_ci//no 20617a3babSopenharmony_ci sum += 0.1; 21617a3babSopenharmony_ci#endif 22617a3babSopenharmony_ci 23617a3babSopenharmony_ci#if !defined(ON1) || (defined(OFF) || !defined(OFF2) && !defined(ON2)) 24617a3babSopenharmony_ci//no 25617a3babSopenharmony_ci sum += 0.2; 26617a3babSopenharmony_ci#endif 27617a3babSopenharmony_ci 28617a3babSopenharmony_ci#if !defined(ON1) || !defined(OFF) || defined(ON2) && defined(OFF2) 29617a3babSopenharmony_ci//yes 30617a3babSopenharmony_ci sum += 300.0; 31617a3babSopenharmony_ci#endif 32617a3babSopenharmony_ci 33617a3babSopenharmony_ci#if (!defined(ON1) || !defined(OFF) || defined(ON2)) && defined(OFF2) 34617a3babSopenharmony_ci//no 35617a3babSopenharmony_ci sum += 0.4; 36617a3babSopenharmony_ci#endif 37617a3babSopenharmony_ci 38617a3babSopenharmony_ci// sum should be 321.0 39617a3babSopenharmony_ci gl_Position = vec4(sum); 40617a3babSopenharmony_ci} 41617a3babSopenharmony_ci 42617a3babSopenharmony_ci#define ADD(a, b) a + b + ((a) + ((b))); 43617a3babSopenharmony_ci 44617a3babSopenharmony_cifloat foo() 45617a3babSopenharmony_ci{ 46617a3babSopenharmony_ci return ADD(gl_Position.xyxwx, 3.0) // ERROR, should be this line number 47617a3babSopenharmony_ci return ADD(gl_Position.y, 3.0) 48617a3babSopenharmony_ci} 49617a3babSopenharmony_ci 50617a3babSopenharmony_ci#define BIG aonetuhanoethuanoenaoethu snaoetuhs onethausoentuas hnoethaueohnatuoeh santuoehsantouhe snathoensuta hsnoethuasntoe hsnuathoesnuathoenstuh nsoethantseuh toae ua \ 51617a3babSopenharmony_ci antoeh uantheount oentahoent uahnsoethasnutoehansteuo santhu sneoathu snoethasnut oesanthoesna thusenotha nsthasunoeth ausntehsunathoensuathoesnta uhnsoetha usntoeh uanhs unosethu \ 52617a3babSopenharmony_ci antoehunatoehu natoehua oentha neotuhan toehu natoehu ntahoe nutah eu natoheunathoen uasoenuasoent asntoehsan tuosnthnu aohenuath eontha untoh eunth unth anth unth nth nth nt \ 53617a3babSopenharmony_ci a ntoehanu tunth nsont uhansoethausn oehsanthnt heauo eanthuo sh nahnoethansu tohe sanuthoe snathuoesntha snuothe anthusonehtasuntoeh asnuthonsa teauhntoeha onetuha nth \ 54617a3babSopenharmony_ci anoethuan toentauh noethauntohe anuthoe nathu noethaun oethanuthoe nathuoe ntahu enotha unetha ntuhenaothu enotahun eotha ntoehu aoehuntha enotuh aonethau noethu anoethuna toheua \ 55617a3babSopenharmony_ci ontehanutoe hnuathoena aoteha aonetuha 56617a3babSopenharmony_ci 57617a3babSopenharmony_ci// identical 58617a3babSopenharmony_ci#define BIG aonetuhanoethuanoenaoethu snaoetuhs onethausoentuas hnoethaueohnatuoeh santuoehsantouhe snathoensuta hsnoethuasntoe hsnuathoesnuathoenstuh nsoethantseuh toae ua \ 59617a3babSopenharmony_ci antoeh uantheount oentahoent uahnsoethasnutoehansteuo santhu sneoathu snoethasnut oesanthoesna thusenotha nsthasunoeth ausntehsunathoensuathoesnta uhnsoetha usntoeh uanhs unosethu \ 60617a3babSopenharmony_ci antoehunatoehu natoehua oentha neotuhan toehu natoehu ntahoe nutah eu natoheunathoen uasoenuasoent asntoehsan tuosnthnu aohenuath eontha untoh eunth unth anth unth nth nth nt \ 61617a3babSopenharmony_ci a ntoehanu tunth nsont uhansoethausn oehsanthnt heauo eanthuo sh nahnoethansu tohe sanuthoe snathuoesntha snuothe anthusonehtasuntoeh asnuthonsa teauhntoeha onetuha nth \ 62617a3babSopenharmony_ci anoethuan toentauh noethauntohe anuthoe nathu noethaun oethanuthoe nathuoe ntahu enotha unetha ntuhenaothu enotahun eotha ntoehu aoehuntha enotuh aonethau noethu anoethuna toheua \ 63617a3babSopenharmony_ci ontehanutoe hnuathoena aoteha aonetuha 64617a3babSopenharmony_ci 65617a3babSopenharmony_ci// ERROR, one character different 66617a3babSopenharmony_ci#define BIG aonetuhanoethuanoenaoethu snaoetuhs onethausoentuas hnoethaueohnatuoeh santuoehsantouhe snathoensuta hsnoethuasntoe hsnuathoesnuathoenstuh nsoethantseuh toae ua \ 67617a3babSopenharmony_ci antoeh uantheount oentahoent uahnsoethasnutoehansteuo santhu sneoathu snoethasnut oesanthoesna thusenotha nsthasunoeth ausntehsunathoensuathoesnta uhnsoetha usntoeh uanhs unosethu \ 68617a3babSopenharmony_ci antoehunatoehu natoehua oentha neotuhan toehu natoehu ntahoe nutah eu natoheunathoen uasoenuasoent asntoehsan tuosnthnu aohenuath eontha untoh eunth unth anth unth nth nth nt \ 69617a3babSopenharmony_ci a ntoehanu tunth nsont uhansoethasn oehsanthnt heauo eanthuo sh nahnoethansu tohe sanuthoe snathuoesntha snuothe anthusonehtasuntoeh asnuthonsa teauhntoeha onetuha nth \ 70617a3babSopenharmony_ci anoethuan toentauh noethauntohe anuthoe nathu noethaun oethanuthoe nathuoe ntahu enotha unetha ntuhenaothu enotahun eotha ntoehu aoehuntha enotuh aonethau noethu anoethuna toheua \ 71617a3babSopenharmony_ci ontehanutoe hnuathoena aoteha aonetuha 72617a3babSopenharmony_ci 73617a3babSopenharmony_ci#define BIGARGS1(aonthanotehu, bonthanotehu, conthanotehu, donthanotehu, eonthanotehu, fonthanotehu, gonthanotehu, honthanotehu, ionthanotehu, jonthanotehu, konthanotehu) jonthanotehu 74617a3babSopenharmony_ci#define BIGARGS2(aonthanotehu, bonthanotehu, conthanotehu, donthanotehu, eonthanotehu, fonthanotehu, gonthanotehu, honthanotehu, ionthanotehu, jonthanotehu, konthanotehu) jonthanotehu 75617a3babSopenharmony_ci#define BIGARGS3(aonthanotehu, bonthanotehu, conthanotehu, donthanotehu, eonthanotehu, fonthanotehu, gonthanotehu, honthanotehu, ionthanotehu, jonthanotehu, konthanotehu) jonthanotehu 76617a3babSopenharmony_ci#define BIGARGS4(aonthanotehu, bonthanotehu, conthanotehu, donthanotehu, eonthanotehu, fonthanotehu, gonthanotehu, honthanotehu, ionthanotehu, jonthanotehu, konthanotehu) jonthanotehu 77617a3babSopenharmony_ci 78617a3babSopenharmony_ci 79617a3babSopenharmony_ci#define foobar(a, b) a + b 80617a3babSopenharmony_ci 81617a3babSopenharmony_ci#if foobar(1.1, 2.2) 82617a3babSopenharmony_ci#error good macro 83617a3babSopenharmony_ci#else 84617a3babSopenharmony_ci#error bad macro 85617a3babSopenharmony_ci#endif 86617a3babSopenharmony_ci 87617a3babSopenharmony_ci#if foobar(1 88617a3babSopenharmony_ci; 89617a3babSopenharmony_ci# 90617a3babSopenharmony_ci# 91617a3babSopenharmony_ci#endif 92617a3babSopenharmony_ci#if foobar(1, 93617a3babSopenharmony_ci; 94617a3babSopenharmony_ci# 95617a3babSopenharmony_ci# 96617a3babSopenharmony_ci#endif 97617a3babSopenharmony_cifloat c = foobar(1.1, 2.2 98617a3babSopenharmony_ci ); 99617a3babSopenharmony_ci#if foobar(1.1, 2.2 100617a3babSopenharmony_ci) 101617a3babSopenharmony_ci#if foobar(1.1, 2.2 102617a3babSopenharmony_ci#endif 103617a3babSopenharmony_ci#endif 104617a3babSopenharmony_ci 105617a3babSopenharmony_ci#define VAL0 0 106617a3babSopenharmony_ci#define VAL1 1 107617a3babSopenharmony_ci 108617a3babSopenharmony_ci#if UNDEF 109617a3babSopenharmony_ci#error bad 0 110617a3babSopenharmony_ci#else 111617a3babSopenharmony_ci#error good 0 112617a3babSopenharmony_ci#endif 113617a3babSopenharmony_ci 114617a3babSopenharmony_ci#if VAL1 || UNDEF 115617a3babSopenharmony_ci#error good 1 116617a3babSopenharmony_ci#else 117617a3babSopenharmony_ci#error bad 1 118617a3babSopenharmony_ci#endif 119617a3babSopenharmony_ci 120617a3babSopenharmony_ci#if VAL1 && UNDEF // UNDEF ERROR 121617a3babSopenharmony_ci#endif 122617a3babSopenharmony_ci 123617a3babSopenharmony_ci#if VAL0 || UNDEF // UNDEF ERROR 124617a3babSopenharmony_ci#endif 125617a3babSopenharmony_ci 126617a3babSopenharmony_ci#if VAL0 && UNDEF 127617a3babSopenharmony_ci#error bad 2 128617a3babSopenharmony_ci#else 129617a3babSopenharmony_ci#error good 1 130617a3babSopenharmony_ci#endif 131617a3babSopenharmony_ci 132617a3babSopenharmony_ci#if VAL1 || (VAL1 && UNDEF) 133617a3babSopenharmony_ci#error good 3 134617a3babSopenharmony_ci#else 135617a3babSopenharmony_ci#error bad 3 136617a3babSopenharmony_ci#endif 137617a3babSopenharmony_ci 138617a3babSopenharmony_ci#if VAL1 && (VAL1 || UNDEF) 139617a3babSopenharmony_ci#error good 4 140617a3babSopenharmony_ci#else 141617a3babSopenharmony_ci#error bad 4 142617a3babSopenharmony_ci#endif 143617a3babSopenharmony_ci 144617a3babSopenharmony_ci#if VAL1 < VAL1 || VAL1 > VAL1 || UNDEF // UNDEF ERROR 145617a3babSopenharmony_ci#endif 146617a3babSopenharmony_ci 147617a3babSopenharmony_ci#if VAL1 < VAL1 || VAL1 > VAL1 && UNDEF 148617a3babSopenharmony_ci#endif 149617a3babSopenharmony_ci 150617a3babSopenharmony_ci#if VAL1 || UNDEF && UNDEF2 151617a3babSopenharmony_ci#endif 152617a3babSopenharmony_ci 153617a3babSopenharmony_ci#if VAL0 || UNDEF && UNDEF2 // UNDEF ERROR 154617a3babSopenharmony_ci#endif 155617a3babSopenharmony_ci 156617a3babSopenharmony_ci#if (VAL1 || UNDEF) && UNDEF2 // UNDEF2 ERROR 157617a3babSopenharmony_ci#endif 158617a3babSopenharmony_ci 159617a3babSopenharmony_ci#if (VAL0 && UNDEF) || UNDEF2 // UNDEF2 ERROR 160617a3babSopenharmony_ci#endif 161617a3babSopenharmony_ci 162617a3babSopenharmony_ci#line 3000 163617a3babSopenharmony_ci#error line of this error should be 3000 164617a3babSopenharmony_ci 165617a3babSopenharmony_ci#define __LINE__ 30 166617a3babSopenharmony_ci#define __FILE__ 167617a3babSopenharmony_ci#define __VERSION__ 168617a3babSopenharmony_ci#define GL_SOME_EXTENSION 169617a3babSopenharmony_ci#undef __LINE__ 170617a3babSopenharmony_ci#undef __FILE__ 171617a3babSopenharmony_ci#undef __VERSION__ 172617a3babSopenharmony_ci#undef GL_SOME_EXTENSION 173617a3babSopenharmony_ci 174617a3babSopenharmony_ci#line 4000 175617a3babSopenharmony_ci#line 200 % 0 // ERROR, div by 0 176617a3babSopenharmony_ci#if __LINE__ / 0 // ERROR, div by 0 177617a3babSopenharmony_ci#endif 178617a3babSopenharmony_ci 179617a3babSopenharmony_ci#if 7% // ERROR incomplete expression 180617a3babSopenharmony_ci 181617a3babSopenharmony_ci#line 10000 182617a3babSopenharmony_ci#if 0 183617a3babSopenharmony_ci// ERROR, EOF