casting problem in c
Rajesh Cheethirala
rajeshc@empowertel.com
Mon Jul 31 12:21:00 GMT 2000
If I have code that looks like this:
/* put component tag */
*pdup.uc++ = TC_ERROR;
/* leave the length indicator blank */
pdup.us++;
I get a core dump after I build and execute at the last line.
The union looks like this
typedef union
{
pduhdr_t *hdr;
unsigned char *ptag;
void *vp; /* internal use only */
char *c;
unsigned char *uc;
short *s;
unsigned short *us;
int *i;
unsigned int *ui;
long *l;
unsigned long *ul;
} pduptr_t;
My system configuration is as follows:
System Configuration: Sun Microsystems sun4u
Memory size: 2432 Megabytes
System Peripherals (Software Nodes):
SUNW,Ultra-4
SunOS helia 5.6 Generic_105181-17 sun4u sparc
Thanks
Rajesh
More information about the Gcc-bugs
mailing list