Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is "Clean C" and how does it differ from standard C? [closed]

Tags:

c++

c

What are the differences between pure C and C in C++?

What are some details about 'Clean C' on which Lua is based? What are those features?

like image 369
timestee Avatar asked Mar 14 '12 01:03

timestee


People also ask

What is clean C?

The Clean C dialect is that subset of ANSI C that is compatible with the C++ language. Writing Clean C requires imposing coding conventions to the C code that restrict use to features that are acceptable to a C++ compiler. This section provides a summary of some of the more pertinent points to be considered.


1 Answers

Clean C is a term coined in Harbison & Steele book (C: A Reference Manual, Prentice Hall). A program is said to be written in Clean C if it can be compiled by a standard C compiler and a standard C++ compiler; and its execution would not produce different observable behavior from the two compilers (the issues of optimizations being irrelevant).

like image 136
ouah Avatar answered Oct 05 '22 17:10

ouah