From: "Tim Van Holder" To: "Eli Zaretskii" Cc: Subject: Re: Compiler options for djdev build Date: Sun, 10 Jun 2001 12:49:19 +0200 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0) In-reply-to: Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 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 > > IMHO, the annoyance of getting this kind of warning far outweighs the > > usefulness of getting 'x = -1' (where x is unsigned) flagged (the only > > other effect of -Wconversion). > > Unlike other warnings, this one is so easy to fix that I wouldn't call it > annoyance. 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. Other standard functions take ints where you would expect chars, but that is because prototypes originally weren't required; we require prototypes, so it is not an issue for us. > For such a low price, I fail to see why is this flag met with such a > staunch opposition. Are you saying that it is useless in general, and > that GCC maintainers should have never added it? I don't consider this a 'low price', I consider it a kludge. The warning is only useful when converting legacy C code, so that you know that a prototype you added had a potentially undesirable effect. As you say, converting a function to varargs may trigger breakage, but how likely is that to happen?