Dear aceshigh99,
Tried this with Codewarrior ver 5 and the strings appear correctly in memory. A minor point is that the "\0" and curly brackets are redundant.
Can I suggest running your sample code using the simulator and inspecting the memory? You can also right-click and use pre-process to see the code produced after the pre-processor substitutions.
The actual code I tested is below. I used the ch =.... to conveniently determine the string's address in memory. Both strings appear correctly in memory. Adding the brackets etc had no effect. Added volatile to prevent the 1st assignment being optimised away (had no effect on the problem though).
Perhaps your check code has a problem?
#include <hidef.h> /* for EnableInterrupts macro */#include "derivative.h" /* include peripheral declarations */ volatile const char date_check[] = __DATE__; volatile const char time_check[] = __TIME__; void main(void) { char ch; ch = date_check[0]; ch = time_check[0]; for(;;) { __RESET_WATCHDOG(); /* feeds the dog */ } /* loop forever */ /* please make sure that you never leave main */}