Bug 505366 - Signed and unsigned math and comparisions
Summary: Signed and unsigned math and comparisions
Status: NEW
Alias: None
Product: CDT
Classification: Tools
Component: cdt-indexer (show other bugs)
Version: Next   Edit
Hardware: PC Windows NT
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact: Jonah Graham CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-10-07 08:25 EDT by trampas CLA
Modified: 2020-09-04 15:26 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description trampas CLA 2016-10-07 08:25:03 EDT
It would be great if CDT checked for signed and unsigned compares. For example this is a bad thing in C:

unsigned int i;

if (i<0)
{
...
}

or the following is also questionable
unsigned int i;
int j
j=i*j; 

I know that gcc will catch and warn about a lot of these type of errors it would be great if cdt indexer did as well, or had the option.