From: Trond Myklebust <trondmy@primarydata.com>
To: "boris.ostrovsky@oracle.com" <boris.ostrovsky@oracle.com>,
"Anna.Schumaker@Netapp.com" <Anna.Schumaker@Netapp.com>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-nfs@vger.kernel.org" <linux-nfs@vger.kernel.org>
Subject: Re: Commit fcd8843c40 breaks old compilers
Date: Sat, 18 Nov 2017 17:39:45 +0000 [thread overview]
Message-ID: <1511026783.10238.2.camel@primarydata.com> (raw)
In-Reply-To: <09a3d9ca-d191-5899-613d-8d0dbe0b68ea@oracle.com>
On Sat, 2017-11-18 at 12:19 -0500, Boris Ostrovsky wrote:
> Commit fcd8843c406b46433857ae45e5e9d84b01a7d20b breaks on older
> compilers which cannot process initializers for anonymous structures:
>
> +const nfs4_stateid invalid_stateid = {
> + {
> + .seqid = cpu_to_be32(0xffffffffU),
> + .other = { 0 },
> + },
> + .type = NFS4_INVALID_STATEID_TYPE,
> +};
>
>
> /home/build/linux-linus/fs/nfs/nfs4state.c:74: error: unknown field
> ‘seqid’ specified in initializer
> /home/build/linux-linus/fs/nfs/nfs4state.c:74: warning: missing
> braces
> around initializer
> /home/build/linux-linus/fs/nfs/nfs4state.c:74: warning: (near
> initialization for ‘invalid_stateid.<anonymous>.data’)
> /home/build/linux-linus/fs/nfs/nfs4state.c:74: warning: overflow in
> implicit constant conversion
> /home/build/linux-linus/fs/nfs/nfs4state.c:75: error: unknown field
> ‘other’ specified in initializer
> /home/build/linux-linus/fs/nfs/nfs4state.c:75: error: extra brace
> group
> at end of initializer
> /home/build/linux-linus/fs/nfs/nfs4state.c:75: error: (near
> initialization for ‘invalid_stateid.<anonymous>’)
> /home/build/linux-linus/fs/nfs/nfs4state.c:75: warning: excess
> elements
> in union initializer
> /home/build/linux-linus/fs/nfs/nfs4state.c:75: warning: (near
> initialization for ‘invalid_stateid.<anonymous>’)
> make[4]: *** [fs/nfs/nfs4state.o] Error 1
> make[3]: *** [fs/nfs] Error 2
>
>
> FC-64 <build@build-mk2:~> gcc --version
> gcc (GCC) 4.4.4 20100503 (Red Hat 4.4.4-2)
>
>
> A similar bug was fixed by e0714ec4f9efe7b86828b0dcc077fd8f5d8e5e91
> but
> I don't think the same approach can work here.
I don't have any setups with gcc 4.4.4. What is it expecting here? Is
it expecting an extra set of braces due to the anonymous "struct"?
--
Trond Myklebust
Linux NFS client maintainer, PrimaryData
trond.myklebust@primarydata.com
next prev parent reply other threads:[~2017-11-18 17:40 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-18 17:19 Commit fcd8843c40 breaks old compilers Boris Ostrovsky
2017-11-18 17:39 ` Trond Myklebust [this message]
2017-11-18 18:07 ` Boris Ostrovsky
2017-11-18 18:12 ` Trond Myklebust
2017-11-18 18:32 ` Boris Ostrovsky
2017-11-18 18:50 ` [PATCH] NFSv4: Ensure gcc 4.4.4 can compile initialiser for "invalid_stateid" Trond Myklebust
2017-11-18 19:26 ` Boris Ostrovsky
2017-11-19 10:58 ` Geert Uytterhoeven
2017-11-20 12:52 ` Commit fcd8843c40 breaks old compilers Arnd Bergmann
2017-11-20 14:11 ` Boris Ostrovsky
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1511026783.10238.2.camel@primarydata.com \
--to=trondmy@primarydata.com \
--cc=Anna.Schumaker@Netapp.com \
--cc=boris.ostrovsky@oracle.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox