aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorPer Bothner <pbothner@apple.com>2003-08-28 00:21:34 +0000
committerPer Bothner <bothner@gcc.gnu.org>2003-08-27 17:21:34 -0700
commit75ee800b5eb8f5007c0a7de67d60dc8365639757 (patch)
treebf6a82116a244cde8aac74e71f5f085e22d8eaac /gcc
parenta66e04e38c6c2236d8b94135a57f851fcc0a43b3 (diff)
downloadgcc-75ee800b5eb8f5007c0a7de67d60dc8365639757.zip
gcc-75ee800b5eb8f5007c0a7de67d60dc8365639757.tar.gz
gcc-75ee800b5eb8f5007c0a7de67d60dc8365639757.tar.bz2
cpperror.c (print_location): Don't check for !pfile->buffer.
* cpperror.c (print_location): Don't check for !pfile->buffer. That test fails following my 08-21 change, and it seems unnecessary anyway. (cpp_error): Likewise. From-SVN: r70874
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog8
-rw-r--r--gcc/cpperror.c25
2 files changed, 17 insertions, 16 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 25c63ab..7d7193e 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2003-08-27 Per Bothner <pbothner@apple.com>
+
+ * cpperror.c (print_location): Don't check for !pfile->buffer. That
+ test fails following my 08-21 change, and it seems unnecessary anyway.
+ (cpp_error): Likewise.
+
2003-08-27 Jason Merrill <jason@redhat.com>
* real.c (do_multiply): Initialize with memset.
@@ -755,7 +761,7 @@ Wed Aug 20 12:08:55 CEST 2003 Jan Hubicka <jh@suse.cz>
* config/s390/s390.h: Prefix #include of s390/fixdfdi.h
[under IN_LIBGCC2] with config/.
-2003-08-21 Per Bothner <bothner@pbothner.com>
+2003-08-21 Per Bothner <pbothner@apple.com>
* cppfiles.c (stack_file): Correctly pass return_at_eof parameter
to cpp_push_buffer.
diff --git a/gcc/cpperror.c b/gcc/cpperror.c
index 4eed951..4926cb2 100644
--- a/gcc/cpperror.c
+++ b/gcc/cpperror.c
@@ -38,7 +38,7 @@ static void print_location (cpp_reader *, fileline, unsigned int);
static void
print_location (cpp_reader *pfile, fileline line, unsigned int col)
{
- if (!pfile->buffer || line == 0)
+ if (line == 0)
fprintf (stderr, "%s: ", progname);
else
{
@@ -131,24 +131,19 @@ cpp_error (cpp_reader * pfile, int level, const char *msgid, ...)
va_start (ap, msgid);
- if (pfile->buffer)
+ if (CPP_OPTION (pfile, traditional))
{
- if (CPP_OPTION (pfile, traditional))
- {
- if (pfile->state.in_directive)
- line = pfile->directive_line;
- else
- line = pfile->line;
- column = 0;
- }
+ if (pfile->state.in_directive)
+ line = pfile->directive_line;
else
- {
- line = pfile->cur_token[-1].line;
- column = pfile->cur_token[-1].col;
- }
+ line = pfile->line;
+ column = 0;
}
else
- line = column = 0;
+ {
+ line = pfile->cur_token[-1].line;
+ column = pfile->cur_token[-1].col;
+ }
if (_cpp_begin_message (pfile, level, line, column))
v_message (msgid, ap);