History

compiler, clang: properly override 'inline' for clang

Commit abb2ea7dfd82 ("compiler, clang: suppress warning for unused static inline functions") just caused more warnings due to re-defining the 'inline' macro. So undef it before re-defining it, and also add the 'notrace' attribute like the gcc version that this is overriding does. Maybe this makes clang happier.

Linus Torvalds committed 9 years ago

Commit 6d53cef1 parent 5ad93451 file · +2 −1Browse files

Showing the changes to include (1 of 1 file). Show all

Unified · Split

include/linux/compiler-clang.h+2−1
@@ -21,4 +21,5 @@ · 20 unmodified lines
2121 * -Wunused-function. This turns out to avoid the need for complex #ifdef
2222 * directives. Suppress the warning in clang as well.
2323 */
24−#define inline inline __attribute__((unused))
24+#undef inline
25+#define inline inline __attribute__((unused)) notrace

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t