Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c > #71447

Re: Spurious diagnostic messages

From David Brown <david.brown@hesbynett.no>
Newsgroups comp.lang.c
Subject Re: Spurious diagnostic messages
Date 2015-09-29 22:28 +0200
Organization A noiseless patient Spider
Message-ID <mues65$n69$1@dont-email.me> (permalink)
References (13 earlier) <g7drratsj493gq4h4f1ll8je8701s8f5cj@4ax.com> <mplkme$g9p$1@dont-email.me> <kfny4h0y66f.fsf@x-alumni2.alumni.caltech.edu> <mrfub8$gms$1@dont-email.me> <kfnlhbpcj9a.fsf@x-alumni2.alumni.caltech.edu>

Show all headers | View raw


On 29/09/15 17:55, Tim Rentsch wrote:
> David Brown <david.brown@hesbynett.no> writes:
>
>> On 24/08/15 18:58, Tim Rentsch wrote:
>>
>>> [snipping almost everything as there is only one point
>>>   I am responding to.]
>
>> binary literals are solidly established in compliers and
>> we can use them when we find them helpful regardless of the C
>> standards.
>
> And I have no problem with that.  If a group or subcommunity
> thinks a particular extension is useful and wants to use it
> for their own development, I wouldn't try to stop them.  But
> that isn't in and of itself a compelling argument to change
> the ISO C standard.
>

With C11, the C standard introduced the idea of optional features.  That 
I think should lower the bar to adding new features to C - it means that 
a feature can be added to the standard without requiring compilers to 
implement it.

This thread has been going on for a while, but if I may try to sum up:

On the one side, we have:

0b binary literals are a common extension that are implemented on a 
number of compilers.  On those compilers, making it part of the standard 
is almost zero cost.

0b binary literals are a useful feature, and many embedded developers 
take advantage of them where they exist.

0b binary literals are part of the current C++ standards.

0b binary literals do not conflict with existing C standards in any way.

On the other side, we have:

Binary literals are not essential - it is possible to use hex literals 
or macros (albeit somewhat ugly and complicated) to make binary constants.

Binary literals are not used very much, even by embedded programmers.

Binary literals are of very little potential use to C programmers other 
than embedded programmers (though embedded programming is an increasing 
proportion of C usage).

Am I missing anything?


I believe that C should adopt them in future standards - I believe the C 
standards need to keep abreast with real-world usage, especially in the 
increasingly important embedded area, or they risk being left behind as 
compiler implementers make their own "standards".  Such fragmentation 
would not be good for anyone.  (In this case, most but not all compilers 
have gone for the same format for binary literals.)

I would be quite happy with the idea of a subcommittee producing an 
extension to the C standards to cover features such as this that would 
suit embedded programming - as long as it is an "official" standard with 
a similar weight to the main C standards.  A standard such as this could 
include many additions, refinements, restrictions or enhancements to the 
main C standards that for some reason are undesirable in the main standard.

