For grins, I thought I would try the C BASIC Test.c with CLING. Interesting results.
jrs@laptop:~/C_BASIC/cbclass$ cling
****************** CLING ******************
* Type C++ code and press enter to run it *
* Type .q to exit *
*******************************************
[cling]$ .L Test.c
In file included from -:1:
In file included from input_line_4:1:
In file included from ./Test.c:3:
In file included from ./BasicClassLibrary.h:6:
./BasicDefine.h:13:11: error: C++ operator 'and' cannot be used as a macro name
#define and &&
^
./BasicDefine.h:14:11: error: C++ operator 'or' cannot be used as a macro name
#define or ||
^
In file included from -:1:
In file included from input_line_4:1:
In file included from ./Test.c:3:
In file included from ./BasicClassLibrary.h:7:
./BasicSpace.c:32:11: error: cannot initialize a variable of type 'char *' with an rvalue of type 'void *'
char *v = malloc(count);
^ ~~~~~~~~~~~~~
./BasicSpace.c:41:10: error: cannot initialize a variable of type 'char *' with an lvalue of type 'void *'
char*s=sv;
^ ~~
./BasicSpace.c:42:10: error: cannot initialize a variable of type 'char *' with an lvalue of type 'void *'
char*t=tv;
^ ~~
./BasicSpace.c:74:10: error: cannot initialize a variable of type 'char *' with an rvalue of type 'void *'
char*t=malloc(n);
^ ~~~~~~~~~
In file included from -:1:
In file included from input_line_4:1:
In file included from ./Test.c:3:
In file included from ./BasicClassLibrary.h:8:
./GenericClass.c:55:42: error: expected ')'
sub SetObjectHeader (Object this,ref f,int le, int wi,int so);
^
./GenericClass.c:55:34: note: to match this '('
sub SetObjectHeader (Object this,ref f,int le, int wi,int so);
^
./GenericClass.c:73:12: error: cannot initialize a variable of type 'Object' (aka 'ClassStruct *') with an lvalue of type 'void *'
Object t=*pt;
^ ~~~
./GenericClass.c:84:12: error: cannot initialize a variable of type 'Object' (aka 'ClassStruct *') with an lvalue of type 'void *'
Object t=*pt;
^ ~~~
./GenericClass.c:96:12: error: cannot initialize a variable of type 'Object' (aka 'ClassStruct *') with an lvalue of type 'void *'
Object t=*pt;
^ ~~~
./GenericClass.c:106:30: error: expected ')'
sub SetObjectHeader(Object this,ref f,int le, int wi,int so)
^
./GenericClass.c:106:22: note: to match this '('
sub SetObjectHeader(Object this,ref f,int le, int wi,int so)
^
./GenericClass.c:108:5: error: invalid use of 'this' outside of a non-static member function
this->f = f;
^
./GenericClass.c:108:20: error: use of undeclared identifier 'f'
this->f = f;
^
./GenericClass.c:109:5: error: invalid use of 'this' outside of a non-static member function
this->offset = so;
^
./GenericClass.c:109:20: error: use of undeclared identifier 'so'
this->offset = so;
^
./GenericClass.c:110:5: error: invalid use of 'this' outside of a non-static member function
this->nbytes = le*wi;
^
./GenericClass.c:110:20: error: use of undeclared identifier 'le'
this->nbytes = le*wi;
^
./GenericClass.c:110:23: error: use of undeclared identifier 'wi'
this->nbytes = le*wi;
^
./GenericClass.c:111:5: error: invalid use of 'this' outside of a non-static member function
this->count = le;
^
fatal error: too many errors emitted, stopping now
[cling]$