Skip to content

Broken Interconnect on Clang-CL 16.0.5 #178

@deathkiller

Description

@deathkiller

Hi!
I'm using Interconnect classes and it works good in MSVC, but it seems there is some problem in Clang-CL (16.0.5, in VS 2022 17.7.4). If I build project in Release with optimizations turned on (any of /O2, /O1, /Ox), some signals (using member functions) don't connect correctly (so no events are triggered on them). I was able to fix it by adding __attribute__((optnone)) to this line: https://github.com/mosra/corrade/blob/master/src/Corrade/Interconnect/Connection.h#L59, so it seems the compiler probably somehow breaks the SignalData constructor during optimizations. After the fix, it seems all signals work good, but I don't know why this happens and I couldn't find anything about it in the documentation. Do you have any idea? Also, I don't know which compilers are affected, I tested it only on MSVC and Clang-CL.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    Status

    TODO

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions