Date: Thu, 06 Mar 2025 14:51:53 -0800
On Thursday, 6 March 2025 14:16:47 Pacific Standard Time Marcin Jaczewski
wrote:
> > Please make your software reproducible: it should be bitwise exactly
> > identical if it is compiled by the same compiler.
>
> Isn't this even worse? could this cause ODR violations?
> As same inline function depend on time and two TU process it
> a couple of seconds apart, now both TU will have code generated
> differently.
Is it an ODR violation? It's the same definition, only the compiler produced
two different bit streams for it. It would be no different than applying
different optimisations. Which one ends up being used is arbitrary.
Likewise for __COUNTER__ and I think we've had a discussion on standardising
that (or not standardising).
wrote:
> > Please make your software reproducible: it should be bitwise exactly
> > identical if it is compiled by the same compiler.
>
> Isn't this even worse? could this cause ODR violations?
> As same inline function depend on time and two TU process it
> a couple of seconds apart, now both TU will have code generated
> differently.
Is it an ODR violation? It's the same definition, only the compiler produced
two different bit streams for it. It would be no different than applying
different optimisations. Which one ends up being used is arbitrary.
Likewise for __COUNTER__ and I think we've had a discussion on standardising
that (or not standardising).
-- Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org Principal Engineer - Intel DCAI Platform & System Engineering
Received on 2025-03-06 22:51:56