efriedma added a comment.

Oh, so you mean we need to consider whether we need to avoid emitting an error 
message when we're dealing with C++ code targeting i686-pc-win32, given we 
implement the alignment quirk.  I think I'd like to try printing an error 
message, given it's reasonably likely you'll actually end up with a miscompile 
if you use an array like that.  This might cause breakage, but I don't see a 
good alternative.  (We don't try to mitigate the possibility of misaligned 
operations in clang, so LLVM will see misaligned operations, so LLVM 
optimizations will likely mess up the code.  MSVC gets away with this because 
it doesn't really do alignment-based optimizations.)

For the gcc 10 vs. 11 thing, not sure how many people will notice.  The most 
likely possibility here is that someone tried to align a struct, but put the 
attribute in the wrong place.  Maybe we want a diagnostic note to point out 
this usage.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D133711/new/

https://reviews.llvm.org/D133711

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to