diff options
author | borutr <borutr@4a8a32a2-be11-0410-ad9d-d568d2c75423> | 2010-01-24 17:03:14 +0000 |
---|---|---|
committer | borutr <borutr@4a8a32a2-be11-0410-ad9d-d568d2c75423> | 2010-01-24 17:03:14 +0000 |
commit | 755453312f2698d4d0e70cd618d3e3902ff368f3 (patch) | |
tree | 45a81343dd74b542e22a105ae0f6368e0bebe11f /support/cpp/libcpp/errors.c | |
parent | 81ff3a4fee5c75991a790d3a2e7c899627334920 (diff) |
* src/z80/gen.c:
fixed declaration in the middle of the block
* support/cpp/ansidecl.h, support/cpp/libcpp/directives.c,
support/cpp/libcpp/errors.c, support/cpp/libcpp/init.c,
support/cpp/libcpp/internal.h, support/cpp/libcpp/lex.c,
support/cpp/libiberty.h, support/cpp/libiberty/hex.c,
support/cpp/libiberty/md5.c, support/cpp/libiberty/splay-tree.c,
support/cpp/md5.h:
SDCPP synchronized with GCC CPP release version 4.4.3
git-svn-id: https://svn.code.sourceforge.net/p/sdcc/code/trunk/sdcc@5652 4a8a32a2-be11-0410-ad9d-d568d2c75423
Diffstat (limited to 'support/cpp/libcpp/errors.c')
-rw-r--r-- | support/cpp/libcpp/errors.c | 82 |
1 files changed, 41 insertions, 41 deletions
diff --git a/support/cpp/libcpp/errors.c b/support/cpp/libcpp/errors.c index f756ca7c5..7c379dfea 100644 --- a/support/cpp/libcpp/errors.c +++ b/support/cpp/libcpp/errors.c @@ -49,18 +49,18 @@ print_location (cpp_reader *pfile, source_location line, unsigned int col) lin = SOURCE_LINE (map, line); if (col == 0) - { - col = SOURCE_COLUMN (map, line); - if (col == 0) - col = 1; - } + { + col = SOURCE_COLUMN (map, line); + if (col == 0) + col = 1; + } if (lin == 0) - fprintf (stderr, "%s:", map->to_file); + fprintf (stderr, "%s:", map->to_file); else if (CPP_OPTION (pfile, show_column) == 0) - fprintf (stderr, "%s:%u:", map->to_file, lin); + fprintf (stderr, "%s:%u:", map->to_file, lin); else - fprintf (stderr, "%s:%u:%u:", map->to_file, lin, col); + fprintf (stderr, "%s:%u:%u:", map->to_file, lin, col); fputc (' ', stderr); } @@ -78,7 +78,7 @@ print_location (cpp_reader *pfile, source_location line, unsigned int col) Returns 0 if the error has been suppressed. */ static int _cpp_begin_message (cpp_reader *pfile, int code, - source_location src_loc, unsigned int column) + source_location src_loc, unsigned int column) { int level = CPP_DL_EXTRACT (code); @@ -87,26 +87,26 @@ _cpp_begin_message (cpp_reader *pfile, int code, case CPP_DL_WARNING: case CPP_DL_PEDWARN: if (cpp_in_system_header (pfile) - && ! CPP_OPTION (pfile, warn_system_headers)) - return 0; + && ! CPP_OPTION (pfile, warn_system_headers)) + return 0; /* Fall through. */ case CPP_DL_WARNING_SYSHDR: if (CPP_OPTION (pfile, warnings_are_errors) - || (level == CPP_DL_PEDWARN && CPP_OPTION (pfile, pedantic_errors))) - { - if (CPP_OPTION (pfile, inhibit_errors)) - return 0; - level = CPP_DL_ERROR; - pfile->errors++; - } + || (level == CPP_DL_PEDWARN && CPP_OPTION (pfile, pedantic_errors))) + { + if (CPP_OPTION (pfile, inhibit_errors)) + return 0; + level = CPP_DL_ERROR; + pfile->errors++; + } else if (CPP_OPTION (pfile, inhibit_warnings)) - return 0; + return 0; break; case CPP_DL_ERROR: if (CPP_OPTION (pfile, inhibit_errors)) - return 0; + return 0; /* ICEs cannot be inhibited. */ case CPP_DL_ICE: pfile->errors++; @@ -137,7 +137,7 @@ cpp_error (cpp_reader * pfile, int level, const char *msgid, ...) { source_location src_loc; va_list ap; - + va_start (ap, msgid); if (CPP_OPTION (pfile, client_diagnostic)) @@ -145,28 +145,28 @@ cpp_error (cpp_reader * pfile, int level, const char *msgid, ...) else { if (CPP_OPTION (pfile, traditional)) - { - if (pfile->state.in_directive) - src_loc = pfile->directive_line; - else - src_loc = pfile->line_table->highest_line; - } + { + if (pfile->state.in_directive) + src_loc = pfile->directive_line; + else + src_loc = pfile->line_table->highest_line; + } /* We don't want to refer to a token before the beginning of the - current run -- that is invalid. */ + current run -- that is invalid. */ else if (pfile->cur_token == pfile->cur_run->base) - { - if (pfile->cur_run->prev != NULL) - src_loc = pfile->cur_run->prev->limit->src_loc; - else - src_loc = 0; - } + { + if (pfile->cur_run->prev != NULL) + src_loc = pfile->cur_run->prev->limit->src_loc; + else + src_loc = 0; + } else - { - src_loc = pfile->cur_token[-1].src_loc; - } + { + src_loc = pfile->cur_token[-1].src_loc; + } if (_cpp_begin_message (pfile, level, src_loc, 0)) - v_message (msgid, ap); + v_message (msgid, ap); } va_end (ap); @@ -175,11 +175,11 @@ cpp_error (cpp_reader * pfile, int level, const char *msgid, ...) /* Print an error at a specific location. */ void cpp_error_with_line (cpp_reader *pfile, int level, - source_location src_loc, unsigned int column, - const char *msgid, ...) + source_location src_loc, unsigned int column, + const char *msgid, ...) { va_list ap; - + va_start (ap, msgid); if (_cpp_begin_message (pfile, level, src_loc, column)) |