Author Topic: C::B flags 'note:' as a compiler error (with patch)  (Read 5881 times)

gmb300

  • Guest
C::B flags 'note:' as a compiler error (with patch)
« on: September 13, 2007, 11:15:31 pm »
Example:
warning: 'nErr' may be used uninitialized in this function
note: 'nErr' was declared here
    ^ This line is not an error, it is the context of the warning message

The 'note:' gets flagged as an error.

Edited...
« Last Edit: September 14, 2007, 08:42:30 pm by gmb300 »

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: C::B reports some gcc compiler warnings as errors
« Reply #1 on: September 14, 2007, 06:51:00 am »
Since I set the maximum error limit to 5 this prevents me from seeing any real errors.
So why do you set such a low limit then?! :shock:
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

gmb300

  • Guest
Re: C::B reports some gcc compiler warnings as errors
« Reply #2 on: September 14, 2007, 08:38:41 pm »
Patch

I created a patch which treats 'note:' lines as information. But only for the MingW/GCC target. It might be a good idea to add these regexes to all the GCC based compiler targets.

[attachment deleted by admin]

Offline Biplab

  • Developer
  • Lives here!
  • *****
  • Posts: 1874
    • Biplab's Blog
Re: C::B reports some gcc compiler warnings as errors
« Reply #3 on: October 19, 2007, 11:07:12 am »
Patch

I created a patch which treats 'note:' lines as information. But only for the MingW/GCC target. It might be a good idea to add these regexes to all the GCC based compiler targets.

Applied in revision 4544. Thanks for the patch. :)
Be a part of the solution, not a part of the problem.

Offline darthdespotism

  • Almost regular
  • **
  • Posts: 163
    • Coder's Nemesis
Re: C::B flags 'note:' as a compiler error (with patch)
« Reply #4 on: October 19, 2007, 01:33:40 pm »
MinGW only?

Can be annoying with nativ gcc on Gnu/Linux, too ;)

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: C::B flags 'note:' as a compiler error (with patch)
« Reply #5 on: October 19, 2007, 02:03:18 pm »
MinGW only?

Can be annoying with nativ gcc on Gnu/Linux, too ;)

It's the same compiler...
Be patient!
This bug will be fixed soon...

Offline darthdespotism

  • Almost regular
  • **
  • Posts: 163
    • Coder's Nemesis
Re: C::B flags 'note:' as a compiler error (with patch)
« Reply #6 on: October 19, 2007, 11:00:26 pm »
It's the same compiler...

Yes but the author only mentions MinGW and excludes explicitely other GCCs from his Patch.

Doing an update right now ;)