From mboxrd@z Thu Jan 1 00:00:00 1970 From: James Hogan Subject: Re: [PATCH] vfs: workaround gcc <4.6 build error in link_path_walk() Date: Wed, 17 Sep 2014 15:05:09 +0100 Message-ID: <54199515.6000402@imgtec.com> References: <1410869255-8506-1-git-send-email-james.hogan@imgtec.com> <20140916173951.GX7996@ZenIV.linux.org.uk> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20140916173951.GX7996@ZenIV.linux.org.uk> Sender: linux-kernel-owner@vger.kernel.org List-ID: Content-Type: text/plain; charset="us-ascii" To: Al Viro Cc: Linus Torvalds , linux-kernel@vger.kernel.org, Geert Uytterhoeven , linux-fsdevel@vger.kernel.org, linux-metag@vger.kernel.org On 16/09/14 18:39, Al Viro wrote: > On Tue, Sep 16, 2014 at 01:07:35PM +0100, James Hogan wrote: >> Commit d6bb3e9075bb (vfs: simplify and shrink stack frame of >> link_path_walk()) introduced build problems with GCC versions older than >> 4.6 due to the initialisation of a member of an anonymous union in >> struct qstr without enclosing braces. >> >> This hits GCC bug 10676 [1] (which was fixed in GCC 4.6 by [2]), and >> causes the following build error: >> fs/namei.c: In function 'link_path_walk': >> fs/namei.c:1778: error: unknown field 'hash_len' specified in initializer >> >> This is worked around by adding explicit braces. > > IOW, the same thing QSTR_INIT is doing... QSTR_INIT only initialises len and name, not the hash. Cheers James From mboxrd@z Thu Jan 1 00:00:00 1970 From: James Hogan Subject: Re: [PATCH] vfs: workaround gcc <4.6 build error in link_path_walk() Date: Wed, 17 Sep 2014 15:05:09 +0100 Message-ID: <54199515.6000402@imgtec.com> References: <1410869255-8506-1-git-send-email-james.hogan@imgtec.com> <20140916173951.GX7996@ZenIV.linux.org.uk> Mime-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit Cc: Linus Torvalds , , Geert Uytterhoeven , , To: Al Viro Return-path: In-Reply-To: <20140916173951.GX7996@ZenIV.linux.org.uk> Sender: linux-kernel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org On 16/09/14 18:39, Al Viro wrote: > On Tue, Sep 16, 2014 at 01:07:35PM +0100, James Hogan wrote: >> Commit d6bb3e9075bb (vfs: simplify and shrink stack frame of >> link_path_walk()) introduced build problems with GCC versions older than >> 4.6 due to the initialisation of a member of an anonymous union in >> struct qstr without enclosing braces. >> >> This hits GCC bug 10676 [1] (which was fixed in GCC 4.6 by [2]), and >> causes the following build error: >> fs/namei.c: In function 'link_path_walk': >> fs/namei.c:1778: error: unknown field 'hash_len' specified in initializer >> >> This is worked around by adding explicit braces. > > IOW, the same thing QSTR_INIT is doing... QSTR_INIT only initialises len and name, not the hash. Cheers James