News:

Download Pelles C here: http://www.smorgasbordet.com/pellesc/

Main Menu

wrong line showing warning

Started by czerny, May 19, 2013, 01:30:26 PM

Previous topic - Next topic

czerny

In my actual project I try to compile the gd library.

There is an offset of two lines when showing warnings!

Bitbeisser

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

frankie

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)
"It is better to be hated for what you are than to be loved for what you are not." - Andre Gide

czerny

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)
frankie: I know this problem with the debugger, but this is are compiler warnings.

frankie

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?
"It is better to be hated for what you are than to be loved for what you are not." - Andre Gide

czerny

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.