summaryrefslogtreecommitdiff
path: root/gcc/cpperror.c
diff options
context:
space:
mode:
authorzack <zack@138bc75d-0d04-0410-961f-82ee72b054a4>2000-04-14 23:29:45 +0000
committerzack <zack@138bc75d-0d04-0410-961f-82ee72b054a4>2000-04-14 23:29:45 +0000
commite2f9a79f86f078c40323984d2ee549e1ba2b19d4 (patch)
treec91bee0467728e26a3ab2b06fce2d27db8e99983 /gcc/cpperror.c
parent96e3d3b7074bc4b9e41ff776c9e2dbb26f348076 (diff)
downloadgcc-e2f9a79f86f078c40323984d2ee549e1ba2b19d4.tar.gz
* cpplex.c (cpp_output_tokens, cpp_scan_buffer_nooutput): New public
interfaces. (safe_fwrite, output_line_command): New static functions. (cpp_expand_to_buffer): Now private to cpplib. (cpp_scan_buffer): Take a printer. * cpphash.h: Update prototypes. * cpplib.h: Update prototypes. (cpp_printer): New. (cpp_buffer): Remove last_nominal_fname. (cpp_reader): Remove lineno. * cppmain.c: Use a cpp_printer. * fix-header.c: No need to inhibit line commands. Call cpp_start_read with no printer. * cpperror.c (cpp_notice_from_errno): Provide default name. * cppfiles.c (make_IHASH, _cpp_fake_ihash): New functions. (find_include_file, cpp_read_file): Use make_IHASH. (file_cleanup): Set control_macro and clear input_stack_listing_current here. (_cpp_execute_include): Don't output entering-file marker. * cpphash.c (special_symbol): Look for the line number in the buffer, not the reader. (_cpp_macroexpand): No need to disable line commands. (_cpp_dump_definition): No need to generate line commands. (dump_hash_helper): Remove excess newline from output. * cppinit.c (dump_special_to_buffer): No need to generate line commands. (cpp_printer_init): New. (cpp_start_read): Take a printer, and start it up if it's not NULL. No need to generate line commands. (cpp_finish): Expect no buffers stacked at all. Take a printer argument, and flush the output buffer if it's not NULL. * cpplex.c (_cpp_lex_token): Return EOF if there's no buffer. Don't put two hashes at the beginning of an assertion. (cpp_get_token): Don't increment pfile->lineno or emit line commands here. Return EOF if there's no buffer when we get EOF. * cpplib.c (do_define, skip_if_group): No need to disable line commands. (_cpp_output_line_command): Delete function. (do_line): Don't emit line commands here, but set things up so they will be emitted if necessary. Use _cpp_fake_ihash to make unique nominal_fnames if necessary. (do_elif, do_else, _cpp_handle_eof): Call cpp_error_with_line with 0 for column, not -1. (_cpp_handle_eof): Don't set the control macro here. Don't clear input_stack_listing_current here. Don't emit line commands. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@33159 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cpperror.c')
-rw-r--r--gcc/cpperror.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/cpperror.c b/gcc/cpperror.c
index 0ba2561bdcb..0e8afc4ffa9 100644
--- a/gcc/cpperror.c
+++ b/gcc/cpperror.c
@@ -440,5 +440,7 @@ cpp_notice_from_errno (pfile, name)
cpp_reader *pfile;
const char *name;
{
+ if (name[0] == '\0')
+ name = "stdout";
cpp_notice (pfile, "%s: %s", name, xstrerror (errno));
}