Linux Media Controller development
 help / color / mirror / Atom feed
From: Gianluca Gennari <gennarone@gmail.com>
To: Russell King - ARM Linux <linux@arm.linux.org.uk>
Cc: Mauro Carvalho Chehab <m.chehab@samsung.com>,
	linux-media@vger.kernel.org
Subject: Re: [PATCH] media/i2c: ths8200: fix build failure with gcc 4.5.4
Date: Sun, 13 Oct 2013 14:55:49 +0200	[thread overview]
Message-ID: <525A9855.7050701@gmail.com> (raw)
In-Reply-To: <20131013111613.GC25034@n2100.arm.linux.org.uk>

Il 13/10/2013 13:16, Russell King - ARM Linux ha scritto:
> On Sun, Oct 13, 2013 at 12:36:07PM +0200, Gianluca Gennari wrote:
>> Il 13/10/2013 12:13, Russell King - ARM Linux ha scritto:
>>> v3.12-rc fails to build with this error:
>>>
>>> drivers/media/i2c/ths8200.c:49:2: error: unknown field 'bt' specified in initializer
>>> drivers/media/i2c/ths8200.c:50:3: error: field name not in record or union initializer
>>> drivers/media/i2c/ths8200.c:50:3: error: (near initialization for 'ths8200_timings_cap.reserved')
>>> drivers/media/i2c/ths8200.c:51:3: error: field name not in record or union initializer
>>> drivers/media/i2c/ths8200.c:51:3: error: (near initialization for 'ths8200_timings_cap.reserved')
>>> ...
>>>
>>> with gcc 4.5.4.  This error was not detected in builds prior to v3.12-rc.
>>> This patch fixes this.
>>
>> Hi Russel,
>> this error is already fixed by this patch:
>>
>> https://patchwork.linuxtv.org/patch/20002/
>>
>> that has been already accepted and is queued for kernel 3.12.
> 
> It would be a good idea to have the comment updated - given that gcc 4.5.4
> also has a problem, it's not only a problem for gcc < 4.4.6 as that patch
> claims.
> 

Yep, the fact is that there are 2 different compatibility problems:
- gcc < 4.4.6 requires additional curly brackets to initialize anonymous
structs (see v4l2-dv-timings.h);
- some gcc version requires that structure members are initialized in
the same order they are defined, even if you specify the member name;

The second issue is the one you are facing, but I don't know how to
track it down to a specific gcc version. If you can get the exact
version number and provide a patch, you're welcome!

Regards,
Gianluca

  reply	other threads:[~2013-10-13 12:55 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-13 10:13 [PATCH] media/i2c: ths8200: fix build failure with gcc 4.5.4 Russell King - ARM Linux
2013-10-13 10:36 ` Gianluca Gennari
2013-10-13 11:16   ` Russell King - ARM Linux
2013-10-13 12:55     ` Gianluca Gennari [this message]
2013-10-13 12:58       ` Russell King - ARM Linux

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=525A9855.7050701@gmail.com \
    --to=gennarone@gmail.com \
    --cc=linux-media@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=m.chehab@samsung.com \
    /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