[Bug c++/41884] New: diagnostics: error vs. context

bkoz at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Fri Oct 30 23:48:00 GMT 2009


This is a tracker bug for a conversation held last week between Paolo, Jason,
and myself during the ISO C++ meeting in Santa Cruz. 

Is there a way to better disambiguate the error from the error context? One
thing discussed that seemed like it had potential was to

error:

first and then provide

instantiating context:

next, instead of the status quo approach. So,

In file included from
/mnt/share/src/gcc/libstdc++-v3/testsuite/30_threads/packaged_task/members/reset.cc:27:0:

/mnt/share/bld/gcc/x86_64-unknown-linux-gnu/libstdc++-v3/include/future: In
member function 'typename std::unique_future<_Res>::_Mover::__rval_type
std::unique_future<_Res>::get() [with _Res = int, typename
std::unique_future<_Res>::_Mover::__rval_type = int]':

/mnt/share/src/gcc/libstdc++-v3/testsuite/30_threads/packaged_task/members/reset.cc:50:12:
  instantiated from here

/mnt/share/bld/gcc/x86_64-unknown-linux-gnu/libstdc++-v3/include/future:451:64:
error: no matching function for call to 'std::__future_base::_Move_result<int,
true>::_S_move(std::__future_base::_Result<int>&)'

/mnt/share/bld/gcc/x86_64-unknown-linux-gnu/libstdc++-v3/include/future:126:14:
note: candidates are: static _Res std::__future_base::_Move_result<_Res,
true>::_S_move(_Res) [with _Res = int]

compiler exited with status 1

Might look like
<b>error</b>: no matching function for call to
'std::__future_base::_Move_result<int,
true>::_S_move(std::__future_base::_Result<int>&)'

 note: candidates are: static _Res std::__future_base::_Move_result<_Res,
true>::_S_move(_Res) [with _Res = int]
/mnt/share/bld/gcc/x86_64-unknown-linux-gnu/libstdc++-v3/include/future:126:14:
In file included from /mnt/share/src/gcc/libstdc++-v3/testsuite/30_threads
 note: instantiated from here
/mnt/share/src/gcc/libstdc++-v3/testsuite/30_threads/packaged_task/members/reset.cc:50:12: 
/packaged_task/members/reset.cc:27:0:
/mnt/share/bld/gcc/x86_64-unknown-linux-gnu/libstdc++-v3/include/future: In
member function 'typename std::unique_future<_Res>::_Mover::__rval_type
std::unique_future<_Res>::get() [with _Res = int, typename
std::unique_future<_Res>::_Mover::__rval_type = int]':


-- 
           Summary: diagnostics: error vs. context
           Product: gcc
           Version: 4.5.0
            Status: UNCONFIRMED
          Keywords: diagnostic
          Severity: enhancement
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: bkoz at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41884



More information about the Gcc-bugs mailing list