Path: csiph.com!optima2.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!us.feeder.erje.net!newsfeed.fsmpi.rwth-aachen.de!newsfeed.straub-nv.de!eternal-september.org!feeder.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail From: Keith Thompson Newsgroups: comp.lang.c Subject: Re: Spurious diagnostic messages Date: Mon, 03 Aug 2015 08:22:45 -0700 Organization: None to speak of Lines: 39 Message-ID: References: <874mn5ty3y.fsf@kst-u.example.com> <87egm8qis7.fsf@kst-u.example.com> <45crratneenjh9ktjt1l8ioskb7ehrr8e5@4ax.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: mx02.eternal-september.org; posting-host="945944de09706c9b4e29b53c9d2efdc2"; logging-data="11785"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+Edwsv9EDV2noqUNcQLsG9" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) Cancel-Lock: sha1:5ZFPErjw7FZ2xPtAXTxF+jdAThs= sha1:IyWVqotl/wCok0L67F/foik32eo= Xref: csiph.com comp.lang.c:66787 Ian Collins writes: > Keith Thompson wrote: >> Robert Wessel writes: >>> On Fri, 31 Jul 2015 09:01:02 -0700, Keith Thompson >>> wrote: >> [...] >>>> As I mentioned earlier, if binary literals are added to C, I think >>>> support should also be added to printf and scanf, probably using >>>> "%b". If this happens, C++ will eventually incorporate that feature >>>> as part of the C standard library. I suspect that would pressure >>>> the C++ committee to add similar support to . >>> >>> I disagree. There's little requirement to input and output binary >>> items. Binary literals in a program, OTOH, are quite useful in some >>> circumstances. >> >> We have decimal, octal, and hexadecimal constants, input, and output. >> Having decimal, octal, hexadecimal, and binary constants, but only >> decimal, octal, and hexadecimal input and output would be inconsistent. > > But that doesn't detract from the utility of binary constants. Agreed. I didn't mean to imply otherwise. > As I > said elsewhere, the use case for binary constants is primarily in the > embedded world, stdio isn't a concern. For freestanding implementations, stdio is not required, so adding I/O for binary numbers to the standard would not be a burden. For embedded systems that support something like printf, I/O for binary numbers could be useful for debugging. -- Keith Thompson (The_Other_Keith) kst-u@mib.org Working, but not speaking, for JetHead Development, Inc. "We must do something. This is something. Therefore, we must do this." -- Antony Jay and Jonathan Lynn, "Yes Minister"