This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Summary: | Preprocessor does not work properly | ||
---|---|---|---|
Product: | cnd | Reporter: | shirojirou <shirojirou> |
Component: | Code Model | Assignee: | Vladimir Voskresensky <vv159170> |
Status: | REOPENED --- | ||
Severity: | normal | ||
Priority: | P3 | ||
Version: | 7.2 | ||
Hardware: | PC | ||
OS: | Windows 7 | ||
Issue Type: | DEFECT | Exception Reporter: | |
Attachments: |
AAA is defined, and also BBB is defined too.
tool chain , lib and app lib and cpp Update again |
Ooops... 7.2 is released with this bug... I can't upgrade to 7.2, until 7.1.2, there is no such bug... shirojirou, Does bug exist if you select both projects and perform "Project->Code Assistance->Reparse Project"? Does cleaning of ${Cache directory}/cnd help to resolve bug? Where is problem fragment located (header in library)? Does executable application have dependency on library (Project Properties->linker->Libraries)? Thanks, Alexander Created attachment 122561 [details] tool chain , lib and app Thank you for your comment and sorry for answering lately. >Does bug exist if you select both projects and perform "Project->Code Assistance->Reparse Project"? Yes. >Does cleaning of ${Cache directory}/cnd help to resolve bug? No. >Where is problem fragment located (header in library)? Library header files are affected by the application condition. >Does executable application have dependency on library (Project Properties->linker->Libraries)? Yes. I tried to do this from scratch, I attached lib, app and toolchain. Please import toolchain.zip to Netbeans7.2 and open the projects. (In reply to comment #3) > Created attachment 122561 [details] > tool chain , lib and app Thank you for example. But I see that IDE behavior is absolutely right: Active blocks in test.h: #define A3 and #define CCC Inactive blocks in test.h: #define B3 and #define WWW because macro _WIN32 is undefined because there is no compilations unit that include test.h with defined macros _WIN32. If you add following c++ source file in the attached CppStaticLibrary: #include "test.h" all blocks in the test.h will be active. Alexander No bug in IDE, isn't it? I'm sorry, I didn't notice Alexander Simon 2012-07-31 comment. It will happen, when I changed project property... It is hard to reenact this bug, but my company project always occurs. I can't believe why no one claims this bug. There is no this bug until 7.1, so I stick to use 7.1 forever... I will have a look what's wrong There was a regression in 7.2 (see issue #217711) in preprocessor which was fixed in trunk. Could you, please, backup your project metafiles (nbproject folder), then open using daily http://bits.netbeans.org/dev/nightly/ and see if bug is reproducible. Thanks! Vladimir. Created attachment 124611 [details]
lib and cpp
I upload the projects again.
I tried nighty build, but it was same result. I find how to reenact this bug. 1) Open the both projects, and activate test.h tab. 2) Change the CppApplication_1 project to cygwin. 3) Select CppStaticLibrary_1 and reevaluate the project. Now you see the bug! I tried nighty build, but it was same result. I find how to reenact this bug. 1) Open the both projects, and activate test.h tab. 2) Change the CppApplication_1 project to cygwin. 3) Select CppStaticLibrary_1 and reevaluate the project. Now you see the bug! Alexander, are you able to reproduce? Created attachment 124918 [details]
Update again
I update project again...
I tried to change Java 64bit to 32bit(1.7.0.07), but it was same result.
1)Open the CppApplication_1, CppStaticLibrary_1 and CppStaticLibrary_1/test.h.
In this time, only WWW is available.
2)Change CppApplication_1 [property] -> [build] -> [tool collection Cygwin]
3)CppStaticLibrary_1 [code assistance] -> [re-evaluate project]
Now CCC is also available.
I use japanese version, so I'm not sure the command name.
|
Created attachment 121639 [details] AAA is defined, and also BBB is defined too. It is hard to explain... Please look at the attachment. AAA is defined, and also BBB is defined too. This is happened when two project are opened. One is library, and the other is executable application. If library project is set as "Cygwin" and the other is set as "VisualC", Preprocessor elif does not work correctly.