Challenges of refactoring C programs

Alejandra Garrido, Ralph E. Johnson · 2002

Refactoring has become a well-known technique for transforming code in a way that preserves behavior. Refactorings may be applied manually, although manual code manipulation is error prone and cumbersome, so maintainers need tools to make automatic refactorings. There is currently extensive literature on refactoring object-oriented programs and some very good tools for refactoring Smalltalk and Java code. Although there is more code written in C or C++ than in any other language, refactoring tools for C with full support for preprocessor directives have not yet appeared. The C programming language, especially the preprocessor directives that coexist with it, complicates refactorings in different ways as directives are not legal C code and may violate otherwise correct refactorings.

Read the paper · More papers on PaperTik