This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch, fortran] Remove redundant check in error.c


Argh! I just realized that I sent this to gcc@ rather than fortran@! No wonder nobody had commented on it.

Brooks Moses wrote:
I added this TODO about a year ago, because at that point I wasn't completely sure if this particular check was needed or not. It still looks like a no-op to me -- the only things that affect the "offset" variable are that it's set to zero some dozen lines above the patch region, and of course the two lines of context in the top of the patch -- and so I'm now proposing to remove it.

-------------------------------------------------------------------
2007-03-23  Brooks Moses  <brooks.moses@codesourcery.com>

* error.c (show_locus): Remove always-false test.

-------------------------------------------------------------------

Tested with "make check-fortran" on i686-pc-linux-gnu. Ok for mainline?

- Brooks


------------------------------------------------------------------------


Index: error.c
===================================================================
--- error.c (revision 123170)
+++ error.c (working copy)
@@ -233,12 +233,6 @@
if (cmax > terminal_width - 5)
offset = cmax - terminal_width + 5;
- /* TODO: Is there a good reason for the following apparently-redundant
- check, and the similar ones in the single-locus cases below? */
-
- if (offset < 0)
- offset = 0;
-
/* Show the line itself, taking care not to print more than what can
show up on the terminal. Tabs are converted to spaces, and nonprintable characters are converted to a "\xNN" sequence. */


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]