Most recent kernel where this bug did not occur: 2.21.x Distribution: Gentoo Hardware Environment: 32-bit x86 Software Environment: Problem Description: 3rd-party applications, such as VMware, may fail to compile again header file: include/asm-i386/page.h for the sole reason of `page.h' using a very special GCC syntax rather than a more standard C syntax. The methods in question are: static inline pte_t native_make_pte(unsigned long long val) static inline pte_t native_make_pte(unsigned long val) They use a GCC extension for returning an anonymous struct with initial values. It was probably written this way to emphasize the `inline' nature of the method. Steps to reproduce: See the following bug for the only example I know of. https://bugs.gentoo.org/show_bug.cgi?id=182595 Note: This is more a recommendation as I anticipate it causing all sorts of bugs downstream. If you want to invalidate and recommend a different approach to this issue, please do so.
Created attachment 12016 [details] fix page.h syntax to be more standard C
Subject: Re: [Bugme-new] New: include/asm-i386/page.h syntax causes 3rd-party compilation failure On Thu, 12 Jul 2007 10:26:14 -0700 (PDT) bugme-daemon@bugzilla.kernel.org wrote: > 3rd-party applications, such as VMware, may fail to compile again header > file: > include/asm-i386/page.h > for the sole reason of `page.h' using a very special GCC syntax rather than a > more standard C syntax. > > The methods in question are: > static inline pte_t native_make_pte(unsigned long long val) > static inline pte_t native_make_pte(unsigned long val) Those applications should not be defining __KERNEL__, hence they should not be encountering this code. If the _are_ defining __KERNEL__, well, thwy should be prepared to handle kernel code.
Sorry. I was not explict. They are kernel modules, so I assume they define __KERNEL__. Thanks.
The kernel uses a superset of C, and compiling the kernel and modules with compilers that are not gcc compatible is not supported.