C++ Logo

sg15

Advanced search

Re: [isocpp-sg15] [P2758] Emitting messages at compile time

From: Boris Kolpackov <boris_at_[hidden]>
Date: Mon, 28 Oct 2024 09:51:39 +0200
Gabriel Dos Reis <gdr_at_[hidden]> writes:

> If the generated code is using some intermediary file that the compiler
> can surface to the build system, that would work. My concern though is
> around code generation at compile time that does not use any intermediary
> file surfaced to the build system. If that process is not deterministic
> (because of arbitrary side effects) then, I think we have a problem with
> how build systems work today. Do you agree?

Sure, though I don't think this is a novel problem: you can already
easily achieve such non-determinism with the __DATE__/__TIME__ macros.
I don't know of any build system that cares to handle such cases (beyond
the "don't do this if you want deterministic/reproducible builds" advice
to the user). And I don't believe this will change.

Received on 2024-10-28 07:50:41