History

Fix wrong handling of strings which do not end properly at the end of line

Ziyao committed 4 years ago

Commit e588b651 parent a83b2852 files · +2 −24Browse files

Showing the changes to tests (1 of 2 files). Show all

Unified · Split

tests/tcctest.c+0−19
@@ -4253,11 +4253,6 @@ void func_arg_test(void) · 4252 unmodified lines
4253/* gcc 2.95.3 does not handle correctly CR in strings or after strays */4253/* gcc 2.95.3 does not handle correctly CR in strings or after strays */
4254#define CORRECT_CR_HANDLING4254#define CORRECT_CR_HANDLING
4255 4255
4256/* deprecated and no longer supported in gcc 3.3 */
4257#ifdef __TINYC__
4258# define ACCEPT_CR_IN_STRINGS
4259#endif
4260
4261/* keep this as the last test because GCC messes up line-numbers4256/* keep this as the last test because GCC messes up line-numbers
4262 with the ^L^K^M characters below */4257 with the ^L^K^M characters below */
4263void whitespace_test(void)4258void whitespace_test(void)
@@ -4279,20 +4274,6 @@ ntf("aaa=%d\n", 3); · 15 unmodified lines
4279\4274\
4280ntf("min=%d\n", 4);4275ntf("min=%d\n", 4);
4281 4276
4282#ifdef ACCEPT_CR_IN_STRINGS
4283 printf("len1=%d\n", strlen("
4284"));
4285#ifdef CORRECT_CR_HANDLING
4286 str = "
4287";
4288 printf("len1=%d str[0]=%d\n", strlen(str), str[0]);
4289#endif
4290 printf("len1=%d\n", strlen(" a
4291"));
4292#else
4293 printf("len1=1\nlen1=1 str[0]=10\nlen1=3\n");
4294#endif /* ACCEPT_CR_IN_STRINGS */
4295
4296#ifdef __LINE__4277#ifdef __LINE__
4297 printf("__LINE__ defined\n");4278 printf("__LINE__ defined\n");
4298#endif4279#endif

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t