Documentation : Add note about irreproductability of __DATE

Signed-off-by: Gabriel Ravier <gabravier@gmail.com>
This commit is contained in:
Gabriel Ravier 2019-11-05 08:41:58 +01:00
parent 9c56888ffd
commit fa304081fe

View file

@ -27,7 +27,7 @@ void GetCompileDate(int *year, int *month, int *day)
months[10] = "Oct";
months[11] = "Nov";
months[12] = "Dec";
sscanf(__DATE__, "%s %d %d", month_string, day, year);
sscanf(__DATE__, "%s %d %d", month_string, day, year); // The expansion of __DATE__ is not reproductible. We might want to change this
for (i = 0; i < 12; ++i) // This being 12 instead of 13 might be a bug, but it works anyway by accident
if (!memcmp(&month_string, months[i], 3))