Gentoo Archives: gentoo-dev

From: David Seifert <soap@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev][PATCH v1 ] sys-fs/hfsplusutils with gcc-5: blockiter.c:148:8: error: redefinition of blockiter_curr #580620
Date: Sat, 23 Apr 2016 18:39:12
Message-Id: F9A1FF43-AE95-4C87-8514-C39F21DC7846@gentoo.org
In Reply to: Re: [gentoo-dev][PATCH v1 ] sys-fs/hfsplusutils with gcc-5: blockiter.c:148:8: error: redefinition of blockiter_curr #580620 by Mike Frysinger
1 I generally prefer using -std=gnu89 instead of -fgnu89-inline, as GCC might change some C11 semantics later on. To me -std=gnu89 seems more robust.
2
3 David
4
5 > On 22 Apr 2016, at 23:39, Mike Frysinger <vapier@g.o> wrote:
6 >
7 > On 22 Apr 2016 03:57, Leno Hou wrote:
8 >> +-extern inline UInt32 blockiter_curr(blockiter *b)
9 >> +-{
10 >> +- return b->e->start_block + b->block;
11 >> +-}
12 >> +-
13 >> +-
14 >> ++extern inline UInt32 blockiter_curr(blockiter *b);
15 >
16 > i don't think that's how you want to handle extern inline.
17 > it doesn't make sense when it's declared this way as there
18 > is no actual body for gcc to optimisitcally inline.
19 >
20 > instead, we should go with what Ubuntu/Debian have: use the
21 > -fgnu89-inline flag to build since those are the semantics
22 > this code expects. i've pushed that fix now.
23 > -mike

Replies