Re: cvs commit: src/lib/libc/sys tls.2

看板DFBSD_commit作者時間21年前 (2005/03/22 04:32), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串8/20 (看更多)
On Mon, Mar 21, 2005 at 11:52:49AM -0800, Chris Pressey wrote: > I wouldn't say it should return an int, though: IMO sizeof(x) ought to > be treated just like any other numeric constant in C - that is, > interpreted as signed or unsigned as the situation dictates. Why they > introduced this gratuitous unorthogonality, I have no idea. Well, maybe > that's not strictly true... I _can_ guess. Probably "sizeof always > yields a positive number so we should force its type to be unsigned." > But that makes exactly as much sense as "4 always yields a positive > number so we should force its type to be unsigned," which is stupid. Because sizeof(char[2 << 31]) and sizeof(char[2 << 30]) should have the same type. Joerg
文章代碼(AID): #12Foz700 (DFBSD_commit)
討論串 (同標題文章)
文章代碼(AID): #12Foz700 (DFBSD_commit)