gcc warnings not parsed correctly

This issue is archived. You can view it, but you can't modify it. Learn more

XMLWordPrintable

      We're seeing frequent reports from the warnings plugin about "gcc error" which
      are definitely not errors, but rather warnings that originate from use of
      templates ands cause many lines of output.
      Here's one example of such warning(s):

      warnings.cc: In function 'void print(T) [with T = Test]':
      warnings.cc:9: instantiated from 'void out(T) [with T = Test]'
      warnings.cc:14: instantiated from here
      warnings.cc:6: warning: passing 'Test' chooses 'int' over 'long unsigned int'
      warnings.cc:6: warning: in call to 'std::basic_ostream<_CharT, _Traits>&
      std::basic_ostream<_CharT, _Traits>::operator<<(int) [with _CharT = char,
      _Traits = std::char_traits<char>]'
      warnings.cc:6: warning: passing 'Test' chooses 'int' over 'long int'
      warnings.cc:6: warning: in call to 'std::basic_ostream<_CharT, _Traits>&
      std::basic_ostream<_CharT, _Traits>::operator<<(int) [with _CharT = char,
      _Traits = std::char_traits<char>]'
      warnings.cc:6: warning: passing 'Test' chooses 'int' over 'unsigned int'
      warnings.cc:6: warning: in call to 'std::basic_ostream<_CharT, _Traits>&
      std::basic_ostream<_CharT, _Traits>::operator<<(int) [with _CharT = char,
      _Traits = std::char_traits<char>]'

      From this I'm told there is 1 gcc error (in line 9) and 4 warnings in line 6 (3x
      "Passing 'Test'" and 1 "in call to").
      Theoretically, it might be just one warning, but 3 warnings would be ok - the 3
      "passing 'Test'" warnings, preferably annotated/joined with the other lines to
      make things clearer. And the error is not an error, it's just information.
      It's loosely related to issue 4260 (which seems to eat the "instantiated from
      here" message) and issue 4712 (about "note:" in output).

      To reproduce: I'll attach warnings.cc. Compile with "g++ -Wsign-promo".

            Assignee:
            fchateau
            Reporter:
            torbent
            Archiver:
            Jenkins Service Account

              Created:
              Updated:
              Resolved:
              Archived: