public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/17011] New: [3.4/3.5 regression] invalid default parameter diagnosed too late
@ 2004-08-12 19:39 reichelt at gcc dot gnu dot org
  2004-08-12 19:40 ` [Bug c++/17011] " reichelt at gcc dot gnu dot org
                   ` (12 more replies)
  0 siblings, 13 replies; 14+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2004-08-12 19:39 UTC (permalink / raw)
  To: gcc-bugs

On 3.4 branch and mainline the invalid default parameter is only
diagnosed at instantiation time and not at definition time:

======================================
template<typename> struct A {};

template<typename T> struct B
{
    A<T> a;

    void foo(A<T>* = &a);

    void bar() { foo(); }
};

// template struct B<int>;
======================================

On the 3.3 branch we get the error message already at defintion time:

bug.cc:7: error: invalid use of member `B<T>::a'

-- 
           Summary: [3.4/3.5 regression] invalid default parameter diagnosed
                    too late
           Product: gcc
           Version: 3.5.0
            Status: UNCONFIRMED
          Keywords: accepts-invalid, diagnostic
          Severity: enhancement
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: reichelt at gcc dot gnu dot org
                CC: gcc-bugs at gcc dot gnu dot org,mark at codesourcery dot
                    com
 BugsThisDependsOn: 16929


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


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

end of thread, other threads:[~2004-12-04  7:06 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-08-12 19:39 [Bug c++/17011] New: [3.4/3.5 regression] invalid default parameter diagnosed too late reichelt at gcc dot gnu dot org
2004-08-12 19:40 ` [Bug c++/17011] " reichelt at gcc dot gnu dot org
2004-08-12 21:12 ` bangerth at dealii dot org
2004-08-12 22:21 ` mark at codesourcery dot com
2004-08-12 22:55 ` giovannibajo at libero dot it
2004-08-12 23:59 ` bangerth at dealii dot org
2004-10-07 16:23 ` [Bug c++/17011] [3.4/4.0 " pinskia at gcc dot gnu dot org
2004-10-12 12:48 ` pinskia at gcc dot gnu dot org
2004-11-01  0:45 ` mmitchel at gcc dot gnu dot org
2004-11-28  6:04 ` lerdsuwa at gcc dot gnu dot org
2004-12-03 10:24 ` lerdsuwa at gcc dot gnu dot org
2004-12-04  6:45 ` cvs-commit at gcc dot gnu dot org
2004-12-04  6:55 ` cvs-commit at gcc dot gnu dot org
2004-12-04  7:06 ` lerdsuwa 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).