PragmaTwice opened a new pull request, #18114:
URL: https://github.com/apache/tvm/pull/18114

   Some changes:
   - `__attribute__((unused))` is replaced by C++ standard attribute 
`[[maybe_unused]]` 
(https://en.cppreference.com/w/cpp/language/attributes/maybe_unused.html)
   - `__forceinline` is replaced by `[[msvc::forceinline]]` (MSVC: 
https://learn.microsoft.com/en-us/cpp/cpp/attributes?view=msvc-170#msvcforceinline)
   - `__attribute__((always_inline))` is replaced by `[[gnu::always_inline]]` 
(Clang: 
https://clang.llvm.org/docs/AttributeReference.html#always-inline-force-inline, 
GCC: https://gcc.gnu.org/onlinedocs/gcc/Attribute-Syntax.html)
   - `__declspec(noinline)` is replaced by `[[msvc::noinline]]` (MSVC: 
https://learn.microsoft.com/en-us/cpp/cpp/attributes?view=msvc-170#msvcnoinline)
   - `__attribute__((noinline))` is replaced by `[[gnu::noinline]]` (Clang: 
https://clang.llvm.org/docs/AttributeReference.html#noinline, GCC: 
https://gcc.gnu.org/onlinedocs/gcc/Attribute-Syntax.html)
   
   The specifier sequences in many declarations are reordered since:
   ```
   [[attr]] static inline int a = 0; // OK
   static inline int a [[attr]] = 0; // OK
   
   static [[attr]] inline int a = 0; // NOT OK, mixed specifiers
   static inline [[attr]] int a = 0; // NOT OK, attr is applied to the type
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to