Thank you, anakha
I forgot to mention that the same source is compiler error free using C. I got the error messages after renaming the program from .c to .cpp.
Below is the relevant source codes:
-----------
alt_irq_register(UART_IRQ,&context_uart,IsrUart );
OSTaskCreateExt(task1,
NULL,
(void *)&task1_stk[TASK_STACKSIZE-1],
TASK1_PRIORITY,
TASK1_PRIORITY,
task1_stk,
TASK_STACKSIZE,
NULL,
0);
OSTaskCreateExt(task2,
NULL,
(void *)&task2_stk[TASK_STACKSIZE-1],
TASK2_PRIORITY,
TASK2_PRIORITY,
task2_stk,
TASK_STACKSIZE,
NULL,
0);
----------