https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53431

--- Comment #37 from Jonathan Wakely <redi at gcc dot gnu.org> ---
From PR 89806:

Sample code:

#pragma GCC diagnostic ignored "-Wdate-time"
const char* g_test = "dirty-" __DATE__;

When compiling with g++ (g++ -Werror=date-time) this produces:

<source>:2:31: error: macro "__DATE__" might prevent reproducible builds
[-Werror=date-time]

    2 | const char* g_test = "dirty-" __DATE__;

      |                               ^~~~~~~~

cc1plus: some warnings being treated as errors

Compiler returned: 1

But with GCC this compiles without errors (gcc -Werror=date-time).

Reply via email to