From owner-freebsd-current Tue Dec 23 12:49:36 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id MAA06748 for current-outgoing; Tue, 23 Dec 1997 12:49:36 -0800 (PST) (envelope-from owner-freebsd-current) Received: from sax.sax.de (sax.sax.de [193.175.26.33]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id MAA06684 for ; Tue, 23 Dec 1997 12:49:08 -0800 (PST) (envelope-from j@uriah.heep.sax.de) Received: (from uucp@localhost) by sax.sax.de (8.8.8/8.8.8) with UUCP id VAA03352 for freebsd-current@freebsd.org; Tue, 23 Dec 1997 21:49:06 +0100 (CET) (envelope-from j@uriah.heep.sax.de) Received: (from j@localhost) by uriah.heep.sax.de (8.8.8/8.8.5) id VAA13846; Tue, 23 Dec 1997 21:03:03 +0100 (MET) Date: Tue, 23 Dec 1997 21:03:03 +0100 (MET) Message-Id: <199712232003.VAA13846@uriah.heep.sax.de> Mime-Version: 1.0 X-Newsreader: knews 0.9.8 Reply-To: joerg_wunsch@uriah.heep.sax.de (Joerg Wunsch) Organization: Private BSD site, Dresden X-Phone: +49-351-2012 669 X-PGP-Fingerprint: DC 47 E6 E4 FF A6 E9 8F 93 21 E0 7D F9 12 D6 4E References: <199712201434.JAA00329@dyson.iquest.net> <14545.882642903@time.cdrom.com> <19971221120534.43478@lemis.com> <199712211002.LAA00388@uriah.heep.sax.de> <19971222101914.28785@lemis.com> From: j@uriah.heep.sax.de (J Wunsch) Subject: Re: Bruce vandalism again X-Original-Newsgroups: local.freebsd.current To: freebsd-current@freebsd.org Content-Type: text/plain; charset=us-ascii Sender: owner-freebsd-current@freebsd.org X-Loop: FreeBSD.org Precedence: bulk Greg Lehey wrote: >> It's quite normal that if your definition is old-style, the >> declaration would still be prototyped on a compiler that defines >> __STDC__ (via __P()). > > If the programmer does the Right Thing. My understanding was that > style(9) discourages __P(). style(9) discourages __P() for new code. Why don't you simply read that page? Use of the __P macro in new code is discouraged, although modifications to existing files should be consistent with that file's conventions. This way, iff you're using an ANSI compiler, there's always a prototype in scope if you're doing it right, either directly or hidden inside __P(). This will cause the same warnings, regardless of whether your function _definition_ uses the ancient or the modern style. There are things that can only expressed using the modern style, however, like passing `short' data types (char, float) directly. That's a non-issue for the kernel: there's not much advantage of passing a char to a function, the compiler will allocate a 32-bit register anyway, but has to do additional masking. There will be some real advantage for float vs. double, but the kernel doesn't use floating point anyway. -- cheers, J"org joerg_wunsch@uriah.heep.sax.de -- http://www.sax.de/~joerg/ -- NIC: JW11-RIPE Never trust an operating system you don't have sources for. ;-)