Tool/software: TI C/C++ Compiler
Given the code example:
#include <utility> int main() { auto retPair = std::make_pair(-1, false); return retPair.first; }
compiled as follows:
$CGT_PATH/bin/cl6x -I$CGT_PATH/include example.cpp --issue_remarks -pdv -pden)
The compiler produces the following output:
"example.cpp", line 5: remark #342-D: value copied to temporary, reference to temporary used auto retPair = std::make_pair(-1, false); ^ "example.cpp", line 5: remark #342-D: value copied to temporary, reference to temporary used auto retPair = std::make_pair(-1, false); ^
Since this is the typical use-case of std::make_pair (and std::make_pair's signature is changed to accept rvalue references in C++14 which are created specifically to allow references to temporaries), I would not expect such a diagnostic.
Due to this bug, I have to suppress the 342 diagnostic. This is undesirable, since a correct 342 diagnostic would (in general) indicate a pretty serious and hard to debug problem.