Bug 396361 - CDT allows renaming declarations in system headers/external libraries
Summary: CDT allows renaming declarations in system headers/external libraries
Status: NEW
Alias: None
Product: CDT
Classification: Tools
Component: cdt-refactoring (show other bugs)
Version: 8.1.1   Edit
Hardware: PC Linux
: P3 minor (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact: Jonah Graham CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-12-11 18:11 EST by Farnaz Behrang CLA
Modified: 2020-09-04 15:21 EDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Farnaz Behrang CLA 2012-12-11 18:11:55 EST
In the following C file, CDT's Rename refactoring allows renaming both "fprintf" and "stdout" without raising an error; however, since they are declared in a system header and defined in an external library, the resulting program will not compile.

#include <stdio.h>
int main() {
    fprintf(stdout, "\n");
    return 0;
}

Obviously, this example is contrived, but a similar situation can occur with other third-party libraries in a large project.