* [PATCH] jfs: Rename _inline to avoid conflict with clang's '-fms-extensions'
@ 2025-10-23 17:38 Nathan Chancellor
2025-10-23 20:31 ` Nicolas Schier
0 siblings, 1 reply; 2+ messages in thread
From: Nathan Chancellor @ 2025-10-23 17:38 UTC (permalink / raw)
To: Nicolas Schier, Linus Torvalds, Rasmus Villemoes
Cc: Nick Desaulniers, Bill Wendling, Justin Stitt, jfs-discussion,
linux-kernel, llvm, Dave Kleikamp, Nathan Chancellor
After commit 778740ee2d00 ("Kbuild: enable -fms-extensions"), building
fs/jfs fails with clang:
In file included from fs/jfs/jfs_unicode.c:8:
fs/jfs/jfs_incore.h:86:13: error: type name does not allow function specifier to be specified
86 | unchar _inline[128];
| ^
fs/jfs/jfs_incore.h:86:20: error: expected member name or ';' after declaration specifiers
86 | unchar _inline[128];
| ~~~~~~~~~~~~~~^
'-fms-extensions' in clang enables several other Microsoft specific
keywords such as _inline [1], presumably for compatibility with MSVC, as
Microsoft's documentation [2] mentions:
For compatibility with previous versions, _inline and _forceinline are
synonyms for __inline and __forceinline, respectively
Rename the _inline array in 'struct jfs_inode_info' to _inline_sym to
avoid this conflict, which is not a large workaround as this member is
only ever referred to via the i_inline macro.
Fixes: 778740ee2d00 ("Kbuild: enable -fms-extensions")
Link: https://github.com/llvm/llvm-project/blob/249883d0c5883996bed038cd82a8999f342994c9/clang/include/clang/Basic/TokenKinds.def#L744-L79 [1]
Link: https://learn.microsoft.com/en-us/cpp/c-language/inline-functions [2]
Acked-by: Dave Kleikamp <dave.kleikamp@oracle.com>
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
---
I will stuff this into kbuild-next by Saturday morning UTC unless
Nicolas is able to take it sooner to ensure it makes the Monday -next
release.
---
fs/jfs/jfs_incore.h | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/fs/jfs/jfs_incore.h b/fs/jfs/jfs_incore.h
index 10934f9a11be..5aaafedb8fbc 100644
--- a/fs/jfs/jfs_incore.h
+++ b/fs/jfs/jfs_incore.h
@@ -76,14 +76,14 @@ struct jfs_inode_info {
struct {
unchar _unused[16]; /* 16: */
dxd_t _dxd; /* 16: */
- /* _inline may overflow into _inline_ea when needed */
+ /* _inline_sym may overflow into _inline_ea when needed */
/* _inline_ea may overlay the last part of
* file._xtroot if maxentry = XTROOTINITSLOT
*/
union {
struct {
/* 128: inline symlink */
- unchar _inline[128];
+ unchar _inline_sym[128];
/* 128: inline extended attr */
unchar _inline_ea[128];
};
@@ -101,7 +101,7 @@ struct jfs_inode_info {
#define i_imap u.file._imap
#define i_dirtable u.dir._table
#define i_dtroot u.dir._dtroot
-#define i_inline u.link._inline
+#define i_inline u.link._inline_sym
#define i_inline_ea u.link._inline_ea
#define i_inline_all u.link._inline_all
---
base-commit: ac1280211e1c41704c756fd1bc5512f92010b3f0
change-id: 20251023-jfs-fix-conflict-with-clang-ms-ext-aa2d907909b9
Best regards,
--
Nathan Chancellor <nathan@kernel.org>
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH] jfs: Rename _inline to avoid conflict with clang's '-fms-extensions'
2025-10-23 17:38 [PATCH] jfs: Rename _inline to avoid conflict with clang's '-fms-extensions' Nathan Chancellor
@ 2025-10-23 20:31 ` Nicolas Schier
0 siblings, 0 replies; 2+ messages in thread
From: Nicolas Schier @ 2025-10-23 20:31 UTC (permalink / raw)
To: Linus Torvalds, Rasmus Villemoes, Nathan Chancellor
Cc: Nicolas Schier, Nick Desaulniers, Bill Wendling, Justin Stitt,
jfs-discussion, linux-kernel, llvm, Dave Kleikamp
On Thu, 23 Oct 2025 10:38:50 -0700, Nathan Chancellor wrote:
> After commit 778740ee2d00 ("Kbuild: enable -fms-extensions"), building
> fs/jfs fails with clang:
>
> In file included from fs/jfs/jfs_unicode.c:8:
> fs/jfs/jfs_incore.h:86:13: error: type name does not allow function specifier to be specified
> 86 | unchar _inline[128];
> | ^
> fs/jfs/jfs_incore.h:86:20: error: expected member name or ';' after declaration specifiers
> 86 | unchar _inline[128];
> | ~~~~~~~~~~~~~~^
>
> [...]
Applie to kbuild-next, thanks!
[1/1] jfs: Rename _inline to avoid conflict with clang's '-fms-extensions'
commit: 9b38933a351d4f4e95a192adfe21ec235632bf4c
Please note that commit hashes might change in case of issues with
kbuild-next branch.
Best regards,
--
Nicolas
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-10-23 20:31 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-23 17:38 [PATCH] jfs: Rename _inline to avoid conflict with clang's '-fms-extensions' Nathan Chancellor
2025-10-23 20:31 ` Nicolas Schier
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).