gcc bug !?
Posted on 1998-10-31
I think that I found some kind of bug in gcc.
This simple code to cycle through devices changes the last letter (device name, hda, hdb, etc)
This code compiles and runs fine on msDev, Borland, AIX V5.
When I compiled it on my Linux machine it results in a core dump (segmentation fault) as soon as you try to change the device letter.
char* sDev = "/dev/hd_\n", /* the '_' is char # 8 */
*p = NULL;
p = &sDev;
*p = ((char)0x61); /* ERROR on Linux */