Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > C > Re: C standard ...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 80 of 89 Topic 26107 of 26955
Post > Topic >>

Re: C standard question?

by Keith Thompson <kst-u@[EMAIL PROTECTED] > May 13, 2008 at 12:14 PM

Chris H <chris@[EMAIL PROTECTED]
> writes:
> In message <slrng2jh6c.1pn.willem@[EMAIL PROTECTED]
>, Willem
> <willem@[EMAIL PROTECTED]
> writes
>>Chris H wrote:
>>) In message <48299ac3.2182222981@[EMAIL PROTECTED]
>, Richard Bos
>>)<rlb@[EMAIL PROTECTED]
> writes
>>)>Chris H <chris@[EMAIL PROTECTED]
> wrote:
>>)>
>>)>> Do compilers still accept char unsigned?  Some used to but I bet
many
>>)>> don't now
>>)>
>>)>They had bloody better. You may not like it, but, like voting for
Gordon
>>)>Brown, it's perfectly legal even if unusual and in some people's
opinion
>>)>disgusting.
>>)
>>) Some one, elsewhere in this thread, did a search on "char unsigned"
and
>>) go no hits at all.
>>)
>>) Has any one actually seen "char unsigned" used anywhere?
>>
>>Irrelevant.
>
> Why?
>
> If it is something no one has used and no one has seen used  (and some
> people hare can remember back to the start of C) why is it still there?

Currently, the language states (C99 6.7.2p2) that "the type specifiers
may occur in any order, possibly intermixed with the other declaration
specifiers".

This rule allows silly things like "long unsigned long", "double
long", "long int unsigned long", and so forth.  (I deliberately chose
examples that I *think* everyone would agree are silly.)

Changing this would require a more complicated set of rules, with the
risk that either the authors of the standard or some implementers
might get them wrong.  Such a change could break existing code; it
would *definitely* cause some code that's currently legal to become
illegal.  It would require a new revision of the C standard, along
with updates to textbooks, tutorials, implementations, and tools other
than compilers that parse C code.  I can't guess how much effort would
be required, but I wouldn't be surprised if it were several
person-years.  It would only infinitesimally increase the difficulty
of writing ugly C code.  And those few programmers who like to write
"char unsigned" could safely continue to do so until C20?? compilers
replace compilers for earlier versions of the standard, something that
hasn't even happened for C99.

If I were designing a new language, I probably wouldn't permit that
particular kind of flexibility.  (For that matter, the names of the
fundamental types would probably be single keywords or identifiers, so
the issue wouldn't arise in the first place.)  But for an existing
language, I really don't think this minor flaw (which not everyone
even agrees is a flaw) is worth fixing.

-- 
Keith Thompson (The_Other_Keith) kst-u@[EMAIL PROTECTED]
 
<http://www.ghoti.net/~kst>
Nokia
"We must do something.  This is something.  Therefore, we must do this."
    -- Antony Jay and Jonathan Lynn, "Yes Minister"
 




 89 Posts in Topic:
