public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/17413] New: diagnostic regression for local classes as template argument
@ 2004-09-11  4:33 gdr at gcc dot gnu dot org
  2004-09-12 22:54 ` [Bug c++/17413] [3.4/4.0 regression] " bangerth at dealii dot org
                   ` (21 more replies)
  0 siblings, 22 replies; 23+ messages in thread
From: gdr at gcc dot gnu dot org @ 2004-09-11  4:33 UTC (permalink / raw)
  To: gcc-bugs

Consider the following code

#include <algorithm>

int main()
{
   int a[10] = {0} ;

   struct T {
      void operator()(int) const { }
   };

   std::for_each(a, a + 10, T());
}

GCC-3.3.x used to say:

t.C: In function `int main()':
t.C:11: error: type `main()::T' composed from a local class is not a valid
   template-argument
t.C:11: error:   trying to instantiate `template<class _InputIter, class
   _Function> _Function std::for_each(_InputIter, _InputIter, _Function)'
t.C:11: error: no matching function for call to `for_each(int[10], int*,
   main()::T)'


Now, GCC-3.4.x says:

t.C: In function `int main()':
t.C:11: error: no matching function for call to `for_each(int[10], int*, main()\
::T)'


Notice that the most informative part of the diagnostic had been dropped,
leaving only the most cryptic, uninformative one.

-- 
           Summary: diagnostic regression for local classes as template
                    argument
           Product: gcc
           Version: 3.4.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: gdr at gcc dot gnu dot org
                CC: gcc-bugs at gcc dot gnu dot org
  GCC host triplet: plateform independent


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


^ permalink raw reply	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2005-07-28 10:25 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-09-11  4:33 [Bug c++/17413] New: diagnostic regression for local classes as template argument gdr at gcc dot gnu dot org
2004-09-12 22:54 ` [Bug c++/17413] [3.4/4.0 regression] " bangerth at dealii dot org
2004-09-12 23:15 ` gdr at integrable-solutions dot net
2004-09-12 23:31 ` bangerth at dealii dot org
2004-09-12 23:51 ` gdr at integrable-solutions dot net
2004-09-14  0:47 ` mmitchel at gcc dot gnu dot org
2004-10-12  6:46 ` mmitchel at gcc dot gnu dot org
2004-10-12  9:55 ` gdr at cs dot tamu dot edu
2004-10-12 16:13 ` mmitchel at gcc dot gnu dot org
2004-10-12 18:51 ` gdr at cs dot tamu dot edu
2004-12-12 21:54 ` pinskia at gcc dot gnu dot org
2004-12-22  3:35 ` cvs-commit at gcc dot gnu dot org
2004-12-23 18:25 ` mmitchel at gcc dot gnu dot org
2004-12-23 19:50 ` mmitchel at gcc dot gnu dot org
2004-12-23 19:54 ` cvs-commit at gcc dot gnu dot org
2004-12-23 20:01 ` [Bug c++/17413] [3.4 " mmitchel at gcc dot gnu dot org
2004-12-23 20:31 ` gdr at integrable-solutions dot net
2005-01-13  0:39 ` pinskia at gcc dot gnu dot org
2005-05-19 17:27 ` mmitchel at gcc dot gnu dot org
2005-05-29 17:58 ` mark at codesourcery dot com
2005-06-17 22:14 ` cvs-commit at gcc dot gnu dot org
2005-07-28 10:25 ` giovannibajo at libero dot it
2005-07-28 10:26 ` cvs-commit at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).