NO

Author Topic: wrong line showing warning  (Read 3913 times)

czerny

  • Guest
wrong line showing warning
« 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!

Offline Bitbeisser

  • Global Moderator
  • Member
  • *****
  • Posts: 772
Re: wrong line showing warning
« Reply #1 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

Offline frankie

  • Global Moderator
  • Member
  • *****
  • Posts: 2113
Re: wrong line showing warning
« Reply #2 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)
"It is better to be hated for what you are than to be loved for what you are not." - Andre Gide

czerny

  • Guest
Re: wrong line showing warning
« Reply #3 on: May 20, 2013, 08:34:45 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.

Offline frankie

  • Global Moderator
  • Member
  • *****
  • Posts: 2113
Re: wrong line showing warning
« Reply #4 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?
"It is better to be hated for what you are than to be loved for what you are not." - Andre Gide

czerny

  • Guest
Re: wrong line showing warning
« Reply #5 on: May 21, 2013, 11:19:16 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.