Search
Closed
as Fixed Help for as Fixed

1
Sign in to vote
0
Sign in to vote
Sign in
to vote
Type: Bug
ID: 99631
Opened: 12/7/2005 2:28:30 AM
Access Restriction: Public
0
Workaround(s)
0
User(s) can reproduce this bug
When we have a souce code, especially with some more complex #define directive (see test.cpp in attached zipfile), the line numbers in this source file and line numbers in preprocessor's output are not matching: it is impossible to correlate certain line in preprocessor's output with similar line in original source basing on #line directives in preprocessed code. Was able to reproduce in following compilers:
- Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 14.00.50215.44 for 80x86
- Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
- Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.00.9466 for 80x86
Details (expand)
Product Language
English
Version
Visual Studio 2005
Category
Language/Compiler
Operating System
Windows XP Professional
Operating System Language
Polish
Steps to Reproduce
Open test.cpp (from attached .zip file), and run it collecting preprocessor output to a file (by adding /P flag to project options, eg. "cl.exe /P test.cpp"). Check the output file (test.i) and you'll see that line numbers are no longer correct - they have changed their position compared to original ones.
Actual Results
#line 1 "test.cpp"
void test(int i, int j, int k) {}





int main()
{
{ { test(10, 20, 2); } }
return 0; //line 16, should be 19 (see test.cpp)
}
Expected Results
#line 1 "test.cpp"
void test(int i, int j, int k) {}





int main()
{
{ { test(10, 20, 2); } }

return 0; //line 19, as is supposed to be
}
File Attachments
1 attachments
Sign in to post a comment.
Posted by Microsoft on 12/9/2005 at 2:14 PM
Hi Wally,

Thanks for filing this issue. We were able to reproduce it on our end. We'll take a look at fixing this issue, but it would be helpful if we could understand the scenario this is causing you problems in. Is there a particular reason why the change in line numbers is especially bad for you? We often have to cut bugs in order to meet our project deadlines, so knowing in what way this is causing you problems would assist in prioritizing this issue.

Thanks,
Andy Rich
Visual C++ QA
Posted by Microsoft on 1/30/2006 at 12:54 PM
The Microsoft Sub-status is now "Working on solution"
Posted by Microsoft on 2/3/2006 at 11:02 AM
The Microsoft Sub-status is now "Working on solution"
Posted by Microsoft on 2/3/2006 at 2:54 PM
The Microsoft Sub-status is now "Working on solution"
Posted by Microsoft on 2/3/2006 at 10:30 PM
The Microsoft Sub-status is now "Working on solution"
Posted by Microsoft on 2/4/2006 at 12:22 AM
The Microsoft Sub-status is now "Working on solution"
Posted by Microsoft on 2/4/2006 at 2:32 AM
The Microsoft Sub-status is now "Working on solution"
Posted by Microsoft on 2/6/2006 at 3:18 PM
The Microsoft Sub-status is now "Working on solution"
Posted by Microsoft on 2/6/2006 at 4:46 PM
The Microsoft Sub-status is now "Working on solution"
Posted by Microsoft on 2/7/2006 at 9:50 AM
The Microsoft Sub-status is now "Working on solution"
Posted by Microsoft on 2/7/2006 at 11:42 AM
Thanks for taking the time to report this bug. A fix has been checked in for a future release.

Jason Shirk
VC++ Compiler Team
Posted by Microsoft on 1/17/2007 at 1:57 AM
Thank you for submitting this issue. The bug has been resolved Fixed, and its resolution shipped as part of Visual Studio 2005 Service Pack 1 (SP1).

You can download SP1 at http://msdn.microsoft.com/vstudio/support/vs2005sp1/default.aspx. If installing SP1 does not resolve the issue for you, please reactivate.

Thanks again for your feedback!
-Scott Currie
-DDTFA Program Manager