diff options
author | Neil Booth <neilb@earthling.net> | 2000-11-17 19:21:15 +0000 |
---|---|---|
committer | Neil Booth <neil@gcc.gnu.org> | 2000-11-17 19:21:15 +0000 |
commit | 14fbab6d759d8085be40343f06911c672539a2df (patch) | |
tree | 7d972c08baf3dd78cd8b3e5b32534d4fdca36eaa /gcc/cpperror.c | |
parent | a8a05998deca5cf6fac99e9a9b6e8343ea3c1b3f (diff) | |
download | gcc-14fbab6d759d8085be40343f06911c672539a2df.zip gcc-14fbab6d759d8085be40343f06911c672539a2df.tar.gz gcc-14fbab6d759d8085be40343f06911c672539a2df.tar.bz2 |
cpperror.c (print_file_and_line): Don't display line number if 0.
* cpperror.c (print_file_and_line): Don't display line number
if 0.
From-SVN: r37523
Diffstat (limited to 'gcc/cpperror.c')
-rw-r--r-- | gcc/cpperror.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/gcc/cpperror.c b/gcc/cpperror.c index d598fbd..ff83c6f 100644 --- a/gcc/cpperror.c +++ b/gcc/cpperror.c @@ -86,19 +86,19 @@ print_containing_files (pfile, ip) } static void -print_file_and_line (filename, line, column) +print_file_and_line (filename, line, col) const char *filename; - unsigned int line, column; + unsigned int line, col; { if (filename == 0 || *filename == '\0') filename = "<stdin>"; - if (line == (unsigned int)-1) + if (line == 0) fprintf (stderr, "%s: ", filename); - else if (column > 0) - fprintf (stderr, "%s:%u:%u: ", filename, line, column); - else + else if (col == 0) fprintf (stderr, "%s:%u: ", filename, line); + else + fprintf (stderr, "%s:%u:%u: ", filename, line, col); } /* Set up for an error message: print the file and line, bump the error |