From: "Maciej W. Rozycki" <macro@linux-mips.org>
To: David Rientjes <rientjes@google.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>,
Ralf Baechle <ralf@linux-mips.org>,
Eunbong Song <eunb.song@samsung.com>,
linux-kernel@vger.kernel.org, linux-mips@linux-mips.org
Subject: GCC version requirement (was: Re: mips: math-emu: Fix compilation error ieee754.c)
Date: Tue, 24 Jun 2014 00:50:07 +0100 (BST) [thread overview]
Message-ID: <alpine.LFD.2.11.1406240032450.23403@eddie.linux-mips.org> (raw)
In-Reply-To: <alpine.DEB.2.02.1406111427170.27885@chino.kir.corp.google.com>
On Wed, 11 Jun 2014, David Rientjes wrote:
> > > ieee754dp has bitfield member in struct without name. And this
> > > cause compilation error. This patch removes struct in ieee754dp
> > > declaration. So compilation error is fixed.
> > > Signed-off-by: Eunbong Song <eunb.song@samsung.com>
> >
> > What gcc version are you using?
> >
>
> make arch/mips/math-emu/ieee754.o for mips defconfig triggers the
> following on linux-next 30 times:
>
> arch/mips/math-emu/ieee754.c:45:2: error: unknown field 'sign' specified in initializer
> arch/mips/math-emu/ieee754.c:45:2: warning: missing braces around initializer
> arch/mips/math-emu/ieee754.c:45:2: warning: (near initialization for '__ieee754dp_spcvals[0].<anonymous>')
> arch/mips/math-emu/ieee754.c:45:2: error: unknown field 'bexp' specified in initializer
> arch/mips/math-emu/ieee754.c:45:2: warning: excess elements in union initializer
> arch/mips/math-emu/ieee754.c:45:2: warning: (near initialization for '__ieee754dp_spcvals[0]')
> arch/mips/math-emu/ieee754.c:45:2: error: unknown field 'mant' specified in initializer
> arch/mips/math-emu/ieee754.c:45:2: warning: excess elements in union initializer
> arch/mips/math-emu/ieee754.c:45:2: warning: (near initialization for '__ieee754dp_spcvals[0]')
>
> I'm using gcc 4.5.1 for mips. The patch makes all members part of the
> union so it's probably not what you want to fix it, though.
There's more recent breakage like this, e.g.:
mm/page_io.c: In function '__swap_writepage':
mm/page_io.c:277: error: unknown field 'bvec' specified in initializer
mm/page_io.c:278: warning: excess elements in struct initializer
mm/page_io.c:278: warning: (near initialization for 'from')
introduced with "bio_vec-backed iov_iter" (GCC 4.1.2 here). We still in
principle support GCC versions back to 3.2:
$ grep 'Gnu C' Documentation/Changes
o Gnu C 3.2 # gcc --version
$
so either this breakage has to be cleaned up or the requirement for the
minimum GCC version revisited.
This is a semi-standard language extension BTW, citing from the GCC
manual:
--------------------------------------------------------------------------
6 Extensions to the C Language Family
*************************************
GNU C provides several language features not found in ISO standard C.
(The `-pedantic' option directs GCC to print a warning message if any
of these features is used.) To test for the availability of these
features in conditional compilation, check for a predefined macro
`__GNUC__', which is always defined under GCC.
6.59 Unnamed struct/union fields within structs/unions
======================================================
As permitted by ISO C11 and for compatibility with other compilers, GCC
allows you to define a structure or union that contains, as fields,
structures and unions without names.
--------------------------------------------------------------------------
-- note the term "permitted" rather than "required".
We do make use of a few GCC language extensions, most notably inline
assembly, however in this case we merely save a couple of characters here
and there and this is IMO not worth breaking people's development
environments.
Maciej
prev parent reply other threads:[~2014-06-23 23:50 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-11 9:24 mips: math-emu: Fix compilation error ieee754.c Eunbong Song
2014-06-11 17:10 ` Ralf Baechle
2014-06-11 21:32 ` David Rientjes
2014-06-23 23:50 ` Maciej W. Rozycki [this message]
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=alpine.LFD.2.11.1406240032450.23403@eddie.linux-mips.org \
--to=macro@linux-mips.org \
--cc=eunb.song@samsung.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@linux-mips.org \
--cc=ralf@linux-mips.org \
--cc=rientjes@google.com \
--cc=viro@zeniv.linux.org.uk \
/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
Powered by JetHome