Warning about __DATE__ and __TIME__

Tobias Burnus burnus@net-b.de
Sun Oct 27 21:09:00 GMT 2013


Gerald Pfeifer wrote:
> To make it easier to reproduce builds of software and entire GNU/Linux
> distributions, RMS had the idea of adding a warning to GCC that warns
> about the use of __DATE__ and __TIME__.

I assume that he also likes to have a warning for __TIMESTAMP__.

> I was thinking a new warning -Wdate-time or similar could address
> this.
> Any volunteers implementing this?

Do you mean something like the attached patch? (Only lightly tested.)

Tobias
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Wdate-time.diff
Type: text/x-patch
Size: 6481 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc/attachments/20131027/8ea44025/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: warn.c
Type: text/x-csrc
Size: 328 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc/attachments/20131027/8ea44025/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: warn.cc
Type: text/x-c++src
Size: 328 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc/attachments/20131027/8ea44025/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: warn.F90
Type: text/x-fortran
Size: 267 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc/attachments/20131027/8ea44025/attachment-0003.bin>


More information about the Gcc mailing list