Part of output in "Build log":
Quote
<skipped>
./objtests_1.h: In member function `test_results run_tests<T, tc_c>::operator()(int, std::string, std::string, const tests_mask&) [with T = float, tc_c = test_C_01]':
main.cpp:188: instantiated from here
./objtests_1.h:595: warning: statement has no effect
./objtests_1.h:595: warning: unused variable 'richbool_level'
./objtests_1.h:595: warning: statement has no effect
<skipped>
<number of instantiated from here lines> errors, <many :)> warnings
Here is supposed that current compiled file do not contains other (real) errors.
"Build messages":
Quote
<skipped>
main.cpp 188 instantiated from here
./objtests_1.h 595 warning: statement has no effect
./objtests_1.h 595 warning: unused variable 'richbool_level'
./objtests_1.h 595 warning: statement has no effect
<skipped>
=== Build finished: <number of instantiated from here lines> errors, <many :)> warnings ===
I am using CodeBlocks, built from sources, revision 2977, with the exception that it is built against non-monolithic wxWidgets (2.6.3) library, under WindowsXP SP2.
Yes it's common that the regex fails when parsing template warning/errors, and linker errors almost never are parsed; however it is because ld usually doesn't outputs an "Error" string.
I wonder, there is any switch for ld to make it output parseable errors? Maybe -undefined?
You can add a regex before all the other ones (you can do it since it's more specific) to catch the "initiated from here" message. Try my patch:
Index: compilerGDC.cpp
===================================================================
--- compilerGDC.cpp (revision 2986)
+++ compilerGDC.cpp (working copy)
@@ -177,6 +177,7 @@
{
m_RegExes.Clear();
m_RegExes.Add(RegExStruct(_("Fatal error"), cltError, _T("FATAL:[ \t]*(.*)"), 1));
+ m_RegExes.Add(RegExStruct(_("'Instantiated from here' info"), cltNormal, _T("([ \tA-Za-z0-9_:+/\\.-]+):([0-9]+):[ \t]+([iI]nstantiated from here.*)"), 3, 1, 2));
m_RegExes.Add(RegExStruct(_("Resource compiler error"), cltError, _T("windres.exe:[ \t]([ \tA-Za-z0-9_:+/\\.-]+):([0-9]+):[ \t](.*)"), 3, 1, 2));
m_RegExes.Add(RegExStruct(_("Resource compiler error (2)"), cltError, _T("windres.exe:[ \t](.*)"), 1));
m_RegExes.Add(RegExStruct(_("Preprocessor warning"), cltWarning, _T("([ \tA-Za-z0-9_:+/\\.-]+):([0-9]+):([0-9]+):[ \t]([Ww]arning:[ \t].*)"), 4, 1, 2));
Index: compilerGNUARM.cpp
===================================================================
--- compilerGNUARM.cpp (revision 2986)
+++ compilerGNUARM.cpp (working copy)
@@ -172,7 +172,8 @@
{
m_RegExes.Clear();
m_RegExes.Add(RegExStruct(_("Fatal error"), cltError, _T("FATAL:[ \t]*(.*)"), 1));
- m_RegExes.Add(RegExStruct(_("Resource compiler error"), cltError, _T("windres.exe:[ \t]([ \tA-Za-z0-9_:+/\\.-]+):([0-9]+):[ \t](.*)"), 3, 1, 2));
+ m_RegExes.Add(RegExStruct(_("'Instantiated from here' info"), cltNormal, _T("([ \tA-Za-z0-9_:+/\\.-]+):([0-9]+):[ \t]+([iI]nstantiated from here.*)"), 3, 1, 2));
+ m_RegExes.Add(RegExStruct(_("Resource compiler error"), cltError, _T("windres.exe:[ \t]([ \tA-Za-z0-9_:+/\\.-]+):([0-9]+):[ \t](.*)"), 3, 1, 2));
m_RegExes.Add(RegExStruct(_("Resource compiler error (2)"), cltError, _T("windres.exe:[ \t](.*)"), 1));
m_RegExes.Add(RegExStruct(_("Preprocessor warning"), cltWarning, _T("([ \tA-Za-z0-9_:+/\\.-]+):([0-9]+):([0-9]+):[ \t]([Ww]arning:[ \t].*)"), 4, 1, 2));
m_RegExes.Add(RegExStruct(_("Preprocessor error"), cltError, _T("([ \tA-Za-z0-9_:+/\\.-]+):([0-9]+):[0-9]+:[ \t](.*)"), 3, 1, 2));
Index: compilerMINGW.cpp
===================================================================
--- compilerMINGW.cpp (revision 2986)
+++ compilerMINGW.cpp (working copy)
@@ -176,6 +176,7 @@
{
m_RegExes.Clear();
m_RegExes.Add(RegExStruct(_("Fatal error"), cltError, _T("FATAL:[ \t]*(.*)"), 1));
+ m_RegExes.Add(RegExStruct(_("'Instantiated from here' info"), cltNormal, _T("([ \tA-Za-z0-9_:+/\\.-]+):([0-9]+):[ \t]+([iI]nstantiated from here.*)"), 3, 1, 2));
m_RegExes.Add(RegExStruct(_("Resource compiler error"), cltError, _T("windres.exe:[ \t]([ \tA-Za-z0-9_:+/\\.-]+):([0-9]+):[ \t](.*)"), 3, 1, 2));
m_RegExes.Add(RegExStruct(_("Resource compiler error (2)"), cltError, _T("windres.exe:[ \t](.*)"), 1));
m_RegExes.Add(RegExStruct(_("Preprocessor warning"), cltWarning, _T("([ \tA-Za-z0-9_:+/\\.-]+):([0-9]+):([0-9]+):[ \t]([Ww]arning:[ \t].*)"), 4, 1, 2));
Thank you for your reply! but,
The patch gives no visible effect for me :(
For those changes to take effect you have to "Reset" your compiler settings.
Quote from: mandrav on September 28, 2006, 02:21:23 PM
For those changes to take effect you have to "Reset" your compiler settings.
Thank you, that helped :)
In fact, more appropriate line would be
Quote
m_RegExes.Add(RegExStruct(_("'Instantiated from ...' info"), cltWarning, _T("([ \tA-Za-z0-9_:+/\\.-]+):([0-9]+):[ \t]+([iI]nstantiated from.*)"), 3, 1, 2));
:)
But here one bug arosed: When I press "Advanced options..." in "Global compiler settings", CB "edition" with this line crashes!. I have attached the report to this post.
Another solution of the problem - joining corresponding item to the "Advanced options.../Output parsing" (without above code line added) works just fine :D
P.S. I am using CB, build from the SVN, with the exception that it is built against non-monolithic wxWidgets (2.6.3) library, under WindowsXP SP2.
Revisions for which the crash was reprodused: 2996-3001
[attachment deleted by admin]
Quote from: Indrekis on October 01, 2006, 11:43:52 PM
But here one bug arosed: When I press "Advanced options..." in "Global compiler settings", CB "edition" with this line crashes!. I have attached the report to this post.
Works fine here, both patches.
WinXP x64, rev 3050, wxWidgets 2.6.3p2
Nothing here too:
WinXP SP2, 3002 < revision < 3065, wxWidgets 2.6.3