Unified · Split
| @@ -944,19 +944,16 @@ static uint8_t *parse_pp_string(uint8_t *p, · 943 unmodified lines | ||
| 944 | 944 | } |
| 945 | 945 | } |
| 946 | 946 | } else if (c == '\n') { |
| 947 | − file->line_num++; | |
| 948 | − goto add_char; | |
| 947 | + tcc_error("missing terminating %c character",sep); | |
| 949 | 948 | } else if (c == '\r') { |
| 950 | 949 | PEEKC_EOB(c, p); |
| 951 | 950 | if (c != '\n') { |
| 952 | 951 | if (str) |
| 953 | 952 | cstr_ccat(str, '\r'); |
| 954 | 953 | } else { |
| 955 | − file->line_num++; | |
| 956 | − goto add_char; | |
| 954 | + tcc_error("missing terminating %c character",sep); | |
| 957 | 955 | } |
| 958 | 956 | } else { |
| 959 | − add_char: | |
| 960 | 957 | if (str) |
| 961 | 958 | cstr_ccat(str, c); |
| 962 | 959 | p++; |
| @@ -4253,11 +4253,6 @@ void func_arg_test(void) · 4252 unmodified lines | ||
| 4253 | 4253 | /* gcc 2.95.3 does not handle correctly CR in strings or after strays */ |
| 4254 | 4254 | #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 | 4256 | /* keep this as the last test because GCC messes up line-numbers |
| 4262 | 4257 | with the ^L^K^M characters below */ |
| 4263 | 4258 | void whitespace_test(void) |
| @@ -4279,20 +4274,6 @@ ntf("aaa=%d\n", 3); · 15 unmodified lines | ||
| 4279 | 4274 | \ |
| 4280 | 4275 | ntf("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 | 4277 | #ifdef __LINE__ |
| 4297 | 4278 | printf("__LINE__ defined\n"); |
| 4298 | 4279 | #endif |