home.social

#gcc14 — Public Fediverse posts

Live and recent posts from across the Fediverse tagged #gcc14, aggregated by home.social.

  1. @strudlzrout That is an impressive list of changes. Thanks for the summary and for your contribution. 🙏🏽

    Just a minor correction for the code snippet for "CTAD from inherited constructors". I believe the end-of-line comment on the last line should say C<int*> instead of C<int>:

    `//OK, deduces C<int*> `

    For my own benefit, I made an example with two separate derived classes: one for T, another for T*. It helps me fully appreciate the feature's power.

    sigcpp.godbolt.org/z/59ee8vhEM

    #cpp #gcc #gcc14

  2. #GCC14 promoted some warnings to errors. This can break #autoconf, #CMake, #Meson or other build environments autoprobing for features, resulting in code built with missing or altered functionality. This could even lead to security impact, if some security related feature is unexpectedly not enabled.

    Passing CC as "gcc -fpermissive" should fix this. If this is not an option there's even the nuclear option of adding a gcc wrapper script that does:

    #!/bin/sh
    exec /usr/bin/gcc -fpermissive "$@"

    EDIT: I do not mean to say that these new options should blanket-disabled globally. There however are currently some packages that have problems with GCC 14 (missing features or existing functions not being used, or just failing to build). Naturally these packages should be fixed themselves. Meanwhile -fpermissive will allow building most of these troublesome packages.

  3. Ported #gcc14 for #MorphOS. The #rust frontend #gccrs works and produces working code, too. The usability of this thing is currently somewhat limited of course as gccrs is still experimental.

  4. GCC 14.1 fixes most of the issues with constrained type parameters in template template parameters (at least) in an aliased template. ☝🏽

    So, for me, upgrading to GCC 14.1 is absolutely worth it.

    Here is the revised code and link if you wish to compare and experiment:

    sigcpp.godbolt.org/z/6sonMEE8P

    #cpp #GCC #GCC14

  5. David Malcolm has massively increased the scope for which the #GCC14 static code analyzer can find bugs.
    My personal highlight include:
    - possible infinite loop detection (yet still not solving the halting problem smh)
    - visual appealing buffer overflows including proper display of UTF-8 unicode characters in strings.
    - __attribute for Functions, which require a null terminated string to communicate that
    - Checks for input sanitation, that could lead to exploits.
    developers.redhat.com/articles