Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 317000

Summary: Parser does not like negative integers in comparisons
Product: [Tools] CDT Reporter: Pieter <pieter.kapsenberg>
Component: cdt-parserAssignee: Project Inbox <cdt-parser-inbox>
Status: CLOSED WORKSFORME QA Contact: Mike Kucera <mikekucera>
Severity: normal    
Priority: P3    
Version: 7.0   
Target Milestone: ---   
Hardware: All   
OS: Windows XP   
Whiteboard:

Description Pieter CLA 2010-06-16 01:31:24 EDT
Build Identifier: 20100218-1602

In this piece of code:

int16_t val16;

if(val16 > -10) {
    ; // Do stuff
}


I get a syntax error on the left side of the editor that says "Bad character sequence encountered: -".
The compiler I am using, gcc-avr, has no problem with this and compiles without warnings.

Reproducible: Always

Steps to Reproduce:
1. Make small .c file with above code somewhere, in main() for example. 
2. Observe syntax error warning.
Comment 1 Pieter CLA 2010-06-16 01:37:19 EDT
Ok strange, this doesn't occur in a new file I made, and where I first saw it, it no longer happens when I edit the file some more. It isn't easy to tell what causes this to show up....