"unterminated character constant");
goto while2end;
}
- if (pedantic && multiline_string_line == 0) {
- pedwarn_with_line (line_for_error (start_line),
- "string constant runs past end of line");
- }
- if (multiline_string_line == 0)
+ if (multiline_string_line == 0) {
+ if (pedantic)
+ pedwarn_with_line (line_for_error (start_line),
+ "string constant runs past end of line");
multiline_string_line = ip->lineno - 1;
+ }
break;
case '\\':
*eofp = 1;
break;
}
- if (pedantic || match == '\'') {
+ if (match == '\'') {
error_with_line (line_for_error (start_line),
"unterminated string or character constant");
bp--;
/* If not traditional, then allow newlines inside strings. */
if (count_newlines)
++*count_newlines;
- if (multiline_string_line == 0)
+ if (multiline_string_line == 0) {
+ if (pedantic)
+ pedwarn_with_line (line_for_error (start_line),
+ "string constant runs past end of line");
multiline_string_line = start_line;
+ }
} else if (c == match)
break;
}