-
c:\>"c:\Program Files\SDCC_2_9_3\bin\sdcc" --version
SDCC : mcs51/gbz80/z80/avr/ds390/pic16/pic14/TININative/xa51/ds400/hc08 2.9.3 #5536 (Oct 7 2009) (MINGW32)
c:\>"c:\Program Files\SDCC_2_9_3\bin\sdcc" a.c
Internal error: validateLink failed in DCL_TYPE(newType->opval.lnk) @ /home/sdcc-builder/build/sdcc-build/orig/sdcc/src/SDCCast.c:885: expected DECLARATOR, got SPECIFIER
Originally...
2009-10-08 12:51:12 UTC in Small Device C Compiler
-
But, Maarten,
while it is undoubtedly true that floating point arithmetic is memory intensive, I see no reason for this expression to use more than two intermediate (potentially spill) variables.
Indeed, trying to compile a function containing this expression, SDCC invariably produces only one spill variable (4 bytes).
So, there must be something else in the original function which produces...
2009-07-07 10:56:53 UTC in Small Device C Compiler
-
[I forgot that as a non-developer I can't attach files :-( ]
volatile unsigned char c;
typedef struct {
unsigned char b, b1;
} TStruct;
TStruct __xdata * * a;
void f(void) {
c = (*a)->b; // this line produces incorrect code
c = (*a)->b1; // this line results in error
c = (*(*a)).b; // these lines produce correct code
c = (*(*a)).b1;
}.
2009-07-07 08:35:03 UTC in Small Device C Compiler
-
To produce code, of course, the offending line has to be removed ;-)
The problem appears to be related to the double reference - a generic pointer pointing to a specific (xdata) pointer - and the '->' operator. The attached bug2.c is a simplified version demonstrating the same problem.
JW.
2009-07-07 08:29:07 UTC in Small Device C Compiler
-
Can you please post a complete program demonstrating the problem?
Jan Waclawek.
2009-07-07 06:06:36 UTC in Small Device C Compiler
-
dlist_good_front() works incorrectly, too, as (*obj) in the return expression is treated as if it would be a generic pointer rather than __xdata * .
Symptomatically, replacing (*obj)->nxt by (*(*obj)).nxt results in correct binary generated in both cases.
JW.
2009-07-07 06:05:19 UTC in Small Device C Compiler
-
Robert,
once you are in it, please check out and fix also the inadequate tests for case INC_OP: and case DEC_OP: just a few lines below the case for PTR_OP you have just patched.
The regression test function could include perhaps the following function:
void bar(void) {
char i;
for (i = 1; i
2009-06-07 14:00:15 UTC in Small Device C Compiler
-
Robert,
I discovered the file addition mechanism far below ;-) please check if I haven't distorted the patch somehow.
I haven't actually _run_ the compiled file, just checked the .lst files and they look fine; but will try to arrange for some sort of a real world check.
JW.
2009-06-01 08:29:04 UTC in Small Device C Compiler
-
OK so I learned how to compile SDCC on a WinXP machine under Cygwin/MINGW32 (after several failed attempts to get the include directories working properly I found out that this is extensively described in the manual.. :-( ); then fixed the patch (as the sourceforge machine distorted it severely, wrapping long lines in the mail and eating up all the spaces in the HTML - maybe it's better to...
2009-05-31 16:51:53 UTC in Small Device C Compiler
-
When running make clean to enable a clean remake of sdcc, object files (located in /obj subdirectories) in several subdirectories of /as are not removed.
Jan Waclawek.
2009-05-31 15:50:40 UTC in Small Device C Compiler