Hi guys,
I'm using piklab 0.14.5 and sdcc 2.7.3 for pic18f2680, but I getting
error when using inline functions.

This is a simple inline function test:

inline void delay_ms(long ms)
{
    long i;

    while (ms--)
        for (i=0; i < 100; i++) ;
}

void main()
{

    LED_TRIS = 0;

    for (;;)
    {
        LED_PIN = 0;
        delay_ms(250);
        LED_PIN = 1;
        delay_ms(250);
    }
}

When compiling I get this error:

sdcc -mpic16 -p18f2680 -V -I/home/alan/pic/hello/ -c hello.c
+ "/usr/local/bin/sdcpp" -nostdinc -Wall -std=c99
-I"/home/alan/pic/hello/" -Dpic18f2680 -D__18f2680 -DSTACK_MODEL_SMALL
-obj-ext=.o -DSDCC_MODEL_SMALL -DSDCC=273 -DSDCC_pic16 -D__pic16
-I"/usr/local/bin/../share/sdcc/include/pic16"
-I"/usr/local/share/sdcc/include/pic16" -I"/home/alan/pic/hello/"
"hello.c"
hello.c:64: token -> 'void' ; column 11
*** Exited with status: 1 ***

Removing "inline" everything goes fine. But I know Erick add inline
functions in sdcc 2.7.0. Why it is not working?

Cheers,

Alan

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Sdcc-user mailing list
Sdcc-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sdcc-user

Reply via email to