fixes for buggy GCC compilers
This commit is contained in:
11
tcctest.c
11
tcctest.c
@ -10,6 +10,9 @@
|
|||||||
|
|
||||||
#define C99_MACROS
|
#define C99_MACROS
|
||||||
|
|
||||||
|
/* gcc 2.95.3 does not handle correctly CR in strings or after strays */
|
||||||
|
//#define CORRECT_CR_HANDLING
|
||||||
|
|
||||||
/* test various include syntaxes */
|
/* test various include syntaxes */
|
||||||
|
|
||||||
#define TCCLIB_INC <tcclib.h>
|
#define TCCLIB_INC <tcclib.h>
|
||||||
@ -23,7 +26,8 @@
|
|||||||
|
|
||||||
#include TCCLIB_INC1.h>
|
#include TCCLIB_INC1.h>
|
||||||
|
|
||||||
#include TCCLIB_INC3 ".h"
|
/* gcc 3.2 does not accept that (bug ?) */
|
||||||
|
//#include TCCLIB_INC3 ".h"
|
||||||
|
|
||||||
#include <tcclib.h>
|
#include <tcclib.h>
|
||||||
|
|
||||||
@ -1573,17 +1577,22 @@ void whitespace_test(void)
|
|||||||
pri\
|
pri\
|
||||||
ntf("whitspace:\n");
|
ntf("whitspace:\n");
|
||||||
#endif
|
#endif
|
||||||
|
pf("N=%d\n", 2);
|
||||||
|
|
||||||
#ifdef CORRECT_CR_HANDLING
|
#ifdef CORRECT_CR_HANDLING
|
||||||
pri\
|
pri\
|
||||||
|
ntf("aaa=%d\n", 3);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
pri\
|
pri\
|
||||||
\
|
\
|
||||||
ntf("min=%d\n", 4);
|
ntf("min=%d\n", 4);
|
||||||
printf("len1=%d\n", strlen("
|
printf("len1=%d\n", strlen("
|
||||||
|
"));
|
||||||
#ifdef CORRECT_CR_HANDLING
|
#ifdef CORRECT_CR_HANDLING
|
||||||
str = "
|
str = "
|
||||||
";
|
";
|
||||||
|
printf("len1=%d str[0]=%d\n", strlen(str), str[0]);
|
||||||
#endif
|
#endif
|
||||||
printf("len1=%d\n", strlen("
|
printf("len1=%d\n", strlen("
|
||||||
a
|
a
|
||||||
|
|||||||
Reference in New Issue
Block a user