diff options
author | dje <dje@138bc75d-0d04-0410-961f-82ee72b054a4> | 1996-01-15 22:25:24 +0000 |
---|---|---|
committer | dje <dje@138bc75d-0d04-0410-961f-82ee72b054a4> | 1996-01-15 22:25:24 +0000 |
commit | b97b38c02c932375b9aa195545c341707cd5038d (patch) | |
tree | 79c4f03f1d011640a7b270160132fb58e1333970 /gcc/c-lex.c | |
parent | 85b4e11abc8fcf9e0f31752d50fc6fb75e3d848c (diff) | |
download | gcc-b97b38c02c932375b9aa195545c341707cd5038d.tar.gz |
* 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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@10999 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/c-lex.c')
-rw-r--r-- | gcc/c-lex.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/gcc/c-lex.c b/gcc/c-lex.c index 210c365dda8..51479beb53f 100644 --- a/gcc/c-lex.c +++ b/gcc/c-lex.c @@ -1,5 +1,5 @@ /* Lexical analyzer for C and Objective C. - Copyright (C) 1987, 88, 89, 92, 94, 1995 Free Software Foundation, Inc. + Copyright (C) 1987, 88, 89, 92, 94, 95, 1996 Free Software Foundation, Inc. This file is part of GNU CC. @@ -402,7 +402,7 @@ check_newline () return handle_sysv_pragma (finput, c); #else /* !HANDLE_SYSV_PRAGMA */ #ifdef HANDLE_PRAGMA - HANDLE_PRAGMA (finput); + HANDLE_PRAGMA (finput, c); #endif /* HANDLE_PRAGMA */ goto skipline; #endif /* !HANDLE_SYSV_PRAGMA */ @@ -419,7 +419,8 @@ check_newline () && ((c = getc (finput)) == ' ' || c == '\t' || c == '\n')) { #ifdef DWARF_DEBUGGING_INFO - if ((debug_info_level == DINFO_LEVEL_VERBOSE) + if (c != '\n' + && (debug_info_level == DINFO_LEVEL_VERBOSE) && (write_symbols == DWARF_DEBUG)) dwarfout_define (lineno, get_directive_line (finput)); #endif /* DWARF_DEBUGGING_INFO */ @@ -435,7 +436,8 @@ check_newline () && ((c = getc (finput)) == ' ' || c == '\t' || c == '\n')) { #ifdef DWARF_DEBUGGING_INFO - if ((debug_info_level == DINFO_LEVEL_VERBOSE) + if (c != '\n' + && (debug_info_level == DINFO_LEVEL_VERBOSE) && (write_symbols == DWARF_DEBUG)) dwarfout_undef (lineno, get_directive_line (finput)); #endif /* DWARF_DEBUGGING_INFO */ @@ -674,9 +676,8 @@ linenum: /* skip the rest of this line. */ skipline: - if (c == '\n') - return c; - while ((c = getc (finput)) != EOF && c != '\n'); + while (c != '\n' && c != EOF) + c = getc (finput); return c; } |