public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Commit 258801563b breaks on old compilers
@ 2014-10-31 18:00 Boris Ostrovsky
  2014-10-31 18:19 ` Andy Lutomirski
  0 siblings, 1 reply; 2+ messages in thread
From: Boris Ostrovsky @ 2014-10-31 18:00 UTC (permalink / raw)
  To: Andy Lutomirski
  Cc: Linux Kernel Mailing List, Ingo Molnar, H. Peter Anvin,
	Thomas Gleixner

Andy,


Your commit 258801563b ("x86/vdso: Change the PER_CPU segment to use 
struct desc_struct") in -tip breaks old compilers that don't support 
initialization of anonymous structures (I think pre-4.6):

FC-64 <build@build-mk2:~/xtt-x86_64/bootstrap> cat anon.c
struct bar {
struct {
int i;
};
};

main()
{
struct bar a = {.i = 0};
}

FC-64 <build@build-mk2:~/xtt-x86_64/bootstrap> gcc --version|head -1
gcc (GCC) 4.4.4 20100503 (Red Hat 4.4.4-2)
FC-64 <build@build-mk2:~/xtt-x86_64/bootstrap> gcc anon.c
anon.c: In function ‘main’:
anon.c:9: error: unknown field ‘i’ specified in initializer
FC-64 <build@build-mk2:~/xtt-x86_64/bootstrap>


but

build@build-mk2 bootstrap]$ gcc --version|head -1
gcc (GCC) 4.6.3 20120306 (Red Hat 4.6.3-2)
[build@build-mk2 bootstrap]$ gcc anon.c
[build@build-mk2 bootstrap]$


-boris

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Commit 258801563b breaks on old compilers
  2014-10-31 18:00 Commit 258801563b breaks on old compilers Boris Ostrovsky
@ 2014-10-31 18:19 ` Andy Lutomirski
  0 siblings, 0 replies; 2+ messages in thread
From: Andy Lutomirski @ 2014-10-31 18:19 UTC (permalink / raw)
  To: Boris Ostrovsky
  Cc: linux-kernel@vger.kernel.org, H. Peter Anvin, Thomas Gleixner,
	Ingo Molnar

On Oct 31, 2014 10:58 AM, "Boris Ostrovsky" <boris.ostrovsky@oracle.com> wrote:
>
> Andy,
>
>
> Your commit 258801563b ("x86/vdso: Change the PER_CPU segment to use struct desc_struct") in -tip breaks old compilers that don't support initialization of anonymous structures (I think pre-4.6):

I bet it breaks clang, too.  Tip people, can you add:

http://ozlabs.org/~akpm/mmots/broken-out/arch-x86-vdso-vmac-fix-build-with-older-gcc.patch

Thanks!

>
> FC-64 <build@build-mk2:~/xtt-x86_64/bootstrap> cat anon.c
> struct bar {
> struct {
> int i;
> };
> };
>
> main()
> {
> struct bar a = {.i = 0};
> }
>
> FC-64 <build@build-mk2:~/xtt-x86_64/bootstrap> gcc --version|head -1
> gcc (GCC) 4.4.4 20100503 (Red Hat 4.4.4-2)
> FC-64 <build@build-mk2:~/xtt-x86_64/bootstrap> gcc anon.c
> anon.c: In function ‘main’:
> anon.c:9: error: unknown field ‘i’ specified in initializer
> FC-64 <build@build-mk2:~/xtt-x86_64/bootstrap>
>
>
> but
>
> build@build-mk2 bootstrap]$ gcc --version|head -1
> gcc (GCC) 4.6.3 20120306 (Red Hat 4.6.3-2)
> [build@build-mk2 bootstrap]$ gcc anon.c
> [build@build-mk2 bootstrap]$
>
>
> -boris

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-10-31 18:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-31 18:00 Commit 258801563b breaks on old compilers Boris Ostrovsky
2014-10-31 18:19 ` Andy Lutomirski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox