Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
| From | Ben Bacarisse <ben.usenet@bsb.me.uk> |
|---|---|
| Newsgroups | comp.lang.c |
| Subject | Re: unsigned int |
| Date | 2016-08-02 19:30 +0100 |
| Organization | A noiseless patient Spider |
| Message-ID | <87twf3t45o.fsf@bsb.me.uk> (permalink) |
| References | (7 earlier) <nnol7a$fk6$1@dont-email.me> <nnpl0b$p7u$1@dont-email.me> <nnqaph$ho$1@dont-email.me> <nnqd6i$92c$1@dont-email.me> <nnqj06$u15$1@dont-email.me> |
Les Cargill <lcargill99@comcast.com> writes: > David Brown wrote: >> On 02/08/16 16:35, Les Cargill wrote: >>> David Brown wrote: >>>> On 02/08/16 01:20, Les Cargill wrote: >>>>> Ben Bacarisse wrote: >>>>>> Les Cargill <lcargill99@comcast.com> writes: >> <snip> >>>>> While it's implementation dependent, it's unusual for "unsigned" to be >>>>> the actual default - unless overridden. >>>> >>>> I think that is a wild generalisation, without basis in fact - unless >>>> you can point us to a list of compilers, targets, and the signedness of >>>> their chars. >>> >>> Hence "unless overridden". The defacto, default standards for the 'C' >>> language are "char is a smaller int" and "ints are signed by default." >>> >>> The Standard obviously doesn't say one way or the other. But the >>> historical critical mass of the language is towards the way I say. >> >> There is /no/ standard here - defacto, default, or otherwise. > > I simply have to disagree. The default 'C' int declaration is signed > unless it's explicitly made unsigned. > > That people choose to override that default is neither here nor there. > It's baked into the declaration syntax of the language. That's not borne out by the history of C. Even before there were unsigned types, char could be unsigned. In the 1974 C manual for the PDP-11 it is explained that the sign bit is propagated when using a char where an int is expected but a note says that "the sign-propagation feature disappears in other implementations". Thus char could be, in effect, unsigned before there were even any unsigned ints (and before the syntax for signed and unsigned types appeared). But I'm curious about why you care about what might or might not be some de-facto default. In all the decades I've been using C, I don't recall ever caring if char was signed or not. -- Ben.
Back to comp.lang.c | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: unsigned int "Osmium" <r124c4u102@comcast.net> - 2016-07-31 12:40 -0500
Re: unsigned int David Brown <david.brown@hesbynett.no> - 2016-08-01 11:01 +0200
Re: unsigned int James Kuyper <jameskuyper@verizon.net> - 2016-08-01 10:15 -0400
Re: unsigned int Les Cargill <lcargill99@comcast.com> - 2016-08-01 09:59 -0500
Re: unsigned int David Brown <david.brown@hesbynett.no> - 2016-08-01 17:21 +0200
Re: unsigned int Keith Thompson <kst-u@mib.org> - 2016-08-01 09:55 -0700
Re: unsigned int David Brown <david.brown@hesbynett.no> - 2016-08-01 22:42 +0200
Re: unsigned int supercat@casperkitty.com - 2016-08-01 14:18 -0700
Re: unsigned int Les Cargill <lcargill99@comcast.com> - 2016-08-01 13:11 -0500
Re: unsigned int Ben Bacarisse <ben.usenet@bsb.me.uk> - 2016-08-01 19:46 +0100
Re: unsigned int Les Cargill <lcargill99@comcast.com> - 2016-08-01 18:20 -0500
Re: unsigned int David Brown <david.brown@hesbynett.no> - 2016-08-02 10:18 +0200
Re: unsigned int Les Cargill <lcargill99@comcast.com> - 2016-08-02 09:35 -0500
Re: unsigned int Keith Thompson <kst-u@mib.org> - 2016-08-02 08:00 -0700
Re: unsigned int Les Cargill <lcargill99@comcast.com> - 2016-08-02 11:12 -0500
Re: unsigned int David Brown <david.brown@hesbynett.no> - 2016-08-02 17:11 +0200
Re: unsigned int Les Cargill <lcargill99@comcast.com> - 2016-08-02 11:55 -0500
Re: unsigned int supercat@casperkitty.com - 2016-08-02 10:16 -0700
Re: unsigned int David Brown <david.brown@hesbynett.no> - 2016-08-03 14:02 +0200
Re: unsigned int Keith Thompson <kst-u@mib.org> - 2016-08-03 08:58 -0700
Re: unsigned int James Kuyper <jameskuyper@verizon.net> - 2016-08-02 13:57 -0400
Re: unsigned int Ben Bacarisse <ben.usenet@bsb.me.uk> - 2016-08-02 19:30 +0100
Re: unsigned int Keith Thompson <kst-u@mib.org> - 2016-08-02 11:38 -0700
Re: unsigned int David Brown <david.brown@hesbynett.no> - 2016-08-03 14:12 +0200
Re: unsigned int David Brown <david.brown@hesbynett.no> - 2016-08-03 13:45 +0200
Re: unsigned int Keith Thompson <kst-u@mib.org> - 2016-08-01 12:02 -0700
Re: unsigned int David Brown <david.brown@hesbynett.no> - 2016-08-01 23:01 +0200
csiph-web