• Re: C23 on MSVC

    From Opus@21:1/5 to Thiago Adams on Tue Jan 21 21:19:49 2025
    On 21/01/2025 17:22, Thiago Adams wrote:
    I didn't find release notes! (Is like MS pretending C does exist anymore
    but still updating it)

    They've been doing just that for about 25 years.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Michael S@21:1/5 to Opus on Tue Jan 21 23:50:30 2025
    On Tue, 21 Jan 2025 21:19:49 +0100
    Opus <ifonly@youknew.org> wrote:

    On 21/01/2025 17:22, Thiago Adams wrote:
    I didn't find release notes! (Is like MS pretending C does exist
    anymore but still updating it)

    They've been doing just that for about 25 years.


    Not exactly. Between 1993 and ~2010 their C front end had seen
    very little chang. At most, they added few trivial headers, like
    <stdint.h>
    I would not call it 'updating it'.
    Of course, back end(s) were updated regularly, but this part is shared
    with C++.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lawrence D'Oliveiro@21:1/5 to All on Tue Jan 21 21:20:55 2025
    Interesting to compare the different compilers on this chart:

    <https://en.cppreference.com/w/c/compiler_support/23>.

    The only one with a solid green column is GCC. MSCV is mostly red.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Jack Lemmon@21:1/5 to Thiago Adams on Wed Jan 22 02:45:20 2025
    On 21/01/2025 16:22, Thiago Adams wrote:
    I didn't find release notes! (Is like MS pretending C does exist anymore
    but still updating it)


    Correct. Microsoft is not actively developing C and the release notes
    don't actually tell you much about C++.

    <https://learn.microsoft.com/en-us/visualstudio/releases/2022/release-notes#17.12.4>

    Microsoft's main language is C# and they are investing a lot on it. They
    want C# to be the main language for everyday use.

    I believe Herb Sutter has left Microsoft and is now working somewhere else.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lawrence D'Oliveiro@21:1/5 to Jack Lemmon on Wed Jan 22 05:41:10 2025
    On Wed, 22 Jan 2025 02:45:20 +0000, Jack Lemmon wrote:

    Microsoft's main language is C# and they are investing a lot on it. They
    want C# to be the main language for everyday use.

    What did they write C♯ in, though?

    I believe Herb Sutter has left Microsoft and is now working somewhere
    else.

    Surprised it didn’t happen sooner. He must have been continually
    embarrassed to come back from standards meetings, to find his employer
    among the last to adopt the new specs.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Jack Lemmon@21:1/5 to Lawrence D'Oliveiro on Thu Jan 23 02:28:43 2025
    On 22/01/2025 05:41, Lawrence D'Oliveiro wrote:
    On Wed, 22 Jan 2025 02:45:20 +0000, Jack Lemmon wrote:

    Microsoft's main language is C# and they are investing a lot on it. They
    want C# to be the main language for everyday use.

    What did they write C♯ in, though?


    First release was written in assembly code. Subsequent releases are in
    C# itself. The c# language is class based object oriented, so you don't
    need anything else to expand the language. Just write a new object and
    compile it to be used by other objects. This is the same as in C or C++.
    First release were in assembly and any enhancement were in the same
    language = C or C++ respectively.

    C# is now cross platform; You can download VS code and .net extension
    and compile the code in Linux and/or Mac. There are many tutorials
    teaching new users how to write and compile c# code in Linux.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From James Kuyper@21:1/5 to Jack Lemmon on Thu Jan 23 02:35:20 2025
    On 1/22/25 21:28, Jack Lemmon wrote:
    ...
    compile it to be used by other objects. This is the same as in C or
    C++. First release were in assembly and any enhancement were in the
    same language = C or C++ respectively.

    Not quite - the original C++ compiler was Cfront, which produced C code
    which was then compiled by a conventional C compiler. Per Wikipedia:

    "As Cfront was written in C++, it was a challenge to bootstrap on a
    machine without a C++ compiler/translator. Along with the Cfront C++
    sources, a special "half-preprocessed" version of the C code resulting
    from compiling Cfront with itself was also provided. This C code was to
    be compiled with the native C compiler, and the resulting executable
    could then be used to compile the Cfront C++ sources."

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Kaz Kylheku@21:1/5 to James Kuyper on Thu Jan 23 21:45:34 2025
    On 2025-01-23, James Kuyper <jameskuyper@alumni.caltech.edu> wrote:
    On 1/22/25 21:28, Jack Lemmon wrote:
    ...
    compile it to be used by other objects. This is the same as in C or
    C++. First release were in assembly and any enhancement were in the
    same language = C or C++ respectively.

    Not quite - the original C++ compiler was Cfront, which produced C code
    which was then compiled by a conventional C compiler. Per Wikipedia:

    "As Cfront was written in C++, it was a challenge to bootstrap on a
    machine without a C++ compiler/translator. Along with the Cfront C++
    sources, a special "half-preprocessed" version of the C code resulting
    from compiling Cfront with itself was also provided. This C code was to
    be compiled with the native C compiler, and the resulting executable
    could then be used to compile the Cfront C++ sources."

    The code is available, up through some final release back around 1994.

    I was looking at it some time ago.


    --
    TXR Programming Language: http://nongnu.org/txr
    Cygnal: Cygwin Native Application Library: http://kylheku.com/cygnal
    Mastodon: @Kazinator@mstdn.ca

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lawrence D'Oliveiro@21:1/5 to Jack Lemmon on Thu Jan 23 23:51:27 2025
    On Thu, 23 Jan 2025 02:28:43 +0000, Jack Lemmon wrote:

    On 22/01/2025 05:41, Lawrence D'Oliveiro wrote:

    What did they write C♯ in, though?

    First release was written in assembly code. Subsequent releases are in
    C# itself.

    Isn’t there a dependency on CLR as the OO engine? What is that written in?

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lawrence D'Oliveiro@21:1/5 to All on Fri Jan 24 06:58:47 2025
    On Thu, 23 Jan 2025 20:06:02 -0500, mjos_examine wrote:

    On 2025-01-21 4:20 p.m., Lawrence D'Oliveiro wrote:

    Interesting to compare the different compilers on this chart:

    <https://en.cppreference.com/w/c/compiler_support/23>.

    The only one with a solid green column is GCC. MSCV is mostly red.

    That chart is inaccurate for MSVC 17.12.4 with /std:clatest.
    For instance, [[fallthrough]] is certainly supported.

    Still leaving MSVC mostly red, is it not? And still the only one with a
    solid green column remains GCC.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Michael S@21:1/5 to Lawrence D'Oliveiro on Fri Jan 24 14:06:05 2025
    On Fri, 24 Jan 2025 06:58:47 -0000 (UTC)
    Lawrence D'Oliveiro <ldo@nz.invalid> wrote:

    On Thu, 23 Jan 2025 20:06:02 -0500, mjos_examine wrote:

    On 2025-01-21 4:20 p.m., Lawrence D'Oliveiro wrote:

    Interesting to compare the different compilers on this chart:

    <https://en.cppreference.com/w/c/compiler_support/23>.

    The only one with a solid green column is GCC. MSCV is mostly red.


    That chart is inaccurate for MSVC 17.12.4 with /std:clatest.
    For instance, [[fallthrough]] is certainly supported.

    Still leaving MSVC mostly red, is it not? And still the only one with
    a solid green column remains GCC.

    May be, because majority of additions to the Standard were codifying
    existing gcc practice?
    BTW, there is nothing wrong with that. In the situation where gcc team
    is the only capable team interested in further development of C
    language, it is the most logical outcome.


    I suppose, MSVC team would appreciate addition of
    __try/__except/__finally.
    But since it didn't happen in last 31 years, it is not very likely to
    happen in the future.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lawrence D'Oliveiro@21:1/5 to Michael S on Sat Jan 25 00:41:35 2025
    On Fri, 24 Jan 2025 14:06:05 +0200, Michael S wrote:

    May be, because majority of additions to the Standard were codifying
    existing gcc practice?

    Interesting. When I ventured a few months ago in this group that GCC had
    become the closest we have to a de-facto-standard C implementation, quite
    a few people objected.

    Did you know GCC allows nested function definitions, with references to
    uplevel locals? I wonder how long it is before that makes it into ANSI/ISO
    C ...

    BTW, there is nothing wrong with that. In the situation where gcc team
    is the only capable team interested in further development of C
    language, it is the most logical outcome.

    What, no love for LLVM/clang?

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Opus@21:1/5 to Michael S on Sat Jan 25 02:48:22 2025
    On 24/01/2025 13:06, Michael S wrote:
    May be, because majority of additions to the Standard were codifying
    existing gcc practice?
    BTW, there is nothing wrong with that. In the situation where gcc team
    is the only capable team interested in further development of C
    language, it is the most logical outcome.

    Yes, the main reason is that GCC actually cares about C.
    MS hasn't for over 2 decades.
    They just mostly stuck to C89 for their own needs (kernel, drivers...)
    with just a few proprietary MS extensions. They never cared beyond that
    and switched to C++ entirely mid-90's for all their developments (apart
    again from the very low level) even when the Windows API itself was
    still C for the most part.

    I suppose, MSVC team would appreciate addition of
    __try/__except/__finally.
    But since it didn't happen in last 31 years, it is not very likely to
    happen in the future.

    Considering they are using C only for the low-level parts, shouldn't
    they embrace Rust instead, which they are promoters of? Or are they
    "promoting" it for everyone else except themselves? Not really willing
    to start a flamewar (although it can be fun with some topics), but just curious.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Waldek Hebisch@21:1/5 to Jack Lemmon on Sat Jan 25 23:36:41 2025
    Jack Lemmon <noreply@mandrill.com> wrote:
    On 22/01/2025 05:41, Lawrence D'Oliveiro wrote:
    On Wed, 22 Jan 2025 02:45:20 +0000, Jack Lemmon wrote:

    Microsoft's main language is C# and they are investing a lot on it. They >>> want C# to be the main language for everyday use.

    What did they write C♯ in, though?


    First release was written in assembly code. Subsequent releases are in
    C# itself. The c# language is class based object oriented, so you don't
    need anything else to expand the language. Just write a new object and compile it to be used by other objects. This is the same as in C or C++. First release were in assembly and any enhancement were in the same
    language = C or C++ respectively.

    Do you have insider info? Writing substantial piece of code in
    nineties using assembler would be highly unusual. Slightly
    earlier Microsoft supposedly had a rule that all code should
    be in C (presumably with exceptions for lowest level machine
    dependencies and some performance critical parts, but both
    should be relatively small).

    Also, when a company has compilers for multiple languages, it
    is natural to share substantial part for other languages. In
    case of gcc Ada front-end is in Ada, but most work is in "middle
    end" that is common to all compilers in gcc and is written in C++.
    I would guess that now Microsoft C compiler is written in C++.

    --
    Waldek Hebisch

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Andrey Tarasevich@21:1/5 to Thiago Adams on Tue Feb 4 06:36:09 2025
    On Tue 1/21/2025 8:22 AM, Thiago Adams wrote:
    I didn't find release notes! (Is like MS pretending C does exist anymore
    but still updating it)

    Nope. Microsoft has been officially saying that they are fully
    supporting modern C standards for quite a while

    https://devblogs.microsoft.com/cppblog/c11-and-c17-standard-support-arriving-in-msvc/

    It is clear that most of their resources are dedicated to supporting C++
    (as is the case with all other mainstream compiler developers), but
    their C support is not wavering either.

    --
    Bets regards,
    Andrey

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From David Brown@21:1/5 to Andrey Tarasevich on Tue Feb 4 21:04:39 2025
    On 04/02/2025 15:36, Andrey Tarasevich wrote:
    On Tue 1/21/2025 8:22 AM, Thiago Adams wrote:
    I didn't find release notes! (Is like MS pretending C does exist
    anymore but still updating it)

    Nope. Microsoft has been officially saying that they are fully
    supporting modern C standards for quite a while

    https://devblogs.microsoft.com/cppblog/c11-and-c17-standard-support-arriving-in-msvc/

    It is clear that most of their resources are dedicated to supporting C++
    (as is the case with all other mainstream compiler developers), but
    their C support is not wavering either.


    If I understand it correctly (and I don't really care about MSVC's C
    support, except on how their lack of C support negatively impacts the C standards and other C programmers), they still fail to support C99.
    They pushed for some aspects of C99 - specifically VLA's - to be
    optional in C11 so that they could avoid supporting it.

    So in 2020 with their latest compiler, MS is proudly supporting a
    decade-old standard while still failing to handle a massively popular twenty-year old standard. Forgive me for not being impressed.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)