Sure, but keep in mind that Lua started development in 1993, when the only C standard that existed was C89, so any later standard wasn't even an option.
But why would you need to compile C code (especially something like a library) with a C++ compiler? If you want the library to support both C and C++, compile it with the correct compiler (i.e., a C compiler) and make the header files usable in both C and C++ (hint: use
extern "C" when a header is used in C++, i.e., when the
__cplusplus preprocessor macro is defined). You can even define macros in a common header to simplify this:
Code:
#ifdef __cplusplus
# define CPP_START extern "C" {
# define CPP_END }
#else
# define CPP_START
# define CPP_END
#endif
And then put
CPP_START at the top and
CPP_END at the bottom of each header file. I do things like this often and it works fairly painlessly.