0

Is there a system call/library function to get alignment of a type (e. g. int or double) in Linux? Also can I get the minimum alignment that suffices all types?

Thomas Dickey
  • 51,086
  • 7
  • 70
  • 105
Hrant
  • 496
  • 1
  • 5
  • 13

1 Answers1

0

The C11 standard introduces the _Alignof operator, and the convenience macro alignof.

Also, GCC has had the __alignof__ keyword for a while.

mtijanic
  • 2,872
  • 11
  • 26