Bug 425465 - Compilation error when renaming function with invalid name (keyword)
Summary: Compilation error when renaming function with invalid name (keyword)
Status: NEW
Alias: None
Product: CDT
Classification: Tools
Component: cdt-refactoring (show other bugs)
Version: Next   Edit
Hardware: PC Mac OS X
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact: Jonah Graham CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-01-10 22:55 EST by Gustavo Wagner CLA
Modified: 2020-09-04 15:20 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 Gustavo Wagner CLA 2014-01-10 22:55:45 EST
Eclipse IDE for C/C++ Developers
Version: Kepler Service Release 1
Build id: 20130919-0819


Reproducing the bug:


Consider the following code:
============== Original Version ===============
int main(int a, char** argv) { // Function "main" to be renamed to "int"
    return a;
}
===============================================

After applying the refactoring, we have the resulting code:

============= Refactored Version ==============
int int(int a, char** argv) { // Renamed function
    return a;
}
===============================================

The refactoring tool allows to rename functions with invalid names, like the keyword "int", leading to a compiling error.


Thanks in advance.