Developer forums (C::B DEVELOPMENT STRICTLY!) > Development
Bug: line "instantiated from here" is treated as error!
Indrekis:
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
--- End quote ---
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 ===
--- End quote ---
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.
takeshimiya:
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?
kkez:
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:
--- Code: ---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));
--- End code ---
Indrekis:
Thank you for your reply! but,
The patch gives no visible effect for me :(
mandrav:
For those changes to take effect you have to "Reset" your compiler settings.
Navigation
[0] Message Index
[#] Next page
Go to full version