Path: csiph.com!eternal-september.org!feeder.eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail From: Keith Thompson Newsgroups: comp.lang.c Subject: Re: C Construction Problem Date: Tue, 27 Feb 2018 08:46:52 -0800 Organization: None to speak of Lines: 36 Message-ID: References: <87po4z3dh5.fsf@bsb.me.uk> <87606r3867.fsf@bsb.me.uk> <3e6e6bf9-d339-48d6-a615-d1ba8898ebc4@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: reader02.eternal-september.org; posting-host="dc6f39eee39fb93ac1cda4618eb4f5aa"; logging-data="2804"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18gGgIBi2t/q6Gm8Vd8/Lqv" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) Cancel-Lock: sha1:qCpr4n6JvVSInvCppwi5RGEqif0= sha1:JuVNg5hQsBsNwR/Ip+TVihJkbeU= Xref: csiph.com comp.lang.c:127134 jameskuyper@verizon.net writes: > On Tuesday, February 27, 2018 at 1:02:54 AM UTC-5, Tim Rentsch wrote: >> Ian Collins 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++"? If so, could > you explain that distinction? The C++ core language (excluding the library) is obviously based on the C core language, but the C++ standard doesn't define any core language features by reference to the C standard. For example, the meaning of the sizeof operator is defined separately by the C++ standard. On the other hand, the C++ standard library includes the C standard library (with some tweaks). The semantics of strcpy, for example, are defined by the C++ standard only via reference to the C standard. -- 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"