Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-24963

GCC parser: Do not restrict navigatability of compiler messages

    XMLWordPrintable

Details

    Description

      Consider the following g++-4.4 output when compiling the attached main.cpp:

      {{../reproducer/main.cpp: In function 'int main()':
      ../reproducer/main.cpp:4: error: 'Foo::Foo()' is private
      ../reproducer/main.cpp:9: error: within this context}}

      Expected behavior:
      Qt Creator allows me to go to both the context (line 9) and the source (line 4) of the error.

      Actual behavior:
      Qt Creator always sends me to line four (see screenshot).

      Rationale:
      The compiler points out an inconsistency here where the error may either be in the usage context or in the class definition. In order to fix the issue, one likes to jump to both the usage context or the definition.

      Possible commit that introduced the regression:
      https://code.qt.io/cgit/qt-creator/qt-creator.git/commit/?id=d9dd1f8d527b47fba0cc683f9ea34055e2a7283d

      Workaround:
      Press "o" when the issue is highlighted to go to compile output which marks the respective lines (with off-by-one errors, see screenshots). Then click the compiler error containing the desired line.

      Attachments

        1. main.cpp
          0.1 kB
        2. off-by-one-error-GCC10.png
          off-by-one-error-GCC10.png
          169 kB
        3. off-by-one-error-GCC4.4.png
          off-by-one-error-GCC4.4.png
          174 kB
        4. screenshot.png
          screenshot.png
          120 kB
        5. screenshot-GCC4.4.png
          screenshot-GCC4.4.png
          116 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            Unassigned Unassigned
            shentey2 Bernhard Beschow
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes