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


Groups > comp.lang.c++ > #88974

Re: lvalue assignment difference between C and C++

From David Brown <david.brown@hesbynett.no>
Newsgroups comp.lang.c++, comp.lang.c
Subject Re: lvalue assignment difference between C and C++
Date 2023-02-05 11:42 +0100
Organization A noiseless patient Spider
Message-ID <tro15s$2f7lc$1@dont-email.me> (permalink)
References <trltmg$21cft$1@dont-email.me> <0mvDL.68810$b7Kc.34465@fx39.iad> <trm2tb$224hr$1@dont-email.me>

Cross-posted to 2 groups.

Show all headers | View raw


On 04/02/2023 17:59, Muttley@dastardlyhq.com wrote:

> Ok, that makes sense. Though I wonder - given the main C compilers used now
> are also C++ compilers - why they don't just silently allow it in C? Would
> there be any wierd or unfortunate side effects in C if it was?
> 

Most C++ compilers have a closely related C compiler that is part of the 
same overall compiler project, but the front ends for C and C++ are 
usually separate programs.  So major C++ compilers such as gcc, clang, 
MSVC, ICC all support C within the same overall toolchain.  But it is 
normal that the front-end parsers are separate, even though the 
middle-end optimisers and back-end code generators are shared.

On the other hand, the vast majority of C compilers are /not/ C++ 
compilers.  With a bit of googling, you'll probably find a couple of 
dozen C compilers available for PC's (Linux and/or Windows) freely 
available, and only a few of them will also have C++ compilers.  Go over 
to the embedded world and you can find hundreds of C compilers, and only 
perhaps 5% of them support C++.

If you look at hobby projects, one-man toolchains and niche compilers, I 
have never heard of any that support C++, while a working C compiler is 
something many people have written.

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


Thread

lvalue assignment difference between C and C++ Muttley@dastardlyhq.com - 2023-02-04 15:30 +0000
  Re: lvalue assignment difference between C and C++ Richard Damon <Richard@Damon-Family.org> - 2023-02-04 11:04 -0500
    Re: lvalue assignment difference between C and C++ Muttley@dastardlyhq.com - 2023-02-04 16:59 +0000
      Re: lvalue assignment difference between C and C++ Richard Damon <Richard@Damon-Family.org> - 2023-02-04 13:02 -0500
      Re: lvalue assignment difference between C and C++ Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2023-02-04 12:45 -0800
      Re: lvalue assignment difference between C and C++ David Brown <david.brown@hesbynett.no> - 2023-02-05 11:42 +0100
        Re: lvalue assignment difference between C and C++ Muttley@dastardlyhq.com - 2023-02-06 09:26 +0000
          Re: lvalue assignment difference between C and C++ Öö Tiib <ootiib@hot.ee> - 2023-02-06 03:27 -0800
            Re: lvalue assignment difference between C and C++ Muttley@dastardlyhq.com - 2023-02-06 15:49 +0000
          Re: lvalue assignment difference between C and C++ David Brown <david.brown@hesbynett.no> - 2023-02-06 14:13 +0100
            Re: lvalue assignment difference between C and C++ Muttley@dastardlyhq.com - 2023-02-06 15:50 +0000
              Re: lvalue assignment difference between C and C++ David Brown <david.brown@hesbynett.no> - 2023-02-06 20:08 +0100
              Re: lvalue assignment difference between C and C++ Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2023-02-06 12:47 -0800
          Re: lvalue assignment difference between C and C++ Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2023-02-06 13:03 -0800
            Re: lvalue assignment difference between C and C++ Muttley@dastardlyhq.com - 2023-02-07 09:24 +0000
              Re: lvalue assignment difference between C and C++ Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2023-02-07 11:08 -0800
                Re: lvalue assignment difference between C and C++ Muttley@dastardlyhq.com - 2023-02-08 09:23 +0000
                Re: lvalue assignment difference between C and C++ Blue-Maned_Hawk <bluemanedhawk@gmail.com> - 2023-02-08 22:13 -0500
                Re: lvalue assignment difference between C and C++ James Kuyper <jameskuyper@alumni.caltech.edu> - 2023-02-08 22:53 -0500
                Re: lvalue assignment difference between C and C++ Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2023-02-08 22:12 -0800
              Re: lvalue assignment difference between C and C++ Ben Bacarisse <ben.usenet@bsb.me.uk> - 2023-02-08 02:52 +0000
      Re: lvalue assignment difference between C and C++ Paavo Helde <eesnimi@osa.pri.ee> - 2023-02-06 09:11 +0200
        Re: lvalue assignment difference between C and C++ Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2023-02-06 01:01 -0800
          Re: lvalue assignment difference between C and C++ Richard Damon <Richard@Damon-Family.org> - 2023-02-06 07:42 -0500
            Re: lvalue assignment difference between C and C++ Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2023-02-06 12:59 -0800
        Re: lvalue assignment difference between C and C++ Bonita Montero <Bonita.Montero@gmail.com> - 2023-02-07 07:44 +0100
          Re: lvalue assignment difference between C and C++ Paavo Helde <eesnimi@osa.pri.ee> - 2023-02-07 09:18 +0200
            Re: lvalue assignment difference between C and C++ Tim Rentsch <tr.17687@z991.linuxsc.com> - 2023-02-07 07:50 -0800
    Re: lvalue assignment difference between C and C++ Kaz Kylheku <864-117-4973@kylheku.com> - 2023-02-06 22:21 +0000
      Re: lvalue assignment difference between C and C++ Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2023-02-06 14:43 -0800
  Re: lvalue assignment difference between C and C++ Bonita Montero <Bonita.Montero@gmail.com> - 2023-02-04 19:41 +0100
  Re: lvalue assignment difference between C and C++ Andrey Tarasevich <andreytarasevich@hotmail.com> - 2023-02-10 16:19 -0800
    Re: lvalue assignment difference between C and C++ Armando di Matteo <armando.dimatteo87@gmail.com> - 2023-02-21 09:15 -0800
      Re: lvalue assignment difference between C and C++ Andrey Tarasevich <andreytarasevich@hotmail.com> - 2023-02-21 09:46 -0800
        Re: lvalue assignment difference between C and C++ Muttley@dastardlyhq.com - 2023-02-22 09:29 +0000
          Re: lvalue assignment difference between C and C++ Öö Tiib <ootiib@hot.ee> - 2023-02-22 01:46 -0800
    Re: lvalue assignment difference between C and C++ Tim Rentsch <tr.17687@z991.linuxsc.com> - 2023-02-22 06:36 -0800

csiph-web