Uploaded image for project: 'IMPALA'
  1. IMPALA
  2. IMPALA-9761

Fix GCC 7 compilation issue: Ambiguous else warning with gtest macros

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • Impala 4.0.0
    • Impala 4.0.0
    • Backend
    • None

    Description

      Google test uses a macro to avoid a GCC warning about dangling else conditions. It suppresses a warning for code like:

      if (foo) DCHECK(condition);

      https://github.com/google/googletest/issues/1119

      GCC 7 added new warnings and this macro no longer works. The solution is to either disable the new warning or use braces. Since using braces is easy, we should fix this by adding appropriate braces.

      Attachments

        Activity

          People

            joemcdonnell Joe McDonnell
            joemcdonnell Joe McDonnell
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: