Share

Small Device C Compiler

Tracker: Bugs

5 Internal error - ID: 1618794
Last Update: Comment added ( maartenbrock )

<>/comm/opt/abSrc/18f/abrp<=>sdcc -v
SDCC : pic16/pic14 2.6.2 #4519 (Dec 19 2006) (UNIX)
<>/comm/opt/abSrc/18f/abrp<=>sdcc -mpic16 -p18f2550 -V --debug
-I/comm/opt/abSrc/18f/abrp/ -c atpo.c
+ "/usr/local/bin/sdcpp" -nostdinc -Wall -std=c99
-I"/comm/opt/abSrc/18f/abrp/" -Dpic18f2550 -D__18f2550 -DSTACK_MODEL_SMALL
-obj-ext=.o -DSDCC_MODEL_SMALL -DSDCC=262 -DSDCC_pic16 -D__pic16
-I"/usr/local/bin/../share/sdcc/include/pic16"
-I"/usr/local/share/sdcc/include/pic16" -I"/comm/opt/abSrc/18f/abrp/"
"atpo.c"
Internal error: validateLink failed in SPEC_SCLS(cexpr->etype) @
SDCCast.c:1518: expected SPECIFIER, got null-link
<>cat atpo.c


typedef unsigned char byte; // 8-bit
typedef unsigned int word; // 16-bit
typedef unsigned long dword; // 32-bit

#define DSC_STR 0x03

typedef struct {
byte tData[64];
} CFGTPLT;

CFGTPLT cfg01;

typedef struct {byte bLength;byte bDscType;word string[25];} SD001;
SD001 sd001 =
{ {sizeof(SD001)},{DSC_STR},{
'S','t','r','i','n','g',
'D','e','s','c','r','i','p','t','o','r',' ','0','0','0','1'}};

typedef struct {byte bLength;byte bDscType;word string[25];} SD002;
SD002 sd002 =
{{sizeof(SD002)},{DSC_STR},{
'S','t','r','i','n','g',
'D','e','s','c','r','i','p','t','o','r',' ','0','0','0','2'}};

// from usbdsc.c
typedef struct{
const unsigned char * cdTplt[2];
} USB_CD_TPLT;

typedef struct{
const unsigned char * sdTplt[3];
} USB_SD_TPLT;

USB_CD_TPLT USB_CD_Ptr = {
{&cfg01},
{&cfg01}
};

USB_SD_TPLT USB_SD_Ptr = {
{&sd001},
{&sd002}
} ;

#pragma udata usbram4 bdt0

byte bdt0;
byte bdt1;
byte bdt2;


Nobody/Anonymous ( nobody ) - 2006-12-19 14:23

5

Closed

Invalid

Maarten Brock

pic16 target

unreproducable

Public


Comments ( 2 )

Date: 2009-11-01 21:18
Sender: maartenbrockProject Admin

Indeed many incorrectly braced or otherwise incorrect initializers.
And does not produce the internal error (any more).


Date: 2008-03-13 20:36
Sender: rlar


not reproducible with #5087

The initialisation of USB_...TPLT is braced {} incorrectly.
Simply a completely broken piece of C.

Robert Larice



Attached File

No Files Currently Attached

Changes ( 5 )

Field Old Value Date By
status_id Open 2009-11-01 21:18 maartenbrock
resolution_id None 2009-11-01 21:18 maartenbrock
artifact_group_id None 2009-11-01 21:18 maartenbrock
assigned_to nobody 2009-11-01 21:18 maartenbrock
close_date - 2009-11-01 21:18 maartenbrock