Bobinas P4G
  • Login
  • Public

    • Public
    • Groups
    • Popular
    • People

Conversation

Notices

  1. Bernie (codewiz@mstdn.io)'s status on Sunday, 05-Feb-2023 23:42:40 UTC Bernie Bernie

    C++ compiler puzzle: can you guess why GCC 10.3 generates slightly worse code when switching from -std=c++17 to -std=c++20?

    https://godbolt.org/z/99z7jxM1c
    #cpp #programming #cpp20 #assembly #gcc #compilers

    In conversation Sunday, 05-Feb-2023 23:42:40 UTC from mstdn.io permalink
    • Bernie (codewiz@mstdn.io)'s status on Sunday, 05-Feb-2023 23:53:07 UTC Bernie Bernie
      in reply to

      This is a reduced testcase from a large codebase for 32-bit ARM microcontrollers.

      Yesterday I noticed that GCC 12 generates the exact same code in C++17 and C++20 mode.

      This morning, a GCC developer guessed the issue and pointed me at the fix that was merged two years ago.

      I can't update my toolchain right now, but knowing what triggers the bug made it easy to come up with a workaround for GCC 10.

      #programming #cpp #embedded #gcc

      In conversation Sunday, 05-Feb-2023 23:53:07 UTC permalink

Feeds

  • Activity Streams
  • RSS 2.0
  • Atom
  • Help
  • About
  • FAQ
  • Privacy
  • Source
  • Version
  • Contact

Bobinas P4G is a social network. It runs on GNU social, version 2.0.1-beta0, available under the GNU Affero General Public License.

Creative Commons Attribution 3.0 All Bobinas P4G content and data are available under the Creative Commons Attribution 3.0 license.