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.
Create a header file named "sample.h" with the following contents: =============================== #pragma once class A{ public: int tratatatata; }; #include "sample.h" //<--parser complains about recursive include directive =============================== Result: C++ code assistance complains about recursive include directive, although it does not make any harm because of #pragma once. Using #ifndef guards instead of #pragma once does not make any difference. The problem is that in a large and complex project similar stuff makes parser stuck, it enters some kind of infinite loop and never completes the parsing of the project. This would be useful for example if you have two classes depending on each other and you want to define their functions as inline: ================================== file A.h: #pragma once class B; class A{ public: int a; inline void func(const B& b); } #include "B.h" inline void A::func(const B& b){ b.b = 10; } ======================================= file B.h #pragma once class A; class B{ public: int b; inline void func(const A& a); } #include "A.h" inline void B::func(const A& a){ a.a = 10; }
thanks for the report, I will investigate
confirmed, it's a regression
fixed + test http://hg.netbeans.org/cnd-main/rev/2ead312d2b52 Thanks for catching!
Integrated into 'main-golden', will be available in build *201209040001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/2ead312d2b52 User: Vladimir Voskresensky <vv159170@netbeans.org> Log: fixed #217711 - complain about recursive include while #pragma once guarding the file