Re: FPU Bounds [Was: Re: openssh4.0 upgrade]

看板DFBSD_submit作者時間21年前 (2005/03/24 03:32), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串9/9 (看更多)
On Wed, Mar 23, 2005 at 11:01:09AM -0800, Matthew Dillon wrote: > :../../bus/ppbus/ppb_msq.c: In function `ppb_MS_init_msq': > :../../bus/ppbus/ppb_msq.c:222: warning: `char' is promoted to `int' when passed through `...' > :../../bus/ppbus/ppb_msq.c:222: warning: (so you should pass `int' not `char' to `va_arg') > :../../bus/ppbus/ppb_msq.c:222: note: if this code is reached, the program will abort > : > :Joerg > > Joerg, could you add a patch to the gcc-3 build to turn that warning > into a compile-time error? Sure. > I consider this a bug in gcc. When the varargs functions were originally > created they were documented as properly dealing with internal compiler > argument promotions... and they did. Apparently, now, they don't, > and some half-brain decided it should be a warning rather then the > terminal error that it really ought to be. Well, the wording of SUS ("If there is no actual next argument, or if type is not compatible with the type of the actual next argument (as promoted according to the default argument promotions), the behaviour is undefined, ....") allows the behaviour of GCC. I think this might actually be a difference between the old varargs.h and stdarg.h. Joerg
文章代碼(AID): #12GSGv00 (DFBSD_submit)
討論串 (同標題文章)
文章代碼(AID): #12GSGv00 (DFBSD_submit)