Back to comp.lang.c | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Re: Spurious diagnostic messages Tim Rentsch <txr@alumni.caltech.edu> - 2015-09-29 08:55 -0700
  Re: Spurious diagnostic messages supercat@casperkitty.com - 2015-09-29 10:22 -0700
    Re: Spurious diagnostic messages Tim Rentsch <txr@alumni.caltech.edu> - 2015-10-04 23:42 -0700
      Re: Spurious diagnostic messages supercat@casperkitty.com - 2015-10-05 09:41 -0700
        Re: Spurious diagnostic messages Tim Rentsch <txr@alumni.caltech.edu> - 2015-10-09 13:22 -0700
  Re: Spurious diagnostic messages David Brown <david.brown@hesbynett.no> - 2015-09-29 22:28 +0200
    Re: Spurious diagnostic messages Tim Rentsch <txr@alumni.caltech.edu> - 2015-10-05 00:14 -0700
      Re: Spurious diagnostic messages David Brown <david.brown@hesbynett.no> - 2015-10-05 10:30 +0200
        Re: Spurious diagnostic messages supercat@casperkitty.com - 2015-10-05 10:06 -0700
          Re: Spurious diagnostic messages David Brown <david.brown@hesbynett.no> - 2015-10-06 09:23 +0200
            Re: Spurious diagnostic messages supercat@casperkitty.com - 2015-10-06 11:18 -0700
              Re: Spurious diagnostic messages Keith Thompson <kst-u@mib.org> - 2015-10-06 14:29 -0700
                Re: Spurious diagnostic messages supercat@casperkitty.com - 2015-10-06 15:33 -0700
                Re: Spurious diagnostic messages David Brown <david.brown@hesbynett.no> - 2015-10-07 12:35 +0200
              Re: Spurious diagnostic messages David Brown <david.brown@hesbynett.no> - 2015-10-07 10:57 +0200
                Re: Spurious diagnostic messages supercat@casperkitty.com - 2015-10-07 07:09 -0700
                Re: Spurious diagnostic messages David Brown <david.brown@hesbynett.no> - 2015-10-08 09:28 +0200
                Re: Spurious diagnostic messages supercat@casperkitty.com - 2015-10-08 01:45 -0700
                Re: Spurious diagnostic messages glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2015-10-08 09:42 +0000
                Re: Spurious diagnostic messages supercat@casperkitty.com - 2015-10-08 09:42 -0700
                Re: Spurious diagnostic messages Keith Thompson <kst-u@mib.org> - 2015-10-07 09:40 -0700
                Re: Spurious diagnostic messages David Brown <david.brown@hesbynett.no> - 2015-10-08 09:44 +0200
                Re: Spurious diagnostic messages Keith Thompson <kst-u@mib.org> - 2015-10-08 08:25 -0700
                Re: Spurious diagnostic messages David Brown <david.brown@hesbynett.no> - 2015-10-08 20:36 +0200
                Re: Spurious diagnostic messages Malcolm McLean <malcolm.mclean5@btinternet.com> - 2015-10-08 13:28 -0700
                Re: Spurious diagnostic messages Bartc <bc@freeuk.com> - 2015-10-08 22:21 +0100
                Re: Spurious diagnostic messages supercat@casperkitty.com - 2015-10-08 14:33 -0700
                Re: Spurious diagnostic messages David Brown <david.brown@hesbynett.no> - 2015-10-09 10:24 +0200
                Re: Spurious diagnostic messages supercat@casperkitty.com - 2015-10-09 08:35 -0700
                Re: Spurious diagnostic messages David Brown <david.brown@hesbynett.no> - 2015-10-11 15:18 +0200
                Re: Spurious diagnostic messages supercat@casperkitty.com - 2015-10-11 14:53 -0700
                Re: Spurious diagnostic messages David Brown <david.brown@hesbynett.no> - 2015-10-12 09:17 +0200
                Re: Spurious diagnostic messages supercat@casperkitty.com - 2015-10-12 00:37 -0700
                Re: Spurious diagnostic messages Malcolm McLean <malcolm.mclean5@btinternet.com> - 2015-10-10 00:31 -0700
                Re: Spurious diagnostic messages Ben Bacarisse <ben.usenet@bsb.me.uk> - 2015-10-10 10:50 +0100
                Re: Spurious diagnostic messages Bartc <bc@freeuk.com> - 2015-10-10 11:01 +0100
                Re: Spurious diagnostic messages Malcolm McLean <malcolm.mclean5@btinternet.com> - 2015-10-10 03:43 -0700
                Re: Spurious diagnostic messages supercat@casperkitty.com - 2015-10-10 13:26 -0700
                Re: Spurious diagnostic messages supercat@casperkitty.com - 2015-10-10 13:34 -0700
                Re: Spurious diagnostic messages David Brown <david.brown@hesbynett.no> - 2015-10-11 15:25 +0200
        Re: Spurious diagnostic messages Tim Rentsch <txr@alumni.caltech.edu> - 2015-10-14 07:43 -0700
          Re: Spurious diagnostic messages David Brown <david.brown@hesbynett.no> - 2015-10-14 17:00 +0200

csiph-web