By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
426,248 Members | 1,979 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 426,248 IT Pros & Developers. It's quick & easy.

can the alignment of array elements letter than element size?

P: 1
I see https://gcc.gnu.org/ml/gcc-patches/2.../msg00253.html, but don't find the description in C ABI.

Expand|Select|Wrap|Line Numbers
  1. *** gcc.orig/gcc/stor-layout.c    Thu Sep 29 10:27:09 2005
  2. --- gcc/gcc/stor-layout.c    Wed Oct 5 15:00:30 2005
  3. *************** layout_type (tree type)
  4. *** 1817,1822 ****
  5. --- 1817,1828 ----
  6. TYPE_MODE (type) = BLKmode;
  7. }
  8. }
  9. + if (TYPE_SIZE_UNIT (element)
  10. + && TREE_CODE (TYPE_SIZE_UNIT (element)) == INTEGER_CST
  11. + && compare_tree_int (TYPE_SIZE_UNIT (element), 0) != 0
  12. + && compare_tree_int (TYPE_SIZE_UNIT (element),
  13. + TYPE_ALIGN_UNIT (element)) < 0)
  14. + error ("alignment of array elements is greater than element size");
  15. break;
  16. }
  17.  
Jun 15 '19 #1
Share this Question
Share on Google+
1 Reply


zmbd
Expert Mod 5K+
P: 5,397
What Exactly are you asking?
If you don't have a clear question - you cannot expect a clear answer.
Home>FAQ>How to Post and Answer Questions on Bytes
Jun 15 '19 #2

Post your reply

Sign in to post your reply or Sign up for a free account.