Author Topic: Bug: line "instantiated from here" is treated as error!  (Read 7594 times)

Offline Indrekis

  • Multiple posting newcomer
  • *
  • Posts: 31
Bug: line "instantiated from here" is treated as error!
« on: September 26, 2006, 05:32:45 am »
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.

takeshimiya

  • Guest
Re: Bug: line "instantiated from here" is treated as error!
« Reply #1 on: September 26, 2006, 07:32:55 pm »
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?

Offline kkez

  • Almost regular
  • **
  • Posts: 153
    • WinapiZone
Re: Bug: line "instantiated from here" is treated as error!
« Reply #2 on: September 26, 2006, 09:55:27 pm »
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));

Offline Indrekis

  • Multiple posting newcomer
  • *
  • Posts: 31
Re: Bug: line "instantiated from here" is treated as error!
« Reply #3 on: September 28, 2006, 02:01:04 pm »
Thank you for your reply! but,
The patch gives no visible effect for me  :(

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: Bug: line "instantiated from here" is treated as error!
« Reply #4 on: September 28, 2006, 02:21:23 pm »
For those changes to take effect you have to "Reset" your compiler settings.
Be patient!
This bug will be fixed soon...

Offline Indrekis

  • Multiple posting newcomer
  • *
  • Posts: 31
Re: Bug: line "instantiated from here" is treated as error!
« Reply #5 on: October 01, 2006, 11:43:52 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]
« Last Edit: October 01, 2006, 11:52:00 pm by Indrekis »

Offline artoj

  • Almost regular
  • **
  • Posts: 206
  • Location: Supporting my team
    • http://ajonsson.kapsi.fi/
Re: Bug: line "instantiated from here" is treated as error!
« Reply #6 on: October 09, 2006, 03:59:17 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

Offline kkez

  • Almost regular
  • **
  • Posts: 153
    • WinapiZone
Re: Bug: line "instantiated from here" is treated as error!
« Reply #7 on: October 11, 2006, 11:23:00 am »
Nothing here too:
WinXP SP2,  3002 < revision < 3065, wxWidgets 2.6.3