* cppfiles.c: Move all default-#defines to top of file. (open_include_file): Replace by lookup_include_file. (read_with_read, read_file): Merged into read_include_file. (stack_include_file, purge_cache): New functions. (close_cached_fd): Delete. (lookup_include_file, read_include_file, _cpp_pop_file_buffer): Cache the in-memory buffer, not the file descriptor. * cpphash.h (struct include_file): Add buffer, st, refcnt, mapped fields. (xcnew): New utility macro. (DO_NOT_REREAD, NEVER_REREAD): Move up by struct include_file. * cpplib.h (struct cpp_buffer): Remove mapped field. * cpplex.c (parse_string): Accept backslash space newline as a line continuation. (lex_line): Likewise. (_cpp_get_token): Remove hard limit on macro nesting. testsuite: * gcc.dg/cpp/backslash.c: New test. From-SVN: r36347
22 lines
478 B
C
22 lines
478 B
C
/* Test backslash newline with and without trailing spaces. */
|
|
|
|
#define alpha(a, b, c) \
|
|
a, \
|
|
b, \
|
|
c
|
|
|
|
/* Note the trailing whitespace on the next three lines. */
|
|
#define beta(a, b, c) \
|
|
a, \
|
|
b, \
|
|
c
|
|
|
|
/* { dg-warning "separated by space" "space" { target *-*-* } 9 } */
|
|
/* { dg-warning "separated by space" "tab" { target *-*-* } 10 } */
|
|
/* { dg-warning "separated by space" "space and tab" { target *-*-* } 11 } */
|
|
|
|
int x[] = {
|
|
alpha(1, 2, 3),
|
|
beta(4, 5, 6)
|
|
};
|