Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

  ...
  } __attribute__((packed));
I would encourage the placement of attributes before the objects they apply to. This has been allowed by GCC since the standardized attribute syntax was added to C++. It is a more natural fit for code that will eventually be upgraded to C23 attribute syntax in the future and is more prominently visible to a reader. It also avoids the sometimes awkward GCC rules for postfix attributes.


Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: