Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.c > #127950
| From | Tim Rentsch <txr@alumni.caltech.edu> |
|---|---|
| Newsgroups | comp.lang.c |
| Subject | Re: C Construction Problem |
| Date | 2018-03-17 10:29 -0700 |
| Organization | A noiseless patient Spider |
| Message-ID | <kfnzi36objt.fsf@x-alumni2.alumni.caltech.edu> (permalink) |
| References | (12 earlier) <ffge55Fs83qU1@mid.individual.net> <kfnwoyzrmvb.fsf@x-alumni2.alumni.caltech.edu> <a21a35eb-498d-4db2-9d72-08e8e8485269@googlegroups.com> <kfntvtxqxo6.fsf@x-alumni2.alumni.caltech.edu> <e1e345da-d15d-4276-88e0-2c6ef7de04d1@googlegroups.com> |
jameskuyper@verizon.net writes: > On Saturday, March 3, 2018 at 5:08:23 AM UTC-5, Tim Rentsch wrote: > >> jameskuyper@verizon.net writes: >> >>> On Tuesday, February 27, 2018 at 1:02:54 AM UTC-5, Tim Rentsch wrote: >>> >>>> Ian Collins <ian-news@hotmail.com> writes: >>>> >>>>> Due to C++11 using C99 rather than C89 as its base, [...] >>>> >>>> In C++11 and later, C++ uses the C99 library as its base >>>> library. It does not use the C99 language as its base >>>> language. >>> >>> "C ++ is a general purpose programming language based on the C >>> programming language as described in ISO/IEC 9899:2011 Programming >>> languages ? C (hereinafter referred to as the C standard). In >>> addition to the facilities provided by C, C ++ provides ..." >>> (n4659.pdf 1p2). >>> >>> n3690.pdf refers to 9899:1999 instead of 9899:2011. >>> >>> Are you making a distinction between saying "C++ is ... based on >>> ... ISO/IEC 9899:1999", and "C99 is the base language for C++"? > > I'm presuming, from the nature of your reply below, that your answer to > that question, had you bothered to make one, would have been "No". Let > me know (by explicitly stating what your answer would actually have > been) if I'm wrong about that. I am neither making a distinction nor not making a distinction. I didn't understand how your question related to my statement so I simply tried to explain that earlier statement further. >>> If so, could you explain that distinction? >> >> C99 has variable length arrays. C++ does not. >> >> C99 has designated initializers. C++ does not. >> >> C99 has compound literals. C++ does not. >> >> C99 has inline functions. C++ also has inline functions, >> but with different semantics. >> >> C11 has anonymous structs and unions. C++ does not. >> >> C11 has _Generic. C++ does not. >> >> There are other differences; those are some of the more >> obvious ones. > > Let me extend that list for you. I took the list of changes from C90 > listed in the C11 foreword, and removed those parts that involved the C > standard library. All of the following are C11 differences from C90 that > are either not present, or implemented differently, in C++17: > > ? querying and specifying alignment of objects > ? no-return functions > ? more precise aliasing rules via effective type > ? restricted pointers > ? static and type qualifiers in parameter array declarators > ? complex (and imaginary) support in <complex.h> > ? type-generic math macros in <tgmath.h> > ? increased minimum translation limits > ? hexadecimal floating-point constants and %a and %A printf/scanf > conversion specifiers > ? IEC 60559 (also known as IEC 559 or IEEE arithmetic) support > ? new structure type compatibility rules (tag compatibility) > ? additional predefined macro names > ? LIA compatibility annex This list includes some library features and also is incomplete with respect to language features. > However, even with those additions, that list still represent only a > tiny fraction of the total list of features of C11. Yes, but a large fraction of the differences between C11 and C90, which is the relevant metric when deciding between whether the C++ language is more aptly described as based on the C90 language or the C11 language. > Before deciding whether C++17 is closer to C99 or C11, you should also > look at the features of C11 that were changes from C90, and are > supported in the same way in C++17: > > ? Unicode characters and strings > ? static assertions > ? restricted character set support via digraphs > ? the long long int type > ? remove implicit int > ? reliable integer division > ? universal character names (\u and \U) > ? // comments > ? extended integer types > ? remove implicit function declaration > ? preprocessor arithmetic done in intmax_t/uintmax_t > ? mixed declarations and code > - declaration in first part of for(). > ? integer constant type rules > ? integer promotion rules > ? macros with a variable number of arguments > ? trailing comma allowed in enum declaration > ? idempotent type qualifiers > ? empty macro arguments > ? _Pragma preprocessing operator > ? standard pragmas > ? _ _func_ _ predefined identifier > ? conversion of array to pointer not limited to lvalues > ? relaxed constraints on aggregate and union initialization > ? relaxed restrictions on portable header names > ? return without expression not permitted in function that returns a > value (and vice versa) What makes you think I hadn't looked at these already? > Disclaimer: that's a long list, and I didn't spend a lot of time to look > into each item; it might contain mistakes, or cases where there's > differences between the C11 and C++17 feature that I didn't notice. > > Whether the items on the second list are more important than the items > on the first list is a judgment call, and as such, inherently subjective. > I have no interest in arguing with you about judgment calls. I'm not > even claiming that are more important - I didn't bother trying to > make that > judgment. I'll limit myself to pointing out the objective fact that there > are more items in the second list. In graduate school I heard a very interesting statement about universities making decisions regarding whether to award tenure: "Some places count papers, some places weigh papers, and some places read papers." > The key point is that the C++ committee deliberately chose to change 1p2 > to refer to C11 rather than C90, implying that, in their judgment, > there's enough features that were added in C99 and C11 that are also in > C++17 to justify making that change. You can disagree with their > judgment on that matter - but its not an issue I'm willing to bother > discussing. I don't have any reason at this moment to think they are considering the same question that I was considering. >> Finally, let me point out Annex C, "Compatibility", in n4659. >> Paragraph 1 of C.1 says >> >> This subclause lists the differences between C++ and ISO C, >> by the chapters of this document. >> >> Despite that introduction, AFAICT no language features new to C99 >> or C11 are among those compared. In fact one of the items listed >> is implicit declaration of functions, which hasn't been part of >> standard C for almost 20 years. Also inline functions are not >> listed. So the C++ standard itself tacitly concedes the point >> that, as far as the language goes, C++ is based on C90 and not on >> C99 or C11. > > At best, it does so indirectly, and only after having > explicitly stating that it is based on C11. Yes, the tacit admission gives lie to the explicit statement.
Back to comp.lang.c | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
C Construction Problem "F. Russell" <fr@random.info> - 2018-02-20 13:51 +0000
Re: C Construction Problem bartc <bc@freeuk.com> - 2018-02-20 14:42 +0000
Re: C Construction Problem "F. Russell" <fr@random.info> - 2018-02-20 15:06 +0000
Re: C Construction Problem Manfred <noname@invalid.add> - 2018-02-20 18:07 +0100
Re: C Construction Problem Jorgen Grahn <grahn+nntp@snipabacken.se> - 2018-02-20 14:54 +0000
Re: C Construction Problem "James R. Kuyper" <jameskuyper@verizon.net> - 2018-02-20 10:06 -0500
Re: C Construction Problem "F. Russell" <fr@random.info> - 2018-02-20 16:11 +0000
Re: C Construction Problem Ben Bacarisse <ben.usenet@bsb.me.uk> - 2018-02-20 15:08 +0000
Re: C Construction Problem "F. Russell" <fr@random.info> - 2018-02-20 16:22 +0000
Re: C Construction Problem Ben Bacarisse <ben.usenet@bsb.me.uk> - 2018-02-20 17:03 +0000
Re: C Construction Problem Malcolm McLean <malcolm.arthur.mclean@gmail.com> - 2018-02-20 09:23 -0800
Re: C Construction Problem Joe Pfeiffer <pfeiffer@cs.nmsu.edu> - 2018-02-20 11:11 -0700
Re: C Construction Problem "F. Russell" <fr@random.info> - 2018-02-20 18:30 +0000
Re: C Construction Problem Jorgen Grahn <grahn+nntp@snipabacken.se> - 2018-02-20 23:37 +0000
Re: C Construction Problem "F. Russell" <fr@random.info> - 2018-02-21 00:45 +0000
Re: C Construction Problem bartc <bc@freeuk.com> - 2018-02-21 01:46 +0000
Re: C Construction Problem David Brown <david.brown@hesbynett.no> - 2018-02-21 08:49 +0100
Re: C Construction Problem Jorgen Grahn <grahn+nntp@snipabacken.se> - 2018-02-21 09:29 +0000
[OT] Re: C Construction Problem bartc <bc@freeuk.com> - 2018-02-21 11:24 +0000
Re: [OT] Re: C Construction Problem Anton Shepelev <anton.txt@g{oogle}mail.com> - 2018-02-21 14:41 +0300
Re: [OT] Re: C Construction Problem David Brown <david.brown@hesbynett.no> - 2018-02-21 15:10 +0100
Re: [OT] Re: C Construction Problem Robert Wessel <robertwessel2@yahoo.com> - 2018-02-21 12:36 -0600
Re: [OT] Re: C Construction Problem bartc <bc@freeuk.com> - 2018-02-21 21:04 +0000
Re: [OT] Re: C Construction Problem Robert Wessel <robertwessel2@yahoo.com> - 2018-02-21 18:20 -0600
Re: C Construction Problem Anton Shepelev <anton.txt@g{oogle}mail.com> - 2018-02-21 11:09 +0300
Re: C Construction Problem Malcolm McLean <malcolm.arthur.mclean@gmail.com> - 2018-02-21 02:29 -0800
Re: C Construction Problem "F. Russell" <fr@random.info> - 2018-02-21 11:32 +0000
Re: C Construction Problem Geoff <geoff@invalid.invalid> - 2018-02-26 11:02 -0800
Re: C Construction Problem David Brown <david.brown@hesbynett.no> - 2018-02-27 09:22 +0100
Re: C Construction Problem Geoff <geoff@invalid.invalid> - 2018-02-27 11:18 -0800
Re: C Construction Problem bartc <bc@freeuk.com> - 2018-02-27 19:51 +0000
Re: C Construction Problem Robert Wessel <robertwessel2@yahoo.com> - 2018-02-28 01:54 -0600
Re: C Construction Problem Robert Wessel <robertwessel2@yahoo.com> - 2018-02-28 01:43 -0600
Re: C Construction Problem Geoff <geoff@invalid.invalid> - 2018-02-28 12:54 -0800
Re: archive decompressor Noob <root@127.0.0.1> - 2018-03-04 12:34 +0100
Re: C Construction Problem Anton Shepelev <anton.txt@g{oogle}mail.com> - 2018-02-21 11:04 +0300
Re: C Construction Problem "F. Russell" <fr@random.info> - 2018-02-21 11:27 +0000
Re: C Construction Problem Anton Shepelev <anton.txt@gmail.com> - 2018-02-28 22:59 +0300
Re: C Construction Problem supercat@casperkitty.com - 2018-02-21 08:49 -0800
Re: C Construction Problem Geoff <geoff@invalid.invalid> - 2018-02-26 11:08 -0800
Re: C Construction Problem "F. Russell" <fr@random.info> - 2018-02-26 23:51 +0000
Re: C Construction Problem Geoff <geoff@invalid.invalid> - 2018-02-27 11:24 -0800
Re: C Construction Problem Tim Rentsch <txr@alumni.caltech.edu> - 2018-02-21 08:07 -0800
Re: C Construction Problem fr314159@gmail.com - 2018-02-21 09:16 -0800
Re: C Construction Problem Tim Rentsch <txr@alumni.caltech.edu> - 2018-02-21 21:26 -0800
Re: C Construction Problem Keith Thompson <kst-u@mib.org> - 2018-02-21 09:43 -0800
Re: C Construction Problem Tim Rentsch <txr@alumni.caltech.edu> - 2018-02-21 22:47 -0800
Re: C Construction Problem Jorgen Grahn <grahn+nntp@snipabacken.se> - 2018-02-22 13:09 +0000
Re: C Construction Problem Tim Rentsch <txr@alumni.caltech.edu> - 2018-02-24 13:37 -0800
Re: C Construction Problem Keith Thompson <kst-u@mib.org> - 2018-02-22 10:50 -0800
Re: C Construction Problem Tim Rentsch <txr@alumni.caltech.edu> - 2018-02-24 13:58 -0800
Re: C Construction Problem Keith Thompson <kst-u@mib.org> - 2018-02-24 15:05 -0800
Re: C Construction Problem Malcolm McLean <malcolm.arthur.mclean@gmail.com> - 2018-02-25 03:21 -0800
Re: C Construction Problem bartc <bc@freeuk.com> - 2018-02-25 11:51 +0000
Re: C Construction Problem Malcolm McLean <malcolm.arthur.mclean@gmail.com> - 2018-02-25 04:06 -0800
Re: C Construction Problem bartc <bc@freeuk.com> - 2018-02-25 12:47 +0000
Re: C Construction Problem "F. Russell" <fr@random.info> - 2018-02-25 13:20 +0000
Re: C Construction Problem bartc <bc@freeuk.com> - 2018-02-25 17:46 +0000
Re: C Construction Problem "F. Russell" <fr@random.info> - 2018-02-25 18:58 +0000
Re: C Construction Problem bartc <bc@freeuk.com> - 2018-02-25 20:01 +0000
Re: C Construction Problem bartc <bc@freeuk.com> - 2018-02-25 20:25 +0000
Re: C Construction Problem Malcolm McLean <malcolm.arthur.mclean@gmail.com> - 2018-02-26 02:49 -0800
Re: C Construction Problem Ben Bacarisse <ben.usenet@bsb.me.uk> - 2018-02-25 20:02 +0000
Re: C Construction Problem Keith Thompson <kst-u@mib.org> - 2018-02-25 15:13 -0800
Re: C Construction Problem Robert Wessel <robertwessel2@yahoo.com> - 2018-02-25 11:50 -0600
Re: C Construction Problem Ian Collins <ian-news@hotmail.com> - 2018-02-26 07:38 +1300
Re: C Construction Problem Keith Thompson <kst-u@mib.org> - 2018-02-25 15:15 -0800
Re: C Construction Problem Tim Rentsch <txr@alumni.caltech.edu> - 2018-02-26 22:02 -0800
Re: C Construction Problem jameskuyper@verizon.net - 2018-02-27 06:32 -0800
Re: C Construction Problem GOTHIER Nathan <nathan.gothier@gmail.com> - 2018-02-27 16:56 +0100
Re: C Construction Problem jameskuyper@verizon.net - 2018-02-27 08:27 -0800
Re: C Construction Problem GOTHIER Nathan <nathan.gothier@gmail.com> - 2018-02-27 18:02 +0100
Re: C Construction Problem jameskuyper@verizon.net - 2018-02-27 10:23 -0800
Re: C Construction Problem Tim Rentsch <txr@alumni.caltech.edu> - 2018-03-03 01:09 -0800
Re: C Construction Problem David Brown <david.brown@hesbynett.no> - 2018-02-28 10:37 +0100
Re: C Construction Problem Tim Rentsch <txr@alumni.caltech.edu> - 2018-03-03 01:29 -0800
Re: C Construction Problem Steven Petruzzellis <frelwizzen@gmail.com> - 2018-03-03 02:00 -0800
Re: C Construction Problem Keith Thompson <kst-u@mib.org> - 2018-02-27 08:46 -0800
Re: C Construction Problem jameskuyper@verizon.net - 2018-02-27 09:15 -0800
Re: C Construction Problem Tim Rentsch <txr@alumni.caltech.edu> - 2018-03-03 02:08 -0800
Re: C Construction Problem Steven Petruzzellis <frelwizzen@gmail.com> - 2018-03-03 02:31 -0800
Re: C Construction Problem Ian Collins <ian-news@hotmail.com> - 2018-03-04 10:34 +1300
Re: C Construction Problem Tim Rentsch <txr@alumni.caltech.edu> - 2018-03-19 10:27 -0700
Re: C Construction Problem jameskuyper@verizon.net - 2018-03-03 21:35 -0800
Re: C Construction Problem Tim Rentsch <txr@alumni.caltech.edu> - 2018-03-17 10:29 -0700
Re: C Construction Problem Steven Petruzzellis <frelwizzen@gmail.com> - 2018-03-18 08:14 -0700
Re: C Construction Problem David Brown <david.brown@hesbynett.no> - 2018-02-25 21:49 +0100
Re: C Construction Problem Keith Thompson <kst-u@mib.org> - 2018-02-25 15:09 -0800
Re: C Construction Problem gazelle@shell.xmission.com (Kenny McCormack) - 2018-02-26 13:46 +0000
Re: C Construction Problem David Brown <david.brown@hesbynett.no> - 2018-02-26 14:57 +0100
Re: C Construction Problem Tim Rentsch <txr@alumni.caltech.edu> - 2018-02-26 22:14 -0800
Re: C Construction Problem "F. Russell" <fr@random.info> - 2018-02-22 00:11 +0000
Re: C Construction Problem Joe Pfeiffer <pfeiffer@cs.nmsu.edu> - 2018-02-21 17:27 -0700
Re: C Construction Problem Keith Thompson <kst-u@mib.org> - 2018-02-20 09:30 -0800
Re: C Construction Problem Ben Bacarisse <ben.usenet@bsb.me.uk> - 2018-02-21 00:23 +0000
Re: C Construction Problem Joe Pfeiffer <pfeiffer@cs.nmsu.edu> - 2018-02-20 09:11 -0700
Re: C Construction Problem "F. Russell" <fr@random.info> - 2018-02-20 16:38 +0000
Re: C Construction Problem bartc <bc@freeuk.com> - 2018-02-20 17:07 +0000
Re: C Construction Problem John Bode <jfbode1029@gmail.com> - 2018-02-20 09:09 -0800
Re: C Construction Problem "James R. Kuyper" <jameskuyper@verizon.net> - 2018-02-20 12:18 -0500
Re: C Construction Problem Keith Thompson <kst-u@mib.org> - 2018-02-20 09:38 -0800
Re: C Construction Problem Joe Pfeiffer <pfeiffer@cs.nmsu.edu> - 2018-02-20 11:08 -0700
Re: C Construction Problem Gordon Burditt <gordon@hammy.burditt.org> - 2018-02-20 21:47 -0600
Re: C Construction Problem Keith Thompson <kst-u@mib.org> - 2018-02-21 09:36 -0800
Re: C Construction Problem Geoff <geoff@invalid.invalid> - 2018-02-26 11:21 -0800
csiph-web