mirror of
https://gcc.gnu.org/git/gcc.git
synced 2024-11-24 11:24:05 +08:00
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
This commit is contained in:
parent
a8a05998de
commit
14fbab6d75
@ -1,3 +1,8 @@
|
||||
2000-11-17 Neil Booth <neilb@earthling.net>
|
||||
|
||||
* cpperror.c (print_file_and_line): Don't display line number
|
||||
if 0.
|
||||
|
||||
2000-11-17 Zack Weinberg <zack@wolery.stanford.edu>
|
||||
|
||||
* ggc.h: Delete ggc_add_string_root and ggc_mark_string. Add
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user