Date: Sun, 10 Jun 2001 15:32:24 +0300 (IDT) From: Eli Zaretskii X-Sender: eliz AT is To: Tim Van Holder cc: djgpp-workers AT delorie DOT com Subject: Re: Compiler options for djdev build In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp-workers AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp-workers AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk On Sun, 10 Jun 2001, Tim Van Holder wrote: > Well, in order to "fix" this, you change the type used - i.e. you make > todigit() and friends take an int, not a char. But you're not passing an > integer value, you're actually passing a character value - as such, > declaring the argument as int seems wrong. It's not wrong, it's very natural in C, if you think about a function invocation as a kind of expression (which it is). All integral types shorter than int are always promoted to int's in an expression. > The warning is only useful when converting legacy C code The DJGPP library has quite a lot of such legacy code, most of it going back to the BSD library, originally used by DJ for v1.x. The timezone code (djtzs*.zip) is also ``legacy code'', as well as edebug and fsdb. > As you say, converting a function to varargs may trigger breakage, but how > likely is that to happen? I don't know. But it seems a good idea to pay such a small price for added safety.