Author Topic: Missing error message  (Read 5130 times)

Offline candy.chiu.ad

  • Single posting newcomer
  • *
  • Posts: 3
Missing error message
« on: April 26, 2012, 04:11:28 pm »
Hi,

The compilation errors I received in Build Log seem to be incomplete.  For example, one of them is

C:\DiskE\cpp\LanguageTestGcc47\variadic_template.cpp: In instantiation of 'void Printer::doIt(T&&) [with T = double]':
C:\DiskE\cpp\LanguageTestGcc47\variadic_template.cpp:52:9:   recursively required from 'void Printer::operator()(H&&, T&& ...) [with H = int; T = {double}]'
C:\DiskE\cpp\LanguageTestGcc47\variadic_template.cpp:52:9:   required from 'void Printer::operator()(H&&, T&& ...) [with H = const int&; T = {int, double}]'
C:\DiskE\cpp\LanguageTestGcc47\variadic_template.cpp:89:5:   required from 'void callNormalize(F, T&& ...) [with F = Printer; T = {const int&, int, double}]'
C:\DiskE\cpp\LanguageTestGcc47\variadic_template.cpp:96:39:   required from here
C:\DiskE\cpp\LanguageTestGcc47\variadic_template.cpp:61:14: warning: value computed is not used [-Wunused-value]

While it printed out the stack trace, I don't know what the error is.  Am I missing something here?  I don't enough information to debug my program.

Thanks,
Candy


Online stahta01

  • Lives here!
  • ****
  • Posts: 7699
    • My Best Post
Re: Missing error message
« Reply #1 on: April 26, 2012, 04:36:17 pm »
I think those are just warning and informational messages.
The "required from" are new in gcc 4.7; Code::Blocks thinks they are errors but they are not.

Tim S.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline candy.chiu.ad

  • Single posting newcomer
  • *
  • Posts: 3
Re: Missing error message
« Reply #2 on: April 26, 2012, 05:01:03 pm »
But the code didn't successfully compile, and therefore, is not executable.  How should I configure CodeBlocks to get rid of the "errors"?

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13406
    • Travis build status
Re: Missing error message
« Reply #3 on: April 26, 2012, 05:35:00 pm »
If you're using gcc-4.7 then you should be ready for some breakages.
Install gcc-4.6 and everything will be fine.

If you're interested in using gcc-4.7 you have to add some regular expressions to match the new output.
This is done in the Settings -> Compiler -> Other -> Advanced options -> Output parsing.

p.s. Please next time follow the forum rules and post some info about your os/compiler/c::b versions. Our supplier of magic balls is out of stock and we are unable to guess all this info! :-P
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Online stahta01

  • Lives here!
  • ****
  • Posts: 7699
    • My Best Post
Re: Missing error message
« Reply #4 on: April 26, 2012, 05:45:16 pm »
Note: In gcc 4.7 Adding the "-fpermissive" compiler flag should stop most of the "required from" items from being errors.

Tim S.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline candy.chiu.ad

  • Single posting newcomer
  • *
  • Posts: 3
Re: Missing error message
« Reply #5 on: April 26, 2012, 06:24:16 pm »
Thanks and sorry for the missing information.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13406
    • Travis build status
Re: Missing error message
« Reply #6 on: April 26, 2012, 06:29:59 pm »
But you have not provided it again. Why?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]