diff options
| author | Wladimir J. van der Laan <[email protected]> | 2020-01-08 14:40:23 +0100 |
|---|---|---|
| committer | Wladimir J. van der Laan <[email protected]> | 2020-01-08 14:40:38 +0100 |
| commit | b065df803ce2969193ff273457cceb781b433177 (patch) | |
| tree | 45167243b5068a235e88a47c407e3d6cdc2cdb8b /src/httpserver.cpp | |
| parent | Merge #17826: qt: Log Qt related info (diff) | |
| parent | build: add Wdate-time to Werror flags (diff) | |
| download | discoin-b065df803ce2969193ff273457cceb781b433177.tar.xz discoin-b065df803ce2969193ff273457cceb781b433177.zip | |
Merge #17880: build: add -Wdate-time to Werror flags
b0a254019c3bc8a353c1304ee65a55cfb3d4ecac build: add Wdate-time to Werror flags (fanquake)
Pull request description:
`-Wdate-time`
Warn when macros __TIME__, __DATE__ or __TIMESTAMP__ are encountered as
they might prevent bit-wise-identical reproducible compilations.
This is supported by [GCC](https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html) and [Clang](https://clang.llvm.org/docs/DiagnosticsReference.html#wdate-time).
Example output:
```bash
CXX bitcoind-bitcoind.o
bitcoind.cpp:48:20: warning: expansion of date or time macro is not reproducible [-Wdate-time]
printf("%s\n", __TIMESTAMP__);
^
bitcoind.cpp:49:20: warning: expansion of date or time macro is not reproducible [-Wdate-time]
printf("%s\n", __TIME__);
^
bitcoind.cpp:50:20: warning: expansion of date or time macro is not reproducible [-Wdate-time]
printf("%s\n", __DATE__);
^
3 warnings generated.
```
ACKs for top commit:
practicalswift:
ACK b0a254019c3bc8a353c1304ee65a55cfb3d4ecac -- diff looks correct and guarding against potential non-reproducibility is good :)
promag:
Tested ACK b0a254019c3bc8a353c1304ee65a55cfb3d4ecac on macos with clang. Already had `--enable-werror`, added a wild `printf("%s\n", __TIMESTAMP__)` and got the following error:
laanwj:
ACK b0a254019c3bc8a353c1304ee65a55cfb3d4ecac
hebasto:
ACK b0a254019c3bc8a353c1304ee65a55cfb3d4ecac
Tree-SHA512: b3a0b426e06dcd0c0baa94118c31158760b9690a8d0a15b5a2d544cb0879522e02817e134ef7346c707de09719818fc7e4bad1b3ad6b2dfe5e3c4169cdf5cb0d
Diffstat (limited to 'src/httpserver.cpp')
0 files changed, 0 insertions, 0 deletions