The following code:
int swap(int a[static 1], int b[static 1])
{
...
}
works with GCC, Clang, and ICX, but MSVC chokes on static
in array parameters (or so I have been apprised by @Davilsor).
GNU C offers __attribute__((nonnull))
that is supported by Clang, GCC, and Intel’s compiler. Is there a similar mechanism that MSVC offers?
I am looking to define a portable macro that would work under all 4 compilers.