I’m developing an application protocol stack. It needs the ‘packed‘ feature so that the compiler does not automatically expand the protocol message structure, and the ‘weak‘ feature to allow users to override the default function implementation with their own.
I only know that my favorite compiler GCC provides relevant features, but users hope that they can use Clang and MSVC.
I found some answers on Google and Stack Overflow, but they are incomplete. It looks like Clang can use GCC’s directives directly, but MSVC doesn’t seem to support ‘weak‘.
Thanks.