Pelles C forum

Pelles C => Bug reports => Topic started by: czerny on May 19, 2013, 01:30:26 PM

Title: wrong line showing warning
Post by: czerny on May 19, 2013, 01:30:26 PM
In my actual project I try to compile the gd library.

There is an offset of two lines when showing warnings!
Title: Re: wrong line showing warning
Post by: Bitbeisser on May 20, 2013, 04:19:11 AM
Never noticed that when I was following errors in a larger source file...  ???
Any chance you modified the source after compiling, like in a different window?

Ralf
Title: Re: wrong line showing warning
Post by: frankie on May 20, 2013, 05:02:41 PM
It's an odd known problem that sometimes happen again.
The source line number is wrongly collected after C preprocessing.
Sometimes you can correct it by moving include files (see http://forum.pellesc.de/index.php?topic=2950.msg11210#msg11210 (http://forum.pellesc.de/index.php?topic=2950.msg11210#msg11210))
Title: Re: wrong line showing warning
Post by: czerny on May 20, 2013, 08:34:45 PM
Quote from: frankie on May 20, 2013, 05:02:41 PM
It's an odd known problem that sometimes happen again.
The source line number is wrongly collected after C preprocessing.
Sometimes you can correct it by moving include files (see http://forum.pellesc.de/index.php?topic=2950.msg11210#msg11210 (http://forum.pellesc.de/index.php?topic=2950.msg11210#msg11210))
frankie: I know this problem with the debugger, but this is are compiler warnings.
Title: Re: wrong line showing warning
Post by: frankie on May 21, 2013, 09:35:07 AM
czerny,
if the problem comes from preprocessor there is no difference between warnings and debuging. The wrong line numbers are the same used to generate debugging information in the executable that are then used by the debugger.
Anyway have you tryied to change something in the beginning of the file, specifically includes and defines especially if they are multiline defines?
Title: Re: wrong line showing warning
Post by: czerny on May 21, 2013, 11:19:16 AM
Quote from: frankie on May 21, 2013, 09:35:07 AM
czerny,
if the problem comes from preprocessor there is no difference between warnings and debuging.
Right! So it could be a hint for Pelle, to find the error.