Compiling ATS to C++-compliant C code

It would be good to emit ATS as well. The ATS code would then be
translated
by the ATS compiler into C which would then be compiled as C++ into a
library
which is linked to the rest of the code. It’s essential that ATS
compiler emits
C code which is also compliant C++ code (the primary requirement is to
note
that C++ REQUIRES an explicit cast converting from a void * to another
pointer
type, C doesn’t: there are some other issues: C++ has strongly typed enums
for example, C doesn’t).

I have only done this on a very small scale.

Arduino programming uses C++. I compiled ATS source code into C code that
can be compiled by ‘arduino’, which uses g++ (?). I used -fpermissive to
bypass C++ typechecking.
Not sure if -fpermissive will soon be deprecated. To use another C++
compiler, we may need to insert
a lot of static_casts (and maybe reinterpret_casts). This probably should
be done by first implementing a
tool (atscc2c++).