Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-95993

GCC 14.2.0 compilation failure due to -Winterference-size

    • Type: Icon: Task Task
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Server Programmability

      Compilation fails against GCC 14.2.0 due to the enforcement of the -Winterference-size warning. This warning flags any use of the std::hardware_constructive_interference_size and std::hardware_destructive_interference_size values when neither the -mcpu nor the -mtune compilation options are specified.

      The crux of this warning is that these values are highly platform-dependent, even down to the specific line of CPU, and so their use can be dangerous when involved in the definition of public ABIs. We should either gather confidence that we won't ever accidentally use these values when defining public ABIs and fully disable the warning, or define variables that copy these values under a #pragma that temporarily disables the warning and use those variables where public ABIs are not involved (which appears to cover all of our current use cases).

            Assignee:
            Unassigned Unassigned
            Reporter:
            james.bronsted@mongodb.com James Bronsted
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: