If I understand correctly, 'extern "C"' is not for converting arbitrary
C code to C++, but merely to tell the C++ compiler that the contained
declarations are for C functions. Interfacing C++ to C functions is
quite a different matter from compiling executable C code as C++.
Actually two or three things.
extern "C" on a (free) function declaration says that the function can
be called (from C++ code seeing this declaration) as a C function; in
practice this means the argument passing (and value return) and name
mangling (or otherwise). The function can be implemented/compiled in
either C, or C++, see next; and different people think differently as
to whether that counts as one or two features.
extern "C" on a (free) function definition also says the function can
be called as C, from either C++ or C code. Its *body* can still use
C++ features like new/delete and references and polymorphism, but its
interface can only use types compatible with C. You can use exceptions
within the C++, but whether it's safe to let them 'leak' to/across C
parts may depend on the (C++ and C) implementations. This can be
useful for example to provide a C library with a callback it can use.
The body of an extern "C" definition can contain code limited to the
(quite large) subset of C that is also valid and equivalent C++, but
there's no benefit in doing so; that might as well just remain a C
function (that C++ can call if needed).
Similarly if a function is implemented in C++ and will be called only
from C++, there's no benefit (and often some inconvenience) in using
extern "C" to make it C-compatible. But it is allowed.