Uploaded image for project: 'Embedded Software & Tools'
  1. Embedded Software & Tools
  2. EXT_EP-9743

Compiler incorrectly issues remark: value copied to temporary, reference to temporary used

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Low Low

      The attached test case contains this line ...

        auto retPair = std::make_pair(-1, false);
      

      Build it with remarks enabled ...

      % cl6x --issue_remarks --verbose_diagnostics --display_error_number try1.cpp
      "try1.cpp", line 5: remark #342-D: value copied to temporary, reference to
                temporary used
          auto retPair = std::make_pair(-1, false);
                                        ^
      
      "try1.cpp", line 5: remark #342-D: value copied to temporary, reference to
                temporary used
          auto retPair = std::make_pair(-1, false);
                                            ^
      

      These remarks should not be issued.

            syncuser TI User
            syncuser TI User
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: