Fixed bug in C preprocessor: buffer size reduced to avoid allocation failure.
Added option -v for smlrc.
New example stdarg.c: a demo of function with variable arguments.
For LCC, please use /bin/lcc instead.
I believe SmallerC is mature enough to try to use it as a primary compiler.
System include files might need some changes (ifdefs) to adapt.
Up until now all the options in the config system have only been
able to take one word (or one string with no spaces) as a parameter.
This update improves it so it takes everything after the = up until
the end of the line (or the first #) as the parameter.
The following global/static pointer initialization should now work:
static char* p1 = "abc" + 1;
static char* p2 = "abc" - 1;
static char* p3 = 1 + "abc";
static int a333[3][3][3];
static int* pa333_111 = &a333[1][1][1];
Other seemingly (and in fact actually) functionality preserving changes
are only to reduce code size when self compiling for DOS using -seg16.
Improvements and fixes require space, sigh.
In the following
typedef struct S0 { char ac[4]; } T1;
int v26 = (int)&((T1*)0)->ac[3];
int v27 = &((T1*)0)->ac[3];
v27 should be initialized to 3 just as v26.
Improvements:
- support initialization of multidimensional arrays
- support initialization of structures
- support initialization of structures and arrays inside functions
- support static inside functions
Notes:
- Only fully-bracketed (sic) initialization of arrays is supported.
- && and || have been partially replaced with & and | to slightly reduce
code size when self compiling for DOS using -seg16.
On Mpide 0023-macosx-20130715 the path is /Applications/Mpide.app/Contents/Resources/Java/hardware/tools/avr
not
/Applications/Mpide.app/Contents/Resources/Java/hardware/tools