• Substantive Comments Please: GCC vs. LLMV

    From Leroy H@3:633/10 to All on Saturday, October 31, 2026 03:11:04
    I should have, but I have never seriously researched the differences
    and advantages/disadvantages of the GNU Compiler Collection (GCC)
    versus the LLVM/Clang compiler (only the C compiler interests me).

    All of my GNU/Linux systems are built using GCC. It has good
    hardware optimization options, Link Time Optimization (LTO), and
    even, if desired, Profile Guided Optimization (PGO).

    But LLVM/Clang has been around for a long while as an alternative
    C compiler. I have never used LLVM/Clang but others will claim
    benefits and advantages.

    To me, LLVM/Clang seems limited compared to GCC, especially in terms
    of SIMD hardware support, but that assessment is based on incomplete
    knowledge.

    Can anyone offer more insight into this issue?

    Basically, which compiler is truly "better?"


    --- PyGate Linux v1.5.19
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From Computer Nerd Kev@3:633/10 to All on Saturday, October 31, 2026 17:28:10
    Leroy H <lh@somewhere.net> wrote:
    Can anyone offer more insight into this issue?

    Basically, which compiler is truly "better?"

    All I know is that libllvm is _huge_ and I've worked hard to avoid
    installing it on systems that I try to keep small. That sort of
    bloat really annoys me.

    According to these speed benchmarks of different libraries built
    with GCC and Clang, they're about evenly matched overall, but in
    some specific cases one can be significantly faster than the other:

    https://www.phoronix.com/review/gcc-16-vs-clang-22

    --
    __ __
    #_ < |\| |< _#

    --- PyGate Linux v1.5.19
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From Leroy H@3:633/10 to All on Saturday, October 31, 2026 13:25:27
    On 31 Oct 2026 17:28:10 +1000, Computer Nerd Kev wrote:


    All I know is that libllvm is _huge_ and I've worked hard to avoid
    installing it on systems that I try to keep small. That sort of
    bloat really annoys me.


    In some cases it cannot be avoided. One example is Mesa that uses
    llvm for software rendering:

    <https://docs.mesa3d.org/drivers/llvmpipe.html>


    Firefox releases are also built with llvm which means that Mozilla
    has chosen it over GCC:

    <https://www.phoronix.com/news/Firefox-Clang-LTO-All-Platforms>





    According to these speed benchmarks of different libraries built
    with GCC and Clang, they're about evenly matched overall, but in
    some specific cases one can be significantly faster than the other:

    https://www.phoronix.com/review/gcc-16-vs-clang-22



    --- PyGate Linux v1.5.19
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From jayjwa@3:633/10 to All on Saturday, October 31, 2026 10:30:39
    Leroy H <lh@somewhere.net> writes:

    I should have, but I have never seriously researched the differences
    and advantages/disadvantages of the GNU Compiler Collection (GCC)
    versus the LLVM/Clang compiler (only the C compiler interests me).
    Clang whines alot on perfectly good code, but some of the graphics stuff requires it. I think Mesa and also AMD ROCm. They have a special
    LLVM/Clang needed for ROCm:

    /opt/rocm/lib/llvm/bin/clang --version
    AMD clang version 24.0.0git (https://github.com/ROCm/llvm-project.git d6f6cb691863e9258034ab48c1dfce21689d5606)
    Target: x86_64-unknown-linux-gnu
    Thread model: posix
    InstalledDir: /opt/rocm/lib/llvm/bin
    Configuration file: /opt/rocm/lib/llvm/bin/clang.cfg

    If you're not building such things, you probably don't need it. I hear
    the LLVM license is more permissive, though that doesn't affect me.

    Rarely, I've had some things not build with GCC that did build with
    Clang. With today's disk sizes, it's easy to keep both handy. I have a
    very strong development environment here: between Linux and the virtual machines hosts under it (and illumos), you'd have a hard time naming a
    language I don't have access to. SNOBOL? Yeah, got that.

    Basically, which compiler is truly "better?"
    Use case of course. But you knew that already.

    --
    PGP Key ID: 781C A3E2 C6ED 70A6 B356 7AF5 B510 542E D460 5CAE
    "The Internet should always be the Wild West!"

    --- PyGate Linux v1.5.19
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From Leroy H@3:633/10 to All on Saturday, October 31, 2026 15:12:33
    On Sat, 31 Oct 2026 10:30:39 -0400, jayjwa wrote:


    Rarely, I've had some things not build with GCC that did build with
    Clang. With today's disk sizes, it's easy to keep both handy.


    You also need a Rust compiler. More and more packages now require
    it. Librsvg, which I believe is the only SVG rendering library
    available for GNU/Linux, is just one example. No Rust, no SVG.

    Another C/C++ alternative would be the Intel icc compiler, which
    is now part of Intel OneAPI. The icc compiler was once quite superior
    to GCC but supposedly GCC has closed the gap over the years.


    --- PyGate Linux v1.5.19
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From Lawrence D?Oliveiro@3:633/10 to All on Saturday, October 31, 2026 21:06:18
    On Sat, 31 Oct 2026 10:30:39 -0400, jayjwa wrote:

    Clang whines alot on perfectly good code, but some of the graphics
    stuff requires it. I think Mesa and also AMD ROCm.

    Why Clang and not GCC?

    Because those companies are afraid of the GPL, aren?t they?

    --- PyGate Linux v1.5.19
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From Nuno Silva@3:633/10 to All on Sunday, November 01, 2026 00:39:59
    On 2026-10-31, Lawrence D?Oliveiro wrote:

    On Sat, 31 Oct 2026 10:30:39 -0400, jayjwa wrote:

    Clang whines alot on perfectly good code, but some of the graphics
    stuff requires it. I think Mesa and also AMD ROCm.

    Why Clang and not GCC?

    Because those companies are afraid of the GPL, aren?t they?

    Didn't a recent post to this group suggest Apple invested in clang+llvm
    because of absurd "fear" of GPLv3?

    Well, even if that was a driving factor, I welcome there being one more compiler collection. That kind of diversity is useful. Their long build
    times, on the other hand...

    --
    Nuno Silva

    --- PyGate Linux v1.5.19
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From c186282@3:633/10 to All on Sunday, November 01, 2026 03:51:18
    On 10/31/26 17:06, Lawrence D?Oliveiro wrote:
    On Sat, 31 Oct 2026 10:30:39 -0400, jayjwa wrote:

    Clang whines alot on perfectly good code, but some of the graphics
    stuff requires it. I think Mesa and also AMD ROCm.

    Why Clang and not GCC?

    Because those companies are afraid of the GPL, aren?t they?

    IHMO - *both* GCC and Clang/LLVM are Very Good.
    No reason for any prejudice at this time. I tend
    to install 'em all by reflex. Code::Blocks can
    cope with them all. Also install 'TCC' - which
    is suprisingly good and creates more compact
    code more quickly - but don't expect the more
    'esoteric' libraries.

    As for "whining" ... that seems to be a 'feature'
    of the modern compilers. They are SO tuned for
    "potential" issues that they pester you to death.
    Let 'em have their way and half yer code would
    be compiler flags and such turning off the 'whining'.
    Just write solid code and you'll be fine.

    It shouldn't BE this complicated ...... one reason
    I mostly switched to Python .... no whining.
    Python mostly IS 'C' ... all the libs are 'C' ...
    just interpreted steps between lib calls - a tad
    slower but much easier to deal with on many levels.


    --- PyGate Linux v1.5.19
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From Nuno Silva@3:633/10 to All on Sunday, November 01, 2026 09:05:36
    On 2026-11-01, rbowman wrote:

    On Sun, 01 Nov 2026 00:39:59 +0000, Nuno Silva wrote:

    On 2026-10-31, Lawrence D?Oliveiro wrote:

    On Sat, 31 Oct 2026 10:30:39 -0400, jayjwa wrote:

    Clang whines alot on perfectly good code, but some of the graphics
    stuff requires it. I think Mesa and also AMD ROCm.

    Why Clang and not GCC?

    Because those companies are afraid of the GPL, aren?t they?

    Didn't a recent post to this group suggest Apple invested in clang+llvm
    because of absurd "fear" of GPLv3?

    I wouldn't call it fear. Apple initially attempted to use ggc as the front end to llvm. There was little interest in the gcc maintainers to support Objective C so Apple would have had to modify gcc, taking a big bite out
    of the poisoned apple.

    Ha!

    Which is more free, one of the many permissive licenses or GPLv3?

    This would not be about GPL in general, but about the protections that
    were hardened specifically in GPLv3, so your question would be between
    GPLv2 and GPLv3.



    --
    Nuno Silva

    --- PyGate Linux v1.5.19
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From Keith Thompson@3:633/10 to All on Sunday, November 01, 2026 02:16:57
    c186282 <c186282@nnada.net> writes:
    [...]
    Also install 'TCC' - which
    is suprisingly good and creates more compact
    code more quickly - but don't expect the more
    'esoteric' libraries.

    Why would using tcc not give you access to "esoteric" libraries?

    --
    Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com
    void Void(void) { Void(); } /* The recursive call of the void */

    --- PyGate Linux v1.5.19
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From Chris Ahlstrom@3:633/10 to All on Sunday, November 01, 2026 10:07:03
    Leroy H wrote this screed in ALL-CAPS (fixed):

    I should have, but I have never seriously researched the differences
    and advantages/disadvantages of the GNU Compiler Collection (GCC)
    versus the LLVM/Clang compiler (only the C compiler interests me).

    All of my GNU/Linux systems are built using GCC. It has good
    hardware optimization options, Link Time Optimization (LTO), and
    even, if desired, Profile Guided Optimization (PGO).

    But LLVM/Clang has been around for a long while as an alternative
    C compiler. I have never used LLVM/Clang but others will claim
    benefits and advantages.

    To me, LLVM/Clang seems limited compared to GCC, especially in terms
    of SIMD hardware support, but that assessment is based on incomplete knowledge.

    Can anyone offer more insight into this issue?

    Basically, which compiler is truly "better?"

    My recent projects are set up to use either one. Clang seems to be
    the "native" compiler on FreeBSD. GCC and Clang seem to me to be
    comparable and somewhat supporting the same options. Clang seems
    to increment versions more frequently. It finds some issues that
    g++ does not find, and g++ finds some issues that clang++ does
    not. They're roughly comparable in speed if cache is dropped
    between builds.

    As far as hardware support and C go, I have nothing to add.
    So sue me.

    --
    I wasn't kissing her, I was whispering in her mouth.
    -- Chico Marx

    --- PyGate Linux v1.5.19
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From Nuno Silva@3:633/10 to All on Sunday, November 01, 2026 18:31:39
    On 2026-11-01, Chris Ahlstrom wrote:

    Leroy H wrote this screed in ALL-CAPS (fixed):

    I should have, but I have never seriously researched the differences
    and advantages/disadvantages of the GNU Compiler Collection (GCC)
    versus the LLVM/Clang compiler (only the C compiler interests me).

    All of my GNU/Linux systems are built using GCC. It has good
    hardware optimization options, Link Time Optimization (LTO), and
    even, if desired, Profile Guided Optimization (PGO).

    But LLVM/Clang has been around for a long while as an alternative
    C compiler. I have never used LLVM/Clang but others will claim
    benefits and advantages.

    To me, LLVM/Clang seems limited compared to GCC, especially in terms
    of SIMD hardware support, but that assessment is based on incomplete
    knowledge.

    Can anyone offer more insight into this issue?

    Basically, which compiler is truly "better?"

    My recent projects are set up to use either one. Clang seems to be
    the "native" compiler on FreeBSD. GCC and Clang seem to me to be
    comparable and somewhat supporting the same options. Clang seems
    to increment versions more frequently. It finds some issues that
    g++ does not find, and g++ finds some issues that clang++ does
    not. They're roughly comparable in speed if cache is dropped
    between builds.

    When you say "find issues" you mean merely in warning outputs or in
    differences owing to UB, or are you using their static analyzers?

    As far as hardware support and C go, I have nothing to add.
    So sue me.

    --
    Nuno Silva

    --- PyGate Linux v1.5.19
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From c186282@3:633/10 to All on Sunday, November 01, 2026 18:01:24
    On 11/1/26 05:16, Keith Thompson wrote:
    c186282 <c186282@nnada.net> writes:
    [...]
    Also install 'TCC' - which
    is suprisingly good and creates more compact
    code more quickly - but don't expect the more
    'esoteric' libraries.

    Why would using tcc not give you access to "esoteric" libraries?

    They don't come "in the package". You can
    always tweak and add-on later of course.
    Anyway, most tools center on GCC or Clang
    these days. Still use TCC sometimes if I'm
    writing a short utility however.


    --- PyGate Linux v1.5.19
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From Keith Thompson@3:633/10 to All on Sunday, November 01, 2026 20:25:35
    c186282 <c186282@nnada.net> writes:
    On 11/1/26 05:16, Keith Thompson wrote:
    c186282 <c186282@nnada.net> writes:
    [...]
    Also install 'TCC' - which
    is suprisingly good and creates more compact
    code more quickly - but don't expect the more
    'esoteric' libraries.
    Why would using tcc not give you access to "esoteric" libraries?

    They don't come "in the package". You can
    always tweak and add-on later of course.
    Anyway, most tools center on GCC or Clang
    these days. Still use TCC sometimes if I'm
    writing a short utility however.

    (Why do you indent your original text in your posts? I find it
    distracting.)

    They typically don't come "in the package" with gcc either.

    For Windows, gcc is typically installed via a package that includes
    the compiler along with a number of libraries. In that context,
    a tcc-based installer might not include the same libraries as a
    gcc-based instaler.

    For Linux-based and other Unix-like systems, it's more common
    for libraries to be installed separately. For example, on my
    Ubuntu system the "gcc" command is provided by the "gcc" package,
    but the GNU MP bignum library is provided by the libgmp10 and
    libgmp-dev packages. If I have a C program that depends on GNU
    MP, I can build it with gcc, clang, or tcc.

    --
    Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com
    void Void(void) { Void(); } /* The recursive call of the void */

    --- PyGate Linux v1.5.19
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From c186282@3:633/10 to All on Monday, November 02, 2026 01:52:12
    On 11/1/26 23:25, Keith Thompson wrote:
    c186282 <c186282@nnada.net> writes:
    On 11/1/26 05:16, Keith Thompson wrote:
    c186282 <c186282@nnada.net> writes:
    [...]
    Also install 'TCC' - which
    is suprisingly good and creates more compact
    code more quickly - but don't expect the more
    'esoteric' libraries.
    Why would using tcc not give you access to "esoteric" libraries?

    They don't come "in the package". You can
    always tweak and add-on later of course.
    Anyway, most tools center on GCC or Clang
    these days. Still use TCC sometimes if I'm
    writing a short utility however.

    (Why do you indent your original text in your posts? I find it
    distracting.)

    That's "MY STYLE". Live with it. Keeps it more
    plain what others say, what I say. Also like
    'random' capitalization and odd punctuation
    to kind-of emulate 'natural speaking'. You do
    it your way, I'll do it mine, and we'll all
    get there together.

    They typically don't come "in the package" with gcc either.

    For Windows, gcc is typically installed via a package that includes
    the compiler along with a number of libraries. In that context,
    a tcc-based installer might not include the same libraries as a
    gcc-based instaler.

    Correct. As per the 'tiny' bit, it's "cut down".
    Has MOST of what you'll need, good enough for a
    lot of stuff, but if you're doing "cutting edge"
    then go with the bigger compilers and their libs.

    For Linux-based and other Unix-like systems, it's more common
    for libraries to be installed separately. For example, on my
    Ubuntu system the "gcc" command is provided by the "gcc" package,
    but the GNU MP bignum library is provided by the libgmp10 and
    libgmp-dev packages. If I have a C program that depends on GNU
    MP, I can build it with gcc, clang, or tcc.

    Yea, it all gets bigger and deeper deeper deeper ...

    Does it HAVE to be thus ???

    Just one of the reasons I mostly use Python
    these days ... "just works" ... though you
    still have to install libs. A "Python EVERYTHING"
    meta-package would be nice.

    Ah, was complaining about a re-install of a
    dedicated unit/app the other day, kept crashing
    after x-minutes. TWO things - it pings somewhere
    every so often to make sure it's still a good
    connection and ends the pgm if there's no
    response after x tries. The ping address is
    in a config file. First, had the wrong address
    in the config file. Second, it's actually
    FPING and I didn't install it :-)

    Details details ........

    STILL not sure why @reboot didn't work OR a
    perfectly good systemd start-up. Last PiOS
    version I used those DID work.


    --- PyGate Linux v1.5.19
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From Keith Thompson@3:633/10 to All on Sunday, November 01, 2026 23:06:57
    c186282 <c186282@nnada.net> writes:
    On 11/1/26 23:25, Keith Thompson wrote:
    c186282 <c186282@nnada.net> writes:
    On 11/1/26 05:16, Keith Thompson wrote:
    c186282 <c186282@nnada.net> writes:
    [...]
    Also install 'TCC' - which
    is suprisingly good and creates more compact
    code more quickly - but don't expect the more
    'esoteric' libraries.
    Why would using tcc not give you access to "esoteric" libraries?

    They don't come "in the package". You can
    always tweak and add-on later of course.
    Anyway, most tools center on GCC or Clang
    these days. Still use TCC sometimes if I'm
    writing a short utility however.
    (Why do you indent your original text in your posts? I find it
    distracting.)

    That's "MY STYLE". Live with it. Keeps it more
    plain what others say, what I say. Also like
    'random' capitalization and odd punctuation
    to kind-of emulate 'natural speaking'. You do
    it your way, I'll do it mine, and we'll all
    get there together.

    Of course I'll live with it. I might do so by ignoring you.

    You can indicate that you posted something by identifying it
    in the headers. If you think you're important enough to use a
    different layout to tell us it's you, you're mistaken.

    They typically don't come "in the package" with gcc either.
    For Windows, gcc is typically installed via a package that includes
    the compiler along with a number of libraries. In that context,
    a tcc-based installer might not include the same libraries as a
    gcc-based instaler.

    Correct. As per the 'tiny' bit, it's "cut down".
    Has MOST of what you'll need, good enough for a
    lot of stuff, but if you're doing "cutting edge"
    then go with the bigger compilers and their libs.

    You seem to be ignoring the fact that compilers (gcc, clang, tcc)
    are compilers, and do not include most libraries.

    Perhaps you have an example of a library that you can use with gcc
    and clang but can't use with tcc.

    For Linux-based and other Unix-like systems, it's more common
    for libraries to be installed separately. For example, on my
    Ubuntu system the "gcc" command is provided by the "gcc" package,
    but the GNU MP bignum library is provided by the libgmp10 and
    libgmp-dev packages. If I have a C program that depends on GNU
    MP, I can build it with gcc, clang, or tcc.

    Yea, it all gets bigger and deeper deeper deeper ...

    Does it HAVE to be thus ???

    I have no idea what you mean. I've just told you that a library
    can be used with any C compiler I like, and you seem to be saying
    that's too complicated.

    Just one of the reasons I mostly use Python
    these days ... "just works" ... though you
    still have to install libs. A "Python EVERYTHING"
    meta-package would be nice.

    Ah, was complaining about a re-install of a
    dedicated unit/app the other day, kept crashing
    after x-minutes. TWO things - it pings somewhere
    every so often to make sure it's still a good
    connection and ends the pgm if there's no
    response after x tries. The ping address is
    in a config file. First, had the wrong address
    in the config file. Second, it's actually
    FPING and I didn't install it :-)

    Details details ........

    But not enough details (like the name of the app) for anyone to
    help you.

    [...]

    --
    Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com
    void Void(void) { Void(); } /* The recursive call of the void */

    --- PyGate Linux v1.5.19
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From The Natural Philosopher@3:633/10 to All on Monday, November 02, 2026 10:39:17
    On 02/11/2026 07:06, Keith Thompson wrote:
    You can indicate that you posted something by identifying it in the
    headers. If you think you're important enough to use a different
    layout to tell us it's you, you're mistaken.


    Thunderbird has a useful feature - rewrap.

    It can remove a lot of stylistic egotisms

    Sadly not CAPITALISATION...

    --
    "I am inclined to tell the truth and dislike people who lie consistently.
    This makes me unfit for the company of people of a Left persuasion, and
    all women"


    --- PyGate Linux v1.5.19
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From c186282@3:633/10 to All on Monday, November 02, 2026 11:37:33
    On 11/2/26 02:06, Keith Thompson wrote:
    c186282 <c186282@nnada.net> writes:
    On 11/1/26 23:25, Keith Thompson wrote:

    (Why do you indent your original text in your posts? I find it
    distracting.)

    That's "MY STYLE". Live with it. Keeps it more
    plain what others say, what I say. Also like
    'random' capitalization and odd punctuation
    to kind-of emulate 'natural speaking'. You do
    it your way, I'll do it mine, and we'll all
    get there together.

    Of course I'll live with it. I might do so by ignoring you.
    Just think of it as "Python Style" :-)


    --- PyGate Linux v1.5.19
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From Charlie Gibbs@3:633/10 to All on Monday, November 02, 2026 16:54:58
    On 2026-11-02, c186282 <c186282@nnada.net> wrote:

    On 11/2/26 02:06, Keith Thompson wrote:

    c186282 <c186282@nnada.net> writes:

    On 11/1/26 23:25, Keith Thompson wrote:

    (Why do you indent your original text in your posts? I find it
    distracting.)

    That's "MY STYLE". Live with it. Keeps it more
    plain what others say, what I say. Also like
    'random' capitalization and odd punctuation
    to kind-of emulate 'natural speaking'. You do
    it your way, I'll do it mine, and we'll all
    get there together.

    Of course I'll live with it. I might do so by ignoring you.

    Just think of it as "Python Style" :-)

    "I thought we were an autonomous collective."

    --
    /~\ Charlie Gibbs | In this world there are
    \ / <cgibbs@kltpzyxm.invalid> | two kinds of people:
    X I'm really at ac.dekanfrus | 1. Those who can extrapolate
    / \ if you read it the right way. | from incomplete data.

    --- PyGate Linux v1.5.19
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From Chris Ahlstrom@3:633/10 to All on Monday, November 02, 2026 11:54:39
    Nuno Silva wrote this screed in ALL-CAPS (fixed):

    On 2026-11-01, Chris Ahlstrom wrote:

    Leroy H wrote this screed in ALL-CAPS (fixed):

    I should have, but I have never seriously researched the differences
    and advantages/disadvantages of the GNU Compiler Collection (GCC)
    versus the LLVM/Clang compiler (only the C compiler interests me).

    All of my GNU/Linux systems are built using GCC. It has good
    hardware optimization options, Link Time Optimization (LTO), and
    even, if desired, Profile Guided Optimization (PGO).

    But LLVM/Clang has been around for a long while as an alternative
    C compiler. I have never used LLVM/Clang but others will claim
    benefits and advantages.

    To me, LLVM/Clang seems limited compared to GCC, especially in terms
    of SIMD hardware support, but that assessment is based on incomplete
    knowledge.

    Can anyone offer more insight into this issue?

    Basically, which compiler is truly "better?"

    My recent projects are set up to use either one. Clang seems to be
    the "native" compiler on FreeBSD. GCC and Clang seem to me to be
    comparable and somewhat supporting the same options. Clang seems
    to increment versions more frequently. It finds some issues that
    g++ does not find, and g++ finds some issues that clang++ does
    not. They're roughly comparable in speed if cache is dropped
    between builds.

    When you say "find issues" you mean merely in warning outputs or in differences owing to UB, or are you using their static analyzers?

    Just looking at warnings.

    Using "ninja scan-build" just now to see what happens.

    --
    BOFH excuse #62:

    Need to wrap system in aluminum foil to fix problem

    --- PyGate Linux v1.5.19
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From c186282@3:633/10 to All on Monday, November 02, 2026 11:57:31
    On 11/2/26 02:06, Keith Thompson wrote:
    c186282 <c186282@nnada.net> writes:

    Ah, was complaining about a re-install of a
    dedicated unit/app the other day, kept crashing
    after x-minutes. TWO things - it pings somewhere
    every so often to make sure it's still a good
    connection and ends the pgm if there's no
    response after x tries. The ping address is
    in a config file. First, had the wrong address
    in the config file. Second, it's actually
    FPING and I didn't install it :-)

    Details details ........

    But not enough details (like the name of the app) for anyone to
    help you.

    It's my hand-writ app, it could be named "DobbyElf" :-)

    Pi4. Creates a rotating display of security cams and
    weather info. Have a (near) clone in another room
    with better wifi.

    This is a 're-install' problem. You may document
    your code well but may not remember all the supporting
    utilities and more obscure system settings that made
    things work well before.

    Oh well, all fixed. Should work well for another
    couple of years.


    --- PyGate Linux v1.5.19
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From Chris Ahlstrom@3:633/10 to All on Monday, November 02, 2026 14:18:27
    Chris Ahlstrom wrote this screed in ALL-CAPS (fixed):

    Nuno Silva wrote this screed in ALL-CAPS (fixed):

    On 2026-11-01, Chris Ahlstrom wrote:

    <snip>

    When you say "find issues" you mean merely in warning outputs or in
    differences owing to UB, or are you using their static analyzers?

    Just looking at warnings.

    Using "ninja scan-build" just now to see what happens.

    It found a few issues in a couple of my projects, a few issues
    important. There is one that I don't get

    subprojects/libcfg66/src/util/filefunctions.cpp:1138:33:
    warning: Memory allocated by 'new[]' should be deallocated by 'delete[]',
    not 'getline()' [unix.MismatchedDeallocator]

    1138 | ssize_t count { getline(&destination, &maxim, input) };
    | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    I guess I need to use malloc() instead.

    --
    Mummy dust to make me old;
    To shroud my clothes, the black of night;
    To age my voice, an old hag's cackle;
    To whiten my hair, a scream of fright;
    A blast of wind to fan my hate;
    A thunderbolt to mix it well --
    Now begin thy magic spell!
    -- Walter Disney, "Snow White"

    --- PyGate Linux v1.5.19
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From Carlos E. R.@3:633/10 to All on Monday, November 02, 2026 23:16:48
    On 2026-11-02 07:52, c186282 wrote:
    On 11/1/26 23:25, Keith Thompson wrote:


    (Why do you indent your original text in your posts?ÿ I find it
    distracting.)

    That's "MY STYLE". Live with it. Keeps it more plain what others
    say, what I say. Also like 'random' capitalization and odd
    punctuation to kind-of emulate 'natural speaking'. You do it your
    way, I'll do it mine, and we'll all get there together.

    Done. :-)




    --
    Cheers,
    Carlos E.R.
    ES??, EU??.

    --- PyGate Linux v1.5.19
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From Leroy H@3:633/10 to All on Monday, November 02, 2026 23:01:45
    On Sun, 01 Nov 2026 20:25:35 -0800, Keith Thompson wrote:


    (Why do you indent your original text in your posts? I find it
    distracting.)


    Ha, ha, ha, ha, ha, ha! What a fucking fuddy-duddy!

    If this were an actual public, and not virtual, meeting
    place, people would be putting itching powder on your
    stuffy skin.

    <https://en.wikipedia.org/wiki/Itching_powder>

    You are an unbelievable, tasteless throwback.

    Ha, ha, ha, ha, ha, ha, ha, ha!


    --- PyGate Linux v1.5.19
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From c186282@3:633/10 to All on Monday, November 02, 2026 20:47:23
    On 11/2/26 17:16, Carlos E. R. wrote:
    On 2026-11-02 07:52, c186282 wrote:
    On 11/1/26 23:25, Keith Thompson wrote:


    (Why do you indent your original text in your posts?ÿ I find it
    distracting.)

    That's "MY STYLE". Live with it. Keeps it more plain what others
    say, what I say. Also like 'random' capitalization and odd
    punctuation to kind-of emulate 'natural speaking'. You do it your
    way, I'll do it mine, and we'll all get there together.

    Done. :-)

    Sounds good - I'm not out to troll/trash, just
    add my little bits to the overall equation.
    Know I'm not "superior", just have MY odd base
    of experience. Put everybody's "odd bases"
    together and ........

    Just think of it as "PYTHON Style" ... indents ! :-)


    --- PyGate Linux v1.5.19
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From c186282@3:633/10 to All on Monday, November 02, 2026 21:03:28
    On 11/2/26 18:01, Leroy H wrote:
    On Sun, 01 Nov 2026 20:25:35 -0800, Keith Thompson wrote:


    (Why do you indent your original text in your posts? I find it
    distracting.)


    Ha, ha, ha, ha, ha, ha! What a fucking fuddy-duddy!

    If this were an actual public, and not virtual, meeting
    place, people would be putting itching powder on your
    stuffy skin.

    <https://en.wikipedia.org/wiki/Itching_powder>

    You are an unbelievable, tasteless throwback.

    Ha, ha, ha, ha, ha, ha, ha, ha!

    Aww ... give him a break. The style - though old -
    is a bit odd. I think of it now as "Python Style",
    indents. DOES help make you/me stuff more obvious
    to the eye however.

    As said, we ALL have our quirks AND encyclopedia
    of experiences. Some ARE generally 'better' than
    others - but only a few of those are Superior
    Assholes dedicated to pissing on everyone else.

    If we all add our base of experiences - often
    stretching back 40-50 years - together more
    than one good fix for any particular issue
    can be found. SEEMS like the purpose of
    these groups.


    --- PyGate Linux v1.5.19
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From Leroy H@3:633/10 to All on Tuesday, November 03, 2026 02:44:47
    On Mon, 2 Nov 2026 21:03:28 -0500, c186282 wrote:

    On 11/2/26 18:01, Leroy H wrote:
    On Sun, 01 Nov 2026 20:25:35 -0800, Keith Thompson wrote:


    (Why do you indent your original text in your posts? I find it
    distracting.)


    You are an unbelievable, tasteless throwback.


    Aww ... give him a break.


    No, no no, no. no, no.

    Anyone who actually is more impressed with meaningless formatting
    rather than message content is an inexcusable and infinite jerk.

    This jerk deserves to be forever ridiculed and ostracized for his
    idiotic attitude.

    His momma obviously made him tuck his bed sheets upon rising in
    the morning.

    The term "dickhead" was invented specifically for his pedantic type.



    --- PyGate Linux v1.5.19
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From Chris Ahlstrom@3:633/10 to All on Tuesday, November 03, 2026 08:22:42
    rbowman wrote this screed in ALL-CAPS (fixed):

    On Mon, 2 Nov 2026 14:18:27 -0500, Chris Ahlstrom wrote:

    It found a few issues in a couple of my projects, a few issues
    important.
    There is one that I don't get

    subprojects/libcfg66/src/util/filefunctions.cpp:1138:33: warning:
    Memory allocated by 'new[]' should be deallocated by 'delete[]',
    not 'getline()' [unix.MismatchedDeallocator]

    1138 | ssize_t count { getline(&destination, &maxim, input) };
    | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    I guess I need to use malloc() instead.

    Did you allocate destination with new? getline will malloc a buffer if you pass in NULL.

    Yes, and I know that from the man page.

    The point is scan-build complaining about something getline() will
    not do in the given use case.

    A limitation of static analysis, perhaps.

    --
    <Stealth> How do I bind a computer to an NIS server?
    <Joey> Use a rope?
    -- Seen on #Debian

    --- PyGate Linux v1.5.19
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From Richard Kettlewell@3:633/10 to All on Tuesday, November 03, 2026 18:44:18
    Chris Ahlstrom <OFeem1987@teleworm.us> writes:
    rbowman wrote this screed in ALL-CAPS (fixed):
    On Mon, 2 Nov 2026 14:18:27 -0500, Chris Ahlstrom wrote:
    It found a few issues in a couple of my projects, a few issues
    important.
    There is one that I don't get

    subprojects/libcfg66/src/util/filefunctions.cpp:1138:33: warning:
    Memory allocated by 'new[]' should be deallocated by 'delete[]',
    not 'getline()' [unix.MismatchedDeallocator]

    1138 | ssize_t count { getline(&destination, &maxim, input) };
    | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    I guess I need to use malloc() instead.

    Did you allocate destination with new? getline will malloc a buffer
    if you pass in NULL.

    Yes, and I know that from the man page.

    The point is scan-build complaining about something getline() will
    not do in the given use case.

    A limitation of static analysis, perhaps.

    There?s not enough context to give a completely definitive answer, but:

    1) Heap memory can be managed with new/delete, or with
    malloc/realloc/free, but not both. The consequences of playing
    mix-and-match vary between platform, so you might get away with it in
    some cases, by luck, but static analysis tools will consider it a
    bug, if they?re smart enough to notice.

    2) In getline(), if *lineptr!=NULL then it will call realloc() on it if
    the line from stream needs more than *n bytes (using argument names
    from [1]). So passing a pointer allocated with new to it is a bug,
    for the reasons given in (1) above.

    3) The diagnostic referring to deallocation reather than realloc is
    probably a (trivial) bug in the tool - for example it may model
    realloc as malloc+free, which isn?t unreasonable as such, but leads
    to an opaque diagnostic.

    The only case where it would not be a bug is if the line read by
    getline() can never possibly exceed the initial allocation. Whether this
    is true in your use case I don?t know, but your static analysis tool
    either couldn?t prove that it was or more likely, isn?t equipped to do
    so.

    [1] https://man7.org/linux/man-pages/man3/getline.3.html

    --
    https://www.greenend.org.uk/rjk/

    --- PyGate Linux v1.5.19
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From Rich@3:633/10 to All on Wednesday, November 04, 2026 03:58:57
    Keith Thompson <Keith.S.Thompson+u@gmail.com> wrote:
    c186282 <c186282@nnada.net> writes:
    Correct. As per the 'tiny' bit, it's "cut down". Has MOST of what
    you'll need, good enough for a lot of stuff, but if you're doing
    "cutting edge" then go with the bigger compilers and their libs.

    You seem to be ignoring the fact that compilers (gcc, clang, tcc) are compilers, and do not include most libraries.

    SOL (Speed of Light) nym is our local human hallucinator. It
    hallucinates more wrong stuff than all the best LLM's put together,
    except unlike the AI's it "sticks to it's hallucinations" when called
    out.

    Perhaps you have an example of a library that you can use with gcc
    and clang but can't use with tcc.

    It will not be able to do so, because whatever point it is trying to make is very likely a
    hallucination.


    --- PyGate Linux v1.5.19
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From Chris Ahlstrom@3:633/10 to All on Wednesday, November 04, 2026 06:39:16
    Richard Kettlewell wrote this screed in ALL-CAPS (fixed):

    Chris Ahlstrom <OFeem1987@teleworm.us> writes:
    rbowman wrote this screed in ALL-CAPS (fixed):
    On Mon, 2 Nov 2026 14:18:27 -0500, Chris Ahlstrom wrote:
    It found a few issues in a couple of my projects, a few issues
    important.
    There is one that I don't get

    subprojects/libcfg66/src/util/filefunctions.cpp:1138:33: warning:
    Memory allocated by 'new[]' should be deallocated by 'delete[]',
    not 'getline()' [unix.MismatchedDeallocator]

    1138 | ssize_t count { getline(&destination, &maxim, input) };
    | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    I guess I need to use malloc() instead.

    Did you allocate destination with new? getline will malloc a buffer
    if you pass in NULL.

    Yes, and I know that from the man page.

    The point is scan-build complaining about something getline() will
    not do in the given use case.

    A limitation of static analysis, perhaps.

    There?s not enough context to give a completely definitive answer, but:

    1) Heap memory can be managed with new/delete, or with
    malloc/realloc/free, but not both. The consequences of playing
    mix-and-match vary between platform, so you might get away with it in
    some cases, by luck, but static analysis tools will consider it a
    bug, if they?re smart enough to notice.

    The tool is clang's scan-build. Fortunately, meson automatically
    sets a build to use it if it is installed. Otherwise I'd be too
    damned lazy to use it :-D

    2) In getline(), if *lineptr!=NULL then it will call realloc() on it if
    the line from stream needs more than *n bytes (using argument names
    from [1]). So passing a pointer allocated with new to it is a bug,
    for the reasons given in (1) above.

    3) The diagnostic referring to deallocation reather than realloc is
    probably a (trivial) bug in the tool - for example it may model
    realloc as malloc+free, which isn?t unreasonable as such, but leads
    to an opaque diagnostic.

    The only case where it would not be a bug is if the line read by
    getline() can never possibly exceed the initial allocation. Whether this
    is true in your use case I don?t know, but your static analysis tool
    either couldn?t prove that it was or more likely, isn?t equipped to do
    so.

    [1] https://man7.org/linux/man-pages/man3/getline.3.html

    I bit the bullet and went to malloc()/free().

    Now I got a couple of "Method called on moved-from object"
    warnings to fix. (A needless test of movement in a test app.)

    --
    I will not play at tug o' war. I'd rather play at hug o' war,
    Where everyone hugs Instead of tugs,
    Where everyone giggles And rolls on the rug,
    Where everyone kisses, And everyone grins,
    And everyone cuddles, And everyone wins.
    -- Shel Silverstein, "Hug o' War"

    --- PyGate Linux v1.5.19
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From The Natural Philosopher@3:633/10 to All on Wednesday, November 04, 2026 11:53:01
    On 04/11/2026 11:39, Chris Ahlstrom wrote:
    I will not play at tug o' war. I'd rather play at hug o' war,
    Where everyone hugs Instead of tugs,
    Where everyone giggles And rolls on the rug,
    Where everyone kisses, And everyone grins,
    And everyone cuddles, And everyone wins.
    -- Shel Silverstein, "Hug o' War"

    Penicillin Penny, she's the queen of the Sunset Strip
    If she ever gives you any then you better see your doctor real quick,
    gettin' bizarre
    From the back seat of Cadillac cars, to the floor of men's room bars
    She's Penicillin Penny and her future's written in the stars

    She's Penicillin Penny and ever since the day she came, came
    They say she's had so many, she gives 'em all numbers not names, bitch
    I always call her Hun' (honey), but she calls me one thousand and one
    And Penicillin Penny starts to boogie when the day is done

    Bring on the claps

    She's Penicillin Penny and if you ever see her passin' through
    Better run into your house before she stops and lays a little on you
    If you ever let her in your door, it takes 20 million units
    Or more to cure the love that Penicillin Penny's gonna lay on you

    -- Shel Silverstein, "Penicillin Penny"
    --
    Civilization exists by geological consent, subject to change without notice.
    ? Will Durant


    --- PyGate Linux v1.5.19
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)