* Compile warnings due to missing __inline__ in fs/xfs/xfs_log.h
@ 2002-12-17 16:01 Thomas Schlichter
2002-12-17 17:55 ` Stephen Lord
0 siblings, 1 reply; 3+ messages in thread
From: Thomas Schlichter @ 2002-12-17 16:01 UTC (permalink / raw)
To: linux kernel mailing list
As the __inline__ directive in front of the _lsn_cmp function is not used with
the gcc version 2.95.x, compile-warnings result from many files including this
header-file.
Is there any reason why this function is not inlined with these compiler
versions? As I used following patch and compiled the kernel with my
gcc2.95.3(SuSE) and an other gcc2.95.4(Debian) these compiler warnings
disappeared and no additional warning or error occured...
Is there an difference between '__inline__' and 'inline'?
Is 'inline' not part of the ANSI-C standard and so should be preferred?
Thanks
Thomas Schlichter
diff -u linux-2.5.52/fs/xfs/xfs_log.h linux-2.5.52_patched/fs/xfs/xfs_log.h
--- linux-2.5.52/fs/xfs/xfs_log.h Mon Dec 16 03:08:24 2002
+++ linux-2.5.52_patched/fs/xfs/xfs_log.h Tue Dec 17 15:00:13 2002
@@ -52,12 +52,7 @@
* By comparing each compnent, we don't have to worry about extra
* endian issues in treating two 32 bit numbers as one 64 bit number
*/
-static
-#ifdef __GNUC__
-# if !((__GNUC__ == 2) && (__GNUC_MINOR__ == 95))
-__inline__
-#endif
-#endif
+static inline
xfs_lsn_t _lsn_cmp(xfs_lsn_t lsn1, xfs_lsn_t lsn2, xfs_arch_t arch)
{
if (CYCLE_LSN(lsn1, arch) != CYCLE_LSN(lsn2, arch))
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: Compile warnings due to missing __inline__ in fs/xfs/xfs_log.h
2002-12-17 16:01 Compile warnings due to missing __inline__ in fs/xfs/xfs_log.h Thomas Schlichter
@ 2002-12-17 17:55 ` Stephen Lord
2002-12-18 0:05 ` Thomas Schlichter
0 siblings, 1 reply; 3+ messages in thread
From: Stephen Lord @ 2002-12-17 17:55 UTC (permalink / raw)
To: Thomas Schlichter; +Cc: Linux Kernel Mailing List
On Tue, 2002-12-17 at 10:01, Thomas Schlichter wrote:
> As the __inline__ directive in front of the _lsn_cmp function is not used with
> the gcc version 2.95.x, compile-warnings result from many files including this
> header-file.
>
> Is there any reason why this function is not inlined with these compiler
> versions? As I used following patch and compiled the kernel with my
> gcc2.95.3(SuSE) and an other gcc2.95.4(Debian) these compiler warnings
> disappeared and no additional warning or error occured...
The reason inline is turned off for this compiler version is that it
generates bad code when inlining this code. So you can have a quiet
compile, or bad code.
Steve
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Compile warnings due to missing __inline__ in fs/xfs/xfs_log.h
2002-12-17 17:55 ` Stephen Lord
@ 2002-12-18 0:05 ` Thomas Schlichter
0 siblings, 0 replies; 3+ messages in thread
From: Thomas Schlichter @ 2002-12-18 0:05 UTC (permalink / raw)
To: Stephen Lord; +Cc: Linux Kernel Mailing List
OK, thanks for that info, now I understand...
So I think I better take the warnings ;-)
Thomas
Am Dienstag, 17. Dezember 2002 18:55 schrieb Stephen Lord:
> On Tue, 2002-12-17 at 10:01, Thomas Schlichter wrote:
> > As the __inline__ directive in front of the _lsn_cmp function is not used
> > with the gcc version 2.95.x, compile-warnings result from many files
> > including this header-file.
>
> The reason inline is turned off for this compiler version is that it
> generates bad code when inlining this code. So you can have a quiet
> compile, or bad code.
>
> Steve
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2002-12-17 23:57 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-12-17 16:01 Compile warnings due to missing __inline__ in fs/xfs/xfs_log.h Thomas Schlichter
2002-12-17 17:55 ` Stephen Lord
2002-12-18 0:05 ` Thomas Schlichter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox