jhuber6 wrote: > > Here, because the minimum alignment is 4, we will only increment the > > buffer by 4, > > It should be incrementing by the size? 4 byte aligned access of 8 byte type > should work fine
Guess that's an AMD thing, so I'm going to assume that @JonChesterfield wrote this intentionally to save on stack space? I suppose the issue I'm having with my `printf` implementation is that we then want to copy this struct and because it doesn't follow natural alignment the person printing it doesn't know where these are stored in a common sense. I suppose I could change the code to just be `ptr += sizeof(T)` instead of doing the alignment, but I feel like some architectures require strict alignment for these and it wouldn't work in the general case. https://github.com/llvm/llvm-project/pull/96370 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits