diff options
author | law <law@138bc75d-0d04-0410-961f-82ee72b054a4> | 1998-11-25 08:54:10 +0000 |
---|---|---|
committer | law <law@138bc75d-0d04-0410-961f-82ee72b054a4> | 1998-11-25 08:54:10 +0000 |
commit | 37a298b5a87f0c63ee8bc9515c2895001a2f811a (patch) | |
tree | 80d2563d80fdd9f18e7cc3d3c913e75d8eba1e56 /gcc/c-lex.c | |
parent | 9eccfb31c056878249819a8e27207b99041528f7 (diff) | |
download | gcc-37a298b5a87f0c63ee8bc9515c2895001a2f811a.tar.gz |
* gcc.c: Split out Objective-C specs to...
* objc/lang-specs.h: here. (New file.) Make the specs cpplib
aware.
* c-lex.c (init_parse): Always initialize the filename global.
* objc/objc-act.c (lang_init): Always call check_newline at
beginning of file.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@23850 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/c-lex.c')
-rw-r--r-- | gcc/c-lex.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/gcc/c-lex.c b/gcc/c-lex.c index b6d8295606c..934f251b354 100644 --- a/gcc/c-lex.c +++ b/gcc/c-lex.c @@ -189,21 +189,22 @@ init_parse (filename) #ifdef IO_BUFFER_SIZE setvbuf (finput, (char *) xmalloc (IO_BUFFER_SIZE), _IOFBF, IO_BUFFER_SIZE); #endif -#endif /* !USE_CPPLIB */ - - init_lex (); - -#if USE_CPPLIB +#else /* !USE_CPPLIB */ parse_in.show_column = 1; if (! cpp_start_read (&parse_in, filename)) abort (); + if (filename == 0 || !strcmp (filename, "-")) + filename = "stdin"; + /* cpp_start_read always puts at least one line directive into the token buffer. We must arrange to read it out here. */ yy_cur = parse_in.token_buffer; yy_lim = CPP_PWRITTEN (&parse_in); #endif + init_lex (); + return filename; } |