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

Bug 354721

Summary: cannot parse static_cast inside loop statement
Product: [Tools] CDT Reporter: fengli <elwin_lee>
Component: cdt-coreAssignee: Project Inbox <cdt-core-inbox>
Status: RESOLVED INVALID QA Contact: Doug Schaefer <cdtdoug>
Severity: normal    
Priority: P3    
Version: 8.0   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:

Description fengli CLA 2011-08-15 07:15:00 EDT
Build Identifier: 

Below syntax cannot be parsed correctly, will report semantic error.
for (uint32 i = 0; i <
         static_cast<uint32>i;
         i++){
}

Upper is a pseudo code, the point is the static_cast keyword is not parsed correctly inside a for statement.

Reproducible: Always

Steps to Reproduce:
Below syntax cannot be parsed correctly, will report semantic error.
for (uint32 i = 0; i <
         static_cast<uint32>i;
         i++){
}

Upper is a pseudo code, the point is the static_cast keyword is not parsed correctly inside a for statement.
Comment 1 Markus Schorn CLA 2011-08-16 09:43:46 EDT
static_cast<xxx> requires parenthesis around its argument:
   static_case<uint32>(i)