diff options
author | Doug Evans <dje@gnu.org> | 1996-01-15 22:25:24 +0000 |
---|---|---|
committer | Doug Evans <dje@gnu.org> | 1996-01-15 22:25:24 +0000 |
commit | 05a81fe58ab528bf1fbb9d0d2deaab2285bdb518 (patch) | |
tree | 79c4f03f1d011640a7b270160132fb58e1333970 /gcc/c-common.c | |
parent | 9298a6b0eb75d3f025250cd3f626a7b74f470fe9 (diff) | |
download | gcc-05a81fe58ab528bf1fbb9d0d2deaab2285bdb518.tar.gz |
c-lex.c (check_newline): Pass character after `#pragma' to HANDLE_PRAGMA.
* c-lex.c (check_newline): Pass character after `#pragma' to
HANDLE_PRAGMA. Don't call get_directive_line if at end of line.
* c-common.c (get_directive_line): Watch for EOF.
* h8300/h8300.h (HANDLE_PRAGMA): New argument `c'.
Must issue `return' now.
* i960/i960.h (HANDLE_PRAGMA): Likewise.
* sh/sh.h (HANDLE_PRAGMA): Likewise.
* nextstep.h (HANDLE_PRAGMA): Likewise.
* h8300/h8300.c (handle_pragma): New argument `ch'.
Simplify pragma processing. Delete support for `#pragma section'.
* i960/i960.c (process_pragma): New argument `c'. Change result to
terminating character.
* nextstep.c (handle_pragma): Likewise.
* sh/sh.c (handle_pragma): Likewise. Also simplified.
From-SVN: r10999
Diffstat (limited to 'gcc/c-common.c')
-rw-r--r-- | gcc/c-common.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/gcc/c-common.c b/gcc/c-common.c index ad613196b19..58e9df02cd9 100644 --- a/gcc/c-common.c +++ b/gcc/c-common.c @@ -2163,7 +2163,10 @@ truthvalue_conversion (expr) a part of the directive. The value is a string in a reusable buffer. It remains valid - only until the next time this function is called. */ + only until the next time this function is called. + + The terminating character ('\n' or EOF) is left in FINPUT for the + caller to re-read. */ char * get_directive_line (finput) @@ -2207,7 +2210,8 @@ get_directive_line (finput) continue; /* Detect the end of the directive. */ - if (c == '\n' && looking_for == 0) + if (looking_for == 0 + && (c == '\n' || c == EOF)) { ungetc (c, finput); c = '\0'; |