News:

The new Release 25.03 is out! You can download binaries for Windows and many major Linux distros here .

Main Menu

VC compiler, to find why the CC is not working

Started by Loaden, September 07, 2009, 09:54:35 AM

Previous topic - Next topic

Loaden

Hello everyone! I have the following tests are based on branches / codecompletion_refactoring / a SVN5741 version. Glad to see CC's latest development!

With regard to CC does not support the VC header files, I find the reasons for a bit and found that:
The test file is VC's stdio.h, I find this code is the reason!
#ifdef  _POSIX_
#define _P_tmpdir   "/"
#define _wP_tmpdir  L"/"
#else
#define _P_tmpdir2   "\"
#define _wP_tmpdir2  L"\\"
#endif

LOG is as follows:
QuoteReparsing saved files ...
Starting batch parsing
Parsing stage done (31 total parsed files, 3575 tokens in 0 minute (s), 0.0 seconds).
Updating class browser ...
Class browser updated.

When remove this code, then the CC is working properly, this time LOG are as follows:
QuoteReparsing saved files ...
Starting batch parsing
Parsing stage done (31 total parsed files, 3945 tokens in 0 minute (s), 0.16 seconds).
Updating class browser ...
Class browser updated.

Among them, a key factor is:
#ifdef  _POSIX_
#define _P_tmpdir2   "\"
#define _wP_tmpdir2  L"\\"

These two lines of code, if changed:
#ifdef  _POSIX_
#define _P_tmpdir2   "/"
#define _wP_tmpdir2  L"//"

This time LOG are as follows, CC work well:
QuoteReparsing saved files ...
Starting batch parsing
Parsing stage done (31 total parsed files, 3945 tokens in 0 minute (s), 0.16 seconds).
Updating class browser ...
Class browser updated.

This shows that the CC on the "\\" analytic serious bug, urge restoration, thank you!

ollydbg

It seems in my local copy, I can't reproduce this bug.
See the screen shot.


[attachment deleted by admin]
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.