Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » static assignment of negative value to unsigned int
icon5.gif  static assignment of negative value to unsigned int [message #1444663] Tue, 14 October 2014 11:24
Thomas  Göttlich is currently offline Thomas GöttlichFriend
Messages: 7
Registered: July 2009
Junior Member
Hi everybody,

I have a problem with CDT's internal builder: when I try to use std::is_unsigned<unsigned int> internal code analysis reports false, i.e. the unsigned type is reported as being signed.

Looking at the implentation (I'm using MinGW with GCC 4.8 ) it seems as if the following statement is the culprit:

 static_cast<bool>(_Tp(-1) < _Tp(0))


In my case _Tp would be unsigned int and thus _Tp( -1 ) should result in 0xFFFFFFFF (assuming unsigned int being 32-bit) and the statement should yield false.

When building the application it works as described but as I already stated internal code analysis reports false and thus reports errors when trying to resolve templated methods in the editor.

It's not a critical problem since compilation works just fine, but it's highly annoying when errors are being reported where there are no errors.

Is this a bug or do I miss something?

Btw, I'm using CDT 8.5 and Luna.
Previous Topic:ARM-USB-OCD-H + Eclipse Luna + Demoboard STM32E407: Problem flash and debug
Next Topic:Default build behaviour when Cygwin is in PATH
Goto Forum:
  


Current Time: Thu Oct 10 20:41:27 GMT 2024

Powered by FUDForum. Page generated in 0.03646 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top