www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/07/15/04:04:49

Date: Wed, 15 Jul 1998 10:32:29 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: DBA GPC <dbagpc AT aol DOT com>
cc: djgpp AT delorie DOT com
Subject: Re: compiler line number mismatch
In-Reply-To: <1998071504264200.AAA01760@ladder01.news.aol.com>
Message-ID: <Pine.SUN.3.91.980715102910.10743T-100000@is>
MIME-Version: 1.0

On 15 Jul 1998, DBA GPC wrote:

> when i receive an error or message, the line number reported in the message
> does not match the line number in the source file.  I have noticed that a blank
> line is not counter by the compiler, and this makes it very very difficult to
> locate compiler errors because the compiler line number and rhide editor line
> number do not match.

Please tell which version of GCC do you use, and post a short source file 
that can be used to reproduce this problem, together with an 
error/warning message printed by the compiler which shows the line number 
mismatch.

AFAIK, GCC *does* count blank lines.  It is possible that in your case, 
it reports a line where it decided that there is an error, which is 
different from the line where you need to correct the source, because a 
compiler cannot always guess what the actual error is.  This is quite 
normal.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019