Name: Anonymous 2010-07-02 9:46
Hi, I've done following ugly thing in C:
When I compile it with GNU it works, with Keil compiler it spews out random memory until a null byte is reached.
I'm just curious: what does standart say about this? Does anyone know?
void cmd_print_error_start(cmd_err_t error)
{
char* errstr;
switch(error)
{
case cmd_err_buffer : { errstr = "BUFFER OVERFLOW" ; break; }
...
case cmd_err_rpc_id : { errstr = "UNKNOWN RPC ID" ; break; }
}
cmd_print("ERROR: %02hX %s", error, errstr);
}When I compile it with GNU it works, with Keil compiler it spews out random memory until a null byte is reached.
I'm just curious: what does standart say about this? Does anyone know?