https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98641
--- Comment #8 from Alex Richardson
---
(In reply to Jakub Jelinek from comment #3)
> I guess I have big questions on what exactly will it do during constexpr
> evaluation - if it is on a pointer to object with certain alignment, for
> smaller a
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98641
--- Comment #7 from Jakub Jelinek ---
(In reply to Alex Richardson from comment #5)
> extern int i;
> _Static_assert(__builtin_is_aligned(__builtin_assume_aligned(&i, 16), 8),
> "");
> generates an "alignment of the base pointee object (4 bytes)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98641
--- Comment #6 from Alex Richardson
---
(In reply to Jakub Jelinek from comment #3)
> assume_aligned is something different, I guess __builtin_is_aligned expands
> to an actual runtime check (perhaps optimized away if the pointer can't be
> misa
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98641
Alex Richardson changed:
What|Removed |Added
CC||Alexander.Richardson at cl dot
cam
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98641
--- Comment #4 from Jonathan Wakely ---
(In reply to Jakub Jelinek from comment #3)
> assume_aligned is something different, I guess __builtin_is_aligned expands
> to an actual runtime check (perhaps optimized away if the pointer can't be
> misal
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98641
Jakub Jelinek changed:
What|Removed |Added
CC||jakub at gcc dot gnu.org
--- Comment #3
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98641
--- Comment #2 from Jonathan Wakely ---
We could make immediate use of these in libstdc++. We have std::align and
std::assume_aligned in include/bits/align.h, and aligned_ceil in
src/c++17/memory_resource.cc, and a couple of places in libsupc++/n
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98641
Richard Biener changed:
What|Removed |Added
Severity|normal |enhancement
Version|unknown
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98641
--- Comment #1 from ktkachov at gcc dot gnu.org ---
The component is marked as C++, but it would be good to have these in C as
well.