Re: cvs commit: src/lib/libc/gen disklabel.c src/lib/libcr/gen d

看板DFBSD_commit作者時間21年前 (2005/03/18 02:01), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串3/3 (看更多)
On Fri, Mar 18, 2005 at 12:44:42AM +0900, YONETANI Tomokazu wrote: > On Thu, Mar 17, 2005 at 03:26:42PM +0100, Joerg Sonnenberger wrote: > > > Constify all users of dktypenames to unbreak buildworld. > > > Reported-by: walt > > > > I'm not sure why world broke through. That's strange. > > I should've been more explicit about what I claimed to fix. gcc fails > miserably if one tries to get a difference of two addresses whose target > types are different and there's no implicit conversions available, so: > > const char **ccpp; > char **cpp; > int idx; > > idx = cpp - ccpp; /* NG */ > idx = *cpp - *ccpp; /* OK, *cpp converted to (const char *) */ > idx = *ccpp - *cpp; /* NG, (const char *) to (char *) */ This is what I meant. I have to read the specs again, this feels strange. But the conversions rules _are_ strange, so it might very well be OK. Joerg
文章代碼(AID): #12ESOK00 (DFBSD_commit)
文章代碼(AID): #12ESOK00 (DFBSD_commit)