Open richardebeling opened 1 year ago
This code:
#include <iostream> #include <cstdint> template <typename T=void> using TemplatedT __attribute__((aligned(8))) = uint32_t; using ManualT __attribute__((aligned(8))) = uint32_t; int main() { std::cout << "alignof Template: " << alignof(TemplatedT<>) << std::endl; std::cout << "alignof Manual: " << alignof(ManualT) << std::endl; }
prints (godbolt)
alignof Template: 4 alignof Manual: 8
when compiled with clang (in the version currently available as "trunk" on godbolt).
I would have expected both types to have an alignment of 8. I've asked on StackOverflow, and the comments indicated this may be a bug, so I'm reporting this here.
@llvm/issue-subscribers-clang-codegen
@llvm/issue-subscribers-clang-frontend
This code:
prints (godbolt)
when compiled with clang (in the version currently available as "trunk" on godbolt).
I would have expected both types to have an alignment of 8. I've asked on StackOverflow, and the comments indicated this may be a bug, so I'm reporting this here.