C standard question?
jan.chludzinski@[EMAIL PR  2008-05-07 11:44:09 
Re: C standard question?
Eric Sosman <Eric.Sosm  2008-05-07 15:20:46 
Re: C standard question?
=?ISO-8859-1?Q?Tom=E1s_=D  2008-05-07 13:23:50 
Re: C standard question?
Jack Klein <jackklein@  2008-05-07 22:35:23 
Re: C standard question?
rlb@[EMAIL PROTECTED] (R  2008-05-16 10:41:14 
Re: C standard question?
Jack Klein <jackklein@  2008-05-07 22:44:45 
Re: C standard question?
Flash Gordon <spam@[EM  2008-05-07 21:01:48 
Re: C standard question?
CBFalconer <cbfalconer  2008-05-07 18:12:55 
Re: C standard question?
Chris H <chris@[EMAIL   2008-05-10 17:06:23 
Re: C standard question?
Richard Heathfield <rj  2008-05-10 17:38:00 
Re: C standard question?
=?ISO-8859-1?Q?Tom=E1s_=D  2008-05-10 10:52:21 
Re: C standard question?
Eric Sosman <esosman@[  2008-05-10 14:00:19 
Re: C standard question?
=?ISO-8859-1?Q?Tom=E1s_=D  2008-05-10 10:55:04 
Re: C standard question?
Richard Heathfield <rj  2008-05-10 18:21:24 
Re: C standard question?
Flash Gordon <spam@[EM  2008-05-10 23:55:25 
Re: C standard question?
Thad Smith <ThadSmith@  2008-05-16 21:45:09 
Re: C standard question?
=?ISO-8859-1?Q?Tom=E1s_=D  2008-05-10 10:55:49 
Re: C standard question?
Chris H <chris@[EMAIL   2008-05-10 19:02:58 
Re: C standard question?
Richard Heathfield <rj  2008-05-10 18:18:39 
Re: C standard question?
lawrence.jones@[EMAIL PRO  2008-05-10 14:57:28 
Re: C standard question?
=?ISO-8859-1?Q?Tom=E1s_=D  2008-05-10 12:08:27 
Re: C standard question?
Eric Sosman <esosman@[  2008-05-10 15:55:11 
Re: C standard question?
richard@[EMAIL PROTECTED]  2008-05-10 20:08:54 
Re: C standard question?
Keith Thompson <kst-u@  2008-05-10 15:55:21 
Re: C standard question?
Chris H <chris@[EMAIL   2008-05-10 19:58:26 
Re: C standard question?
CBFalconer <cbfalconer  2008-05-10 16:49:42 
Re: C standard question?
=?ISO-8859-1?Q?Tom=E1s_=D  2008-05-10 19:49:54 
Re: C standard question?
Keith Thompson <kst-u@  2008-05-10 20:23:51 
Re: C standard question?
"Joachim Schmitz&quo  2008-05-11 10:40:42 
Re: C standard question?
pete <pfiland@[EMAIL P  2008-05-11 06:10:04 
Re: C standard question?
Chris H <chris@[EMAIL   2008-05-11 11:39:18 
Re: C standard question?
Keith Thompson <kst-u@  2008-05-11 11:43:01 
Re: C standard question?
Chris H <chris@[EMAIL   2008-05-11 11:42:51 
Re: C standard question?
Spiros Bousbouras <spi  2008-05-11 05:12:19 
Re: C standard question?
santosh <santosh.k83@[  2008-05-12 22:55:09 
Re: C standard question?
Spiros Bousbouras <spi  2008-05-11 05:16:21 
Re: C standard question?
Chris H <chris@[EMAIL   2008-05-11 13:47:08 
Re: C standard question?
rlb@[EMAIL PROTECTED] (R  2008-05-13 13:43:40 
Re: C standard question?
Harald van =?UTF-8?b?RMSz  2008-05-11 15:04:33 
Re: C standard question?
Spiros Bousbouras <spi  2008-05-11 06:05:05 
Re: C standard question?
Chris H <chris@[EMAIL   2008-05-11 14:23:07 
Re: C standard question?
Chris H <chris@[EMAIL   2008-05-11 14:29:36 
Re: C standard question?
David Thompson <dave.t  2008-06-04 05:49:43 
Re: C standard question?
=?ISO-8859-1?Q?Tom=E1s_=D  2008-05-11 09:10:07 
Re: C standard question?
=?ISO-8859-1?Q?Tom=E1s_=D  2008-05-11 09:17:12 
Re: C standard question?
Keith Thompson <kst-u@  2008-05-11 12:00:20 
Re: C standard question?
Flash Gordon <spam@[EM  2008-05-11 21:06:51 
Re: C standard question?
fchang@[EMAIL PROTECTED]   2008-05-11 09:49:03 
Re: C standard question?
Ian Collins <ian-news@  2008-05-12 08:01:47 
Re: C standard question?
Harald van =?UTF-8?b?RMSz  2008-05-11 19:02:42 
Re: C standard question?
Eligiusz Narutowicz<el  2008-05-11 20:01:34 
Re: C standard question?
Harald van =?UTF-8?b?RMSz  2008-05-11 20:55:08 
Re: C standard question?
Eligiusz Narutowicz<el  2008-05-11 21:18:44 
Re: C standard question?
Spiros Bousbouras <spi  2008-05-11 12:27:44 
Re: C standard question?
Bart <bc@[EMAIL PROTEC  2008-05-11 13:12:45 
Re: C standard question?
=?ISO-8859-1?Q?Tom=E1s_=D  2008-05-11 17:21:25 
Re: C standard question?
Chris H <chris@[EMAIL   2008-05-12 07:07:52 
Re: C standard question?
Chris H <chris@[EMAIL   2008-05-12 07:10:42 
Re: C standard question?
Richard Heathfield <rj  2008-05-12 06:31:11 
Re: C standard question?
Keith Thompson <kst-u@  2008-05-12 09:03:25 
Re: C standard question?
"Default User"   2008-05-12 22:29:06 
Re: C standard question?
Keith Thompson <kst-u@  2008-05-12 16:01:55 
Re: C standard question?
Chris H <chris@[EMAIL   2008-05-12 07:54:10 
Re: C standard question?
=?ISO-8859-1?Q?Tom=E1s_=D  2008-05-12 02:29:08 
Re: C standard question?
Cromulent <cromulent@[  2008-05-12 10:59:35 
Re: C standard question?
Keith Thompson <kst-u@  2008-05-12 08:58:37 
Re: C standard question?
Ben Bacarisse <ben.use  2008-05-12 18:06:47 
Re: C standard question?
Chris H <chris@[EMAIL   2008-05-12 18:53:59 
Re: C standard question?
pete <pfiland@[EMAIL P  2008-05-12 18:50:14 
Re: C standard question?
pete <pfiland@[EMAIL P  2008-05-12 18:51:25 
Re: C standard question?
Chris H <chris@[EMAIL   2008-05-13 15:14:27 
Re: C standard question?
Keith Thompson <kst-u@  2008-05-13 09:04:48 
Re: C standard question?
Willem <willem@[EMAIL   2008-05-13 16:41:48 
Re: C standard question?
Chris H <chris@[EMAIL   2008-05-13 17:39:00 
Re: C standard question?
Keith Thompson <kst-u@  2008-05-13 10:26:23 
Re: C standard question?
David Brown <david.bro  2008-05-13 23:45:00 
Re: C standard question?
pete <pfiland@[EMAIL P  2008-05-13 17:57:57 
Re: C standard question?
Chris H <chris@[EMAIL   2008-05-13 18:27:44 
Re: C standard question?
Willem <willem@[EMAIL   2008-05-13 18:31:29 
Re: C standard question?
Keith Thompson <kst-u@  2008-05-13 12:14:27 
Re: C standard question?
Harald van =?UTF-8?b?RMSz  2008-05-13 19:33:55 
Re: C standard question?
Chris H <chris@[EMAIL   2008-05-13 19:55:25 
Re: C standard question?
pete <pfiland@[EMAIL P  2008-05-13 18:10:48 
Re: C standard question?
Chris H <chris@[EMAIL   2008-05-16 12:30:58 
Re: C standard question?
Richard Heathfield <rj  2008-05-16 12:07:19 
Re: C standard question?
pete <pfiland@[EMAIL P  2008-05-16 08:37:25 
Re: C standard question?
Peter Nilsson <airia@[  2008-05-16 22:41:50 
Re: C standard question?
Flash Gordon <spam@[EM  2008-05-17 10:36:59 
Re: C standard question?
Chris H <chris@[EMAIL   2008-05-17 09:05:19 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Thu Jul 24 2:36:40 CDT 2008.