Author Topic: [SOLVED]Can't build because build warning info incorrectly interpreted as error  (Read 5679 times)

Offline VincentB

  • Multiple posting newcomer
  • *
  • Posts: 28
Dear C::B experts,

I have a project that uses extensively some library based on template classes. This library is not from me, and I do not wish to make any change into its source code. When I build with the GNU make I get it to the end, because GNU make processing is based only on file timestamps, and not on error/warning messages, but when I make with C::B, it does not build to the end. I suspect that this problem happens because some of the warning information is erroneously interpreted as error information by C::B. As a matter of fact this information is highlighted in red font in the  C::B "message" pannel window.

Here is an excerpt of what I get in the GNU make stderr output:

../../ac_types1.1/ac_int.h:914: warning: comparison of unsigned expression < 0 is always false
../../ac_types1.1/ac_int.h: In function `void ac_private::iv_const_shift_l(const int*, int*) [with int N = 1, int Nr = 1, int B = 16]':
../../ac_types1.1/ac_int.h:1169:   instantiated from `void ac_private::iv<N>::const_shift_l(ac_private::iv<N2>&) const [with int Nr = 1, int B = 16, int N = 1]'
../../ac_types1.1/ac_fixed.h:231:   instantiated from `ac_fixed<(((W + W2) > 1) ? (W + W2) : 1), I, S,  AC_TRN,  AC_WRAP> ac_fixed<W2, I2, S2, Q2, O2>::shiftl() const [with int W2 = 16, int W = 1, int I = 1, bool S =  false, ac_q_mode Q =  AC_TRN, ac_o_mode O =  AC_WRAP]'
../../ac_types1.1/ac_fixed.h:350:   instantiated from `typename ac_fixed<W2, I2, S2, Q2, O2>::rt<W2, I2, S2>::minus ac_fixed<W2, I2, S2, Q2, O2>::operator-(const ac_fixed<W2, I2, S2, Q2, O2>&) const [with int W2 = 32, int I2 = 16, bool S2 =  true, ac_q_mode Q2 =  AC_TRN, ac_o_mode O2 =  AC_SAT, int W = 1, int I = 1, bool S =  false, ac_q_mode Q =  AC_TRN, ac_o_mode O =  AC_WRAP]'
../../ac_types1.1/ac_fixed.h:407:   instantiated from `ac_fixed<(W + 1), (I + 1),  true,  AC_TRN,  AC_WRAP> ac_fixed<W2, I2, S2, Q2, O2>::operator-() const [with int W = 32, int I = 16, bool S =  true, ac_q_mode Q =  AC_TRN, ac_o_mode O =  AC_SAT]'
../../as_sys/ince/my_header.h:182:   instantiated from `void myclass_t<SAMPLE>::conj() [with SAMPLE = r_sample_x]'
../../src/my_source.cpp:507:   instantiated from here


The colors are those shown in the C::B message window (I could not cut and paste from the C::B message window, so I got the text above from GNU make stderr, but there is exactly the same in C::B message windows, with colors in addition which I added by hand in this post).
With template classes the compiler fortunately gives some additional information on what has caused the warning message, otherwise it would be very difficult, if not impossible, to spot where and why you get this warning message. As a temporary workaround I will seek whether I can disable this by some GCC option in order to build with C::B all the same.

I am using :

C::BSVN build rev 3677
GCCversion 3.4.2
OSWindows XP

GCC is based on MinGW on top of MSYS

« Last Edit: March 13, 2007, 04:22:02 pm by VincentB »

wxLearner

  • Guest
Hello,
this is a known issue. You can add a regular expression to the output parsing mechanism like stated in this thread. I also think, it should be there by default.

Offline VincentB

  • Multiple posting newcomer
  • *
  • Posts: 28
Thanks,

I made the configuration of

Code
([][{}() \t#%$~A-Za-z0-9_:+/\.-]+):([0-9]+):[ \t]+([Ii]nstantiated from[ \t].*)

As a new regexp just after "Compiler Warning" in the "Other settings" / "Advanced options..." and it worked.  :D

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9702
This should be fixed (properly) in SVN r3694 and above. You might have to default the compiler settings to apply. BTW: Is there a patch at BerliOS that is related and needs to be closed?
With regards, Morten.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline VincentB

  • Multiple posting newcomer
  • *
  • Posts: 28
Dear Mr MortenMacFly,

No, I have not submitted any bug on BerliOS for this one.

                         Vincent.

PS : Is it mandatory to discuss suspected bugs on this forum before submitting to Berlios ? I have submitted "[Bug #10611] Import of MS VC++ 6.0 compiler options files" on another topic without discussing it on this forum, because I had found a workaround and it was not so priority for me.

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9702
Is it mandatory to discuss suspected bugs on this forum before submitting to Berlios ?
I wouldn't say mandatory, but surely a nice-to-have. Often things can be fixed pretty quick and easily and/or don't really apply - thus are no bugs but e.g. misunderstandings. So to sort such things out it is of much help posting to the forum first. Patches might be handled differently.
With regards, Morten.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