I tried to compile FreeRTOS Demo Program, but SDCC reports an error message at xTaskCreate()funcition-call in the flush.c.
So, I made test program to look into the cause of the error and found an curious behavior.
Though I checked it on SDCC 3.5.0 and SDCC3.7.1 , both compiler says same error msg.
//***Source-A const char * const pMsg = "Hello World!\n"; void ss(const char* const * pDisp); void main(void) { ss((const char * const *)&pMsg); } void ss(const char* const * pDisp) { }
$ sdcc test.c
test.c:7: error 78: incompatible types // <=== Error occured !!! (What on earth is the matter?)
from type 'const-char generic const code fixed'
to type 'const-char generic const unknown fixed'
test.c:12: warning 85: in function ss unreferenced function argument : 'pDisp'
On the other hand.....
//***Source-B const char * const pMsg = "Hello World!\n"; void ss(const char* const * pDisp) { } void main(void) { ss((const char * const *)&pMsg); }
$ sdcc test.c
test.c:5: warning 85: in function ss unreferenced function argument : 'pDisp'
(There are no error messages)
Looks like I just fixed this one today in [r13388] while fixing bug [#2629].
Related
Bugs:
#2629Commit: [r13388]
Last edit: Maarten Brock 2022-04-16