diff options
Diffstat (limited to 'gcc/diagnostic.cc')
-rw-r--r-- | gcc/diagnostic.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/gcc/diagnostic.cc b/gcc/diagnostic.cc index f1cef0b..4791af9 100644 --- a/gcc/diagnostic.cc +++ b/gcc/diagnostic.cc @@ -117,11 +117,11 @@ void diagnostic_set_caret_max_width (diagnostic_context *context, int value) { /* One minus to account for the leading empty space. */ - value = value ? value - 1 + value = value ? value - 1 : (isatty (fileno (pp_buffer (context->m_printer)->m_stream)) ? get_terminal_width () - 1 : INT_MAX); - - if (value <= 0) + + if (value <= 0) value = INT_MAX; context->m_source_printing.max_width = value; @@ -1313,7 +1313,7 @@ diagnostic_context::report_diagnostic (diagnostic_info *diagnostic) || diagnostic_count (DK_SORRY) > 0) && !m_abort_on_error) { - expanded_location s + expanded_location s = expand_location (diagnostic_location (diagnostic)); fnotice (stderr, "%s:%d: confused by earlier errors, bailing out\n", s.file, s.line); |