Fred Stevens - 2008-03-28

Hello,

When compiling the following code with sdcc-2.8.0rc2, I get the error listed.  The code did compile when using sdcc-2.7.0 without modification.  The code compiles with a type cast with 2.8.0rc2 but doesn't work properly.  The processor type is pic18f4550.

Thanks

    if((application_data.invalid == 0) && !PORTAbits.RA1)
    {
        // use application descriptors
        debug("use application descriptors\n");
        device_descriptor        = application_data.device_descriptor;
        configuration_descriptor = application_data.configuration_descriptor;
        string_descriptor        = application_data.string_descriptor;
    }
    else
    {
        // use boot descriptors
        debug("use boot descriptors\n");
        device_descriptor        = &boot_device_descriptor;
        configuration_descriptor = boot_configuration_descriptor;
        string_descriptor        = boot_string_descriptor;
    }

boot_configuration_descriptor is defined as:

    extern const uchar * const boot_configuration_descriptor[];

and configuration_descriptor is defined as:

    extern const void **configuration_descriptor;

The error message was:

boot_main.c:65: error 47: indirections to different types assignment
from type 'const-unsigned-char const-generic*  code-[] '
to type 'const-void generic*  generic* '