public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/17971] New: [3.4/4.0 regression] Invalid default parameter not diagnosed.
@ 2004-10-13  9:38 reichelt at gcc dot gnu dot org
  2004-10-13 12:22 ` [Bug c++/17971] " pinskia at gcc dot gnu dot org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2004-10-13  9:38 UTC (permalink / raw)
  To: gcc-bugs

Since PR 16929 got a little confusing, I'm opening a new PR for the
following problem:

Since gcc 3.4.0 we accept the following invalid code snippet. The invalid
default parameter "a" is not even diagnosed at instantiation time.
(This is different from PT 17011 - also a spin-off from PR16929 -
which is just a QoI issue.)

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

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

    void foo(A<T> = a);
};

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

With 3.3.5 and before we got a decent error message:
bug.cc:7: error: invalid use of member `B<T>::a'

-- 
           Summary: [3.4/4.0 regression] Invalid default parameter not
                    diagnosed.
           Product: gcc
           Version: 3.4.3
            Status: UNCONFIRMED
          Keywords: accepts-invalid
          Severity: normal
          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


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


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

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

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-10-13  9:38 [Bug c++/17971] New: [3.4/4.0 regression] Invalid default parameter not diagnosed reichelt at gcc dot gnu dot org
2004-10-13 12:22 ` [Bug c++/17971] " pinskia at gcc dot gnu dot org
2004-10-13 12:50 ` bangerth at dealii dot org
2004-11-01  0:46 ` mmitchel at gcc dot gnu dot org
2004-11-28  6:03 ` lerdsuwa at gcc dot gnu dot org
2004-12-03 10:25 ` lerdsuwa at gcc dot gnu dot org
2004-12-04  7:07 ` 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).