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

Turn on -Wunused-exception-parameter for clang builds

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Major - P3 Major - P3
    • 4.3.3
    • None
    • Build
    • None
    • Fully Compatible
    • Dev Platform 2019-12-16

    Description

      Currently our windows builds will fail with an error "C2220" if an exception parameter is unused (e.g. try {} catch (const DBException&e)

      { log() << "whatever"; throw;}

      ). However non-Windows builds do not fail, resulting in the failure first being noticed on evergreen or worse, after push. Clang has an option -Wunused-exception-parameter; if this was turned on, developers using clang would catch it earlier.

      Unfortuately it appears GCC does not have an equivalent.

      https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90353

      Attachments

        Activity

          People

            andrew.morrow@mongodb.com Andrew Morrow (Inactive)
            matthew.russotto@mongodb.com Matthew Russotto
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: