# Re: \[PATCH\] x86: efi: avoid BUILD\_BUG\_ON() for non-constant p4d\_index

- From: Borislav Petkov \<bp@alien8.de\>
- Date: 2021-01-15 19:19:37 
- List: linux-efi
- Page: https://ratatoskr.run/linux-efi/2021/01/6236928
- Thread: https://ratatoskr.run/linux-efi/2021/01/6227158/t.md

```text
On Fri, Jan 15, 2021 at 02:11:25PM -0500, Arvind Sankar wrote:
> That's how build-time assertions work: they are _supposed_ to be
> optimized away completely when the assertion is true. If they're
> _not_ optimized away, the build will fail.

Yah, that I know, thanks.

If gcc really inlines p4d_index() and does a lot more aggressive
optimization to determine that the condition is false and thus optimize
everything away (and clang doesn't), then that would explain the
observation.

-- 
Regards/Gruss,
    Boris.

https://people.kernel.org/tglx/notes-about-netiquette
```
