The use of target-agnostic pragmas and attributes supported by clang are very likely to be portable, whereas a number of C28-specific pragmas and attributes will not be. See the compiler user guide for details.
The C29 compiler has a tool called c29clang-tidy which checks for use of C28 pragmas and suggest alternatives if available. This is discussed here (under c29migration-c28-pragmas)
The C29 Compiler user guide also discusses pragmas and attributes here and here