0

The Lua programming language "is implemented in pure ANSI C" (specifically, C89) and "also compiles cleanly as C++" (i.e. C++98) [https://www.lua.org/faq.html#1.1].

In other words, it is written in a language, call it "LuaC", which is the intersection of C89 and C++98:

enter image description here

Since C89 is not a strict subset of C++98, there are parts of C89 which are not included in LuaC (represented by the blue area on the left of the diagram).

What are these parts? Which parts of C89 are not included in C++98 and, therefore, not included in LuaC?

In other words, which features of C89 are in the blue area, and must be avoided when writing C89 code which will also compile as C++98?

user200783
  • 13,722
  • 12
  • 69
  • 135
  • For the most part, I think it's less features and more stuff like "don't use `new` as a variable name". – user2357112 Nov 27 '17 at 04:17
  • Every version of C++ standard has a appendix about C compatibility. You can find a copy and take a look. –  Nov 27 '17 at 04:27

0 Answers0