public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/13095] New: GCC accepts invalid using declaration
@ 2003-11-18  0:13 reichelt at gcc dot gnu dot org
  2003-11-18  2:17 ` [Bug c++/13095] " 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 @ 2003-11-18  0:13 UTC (permalink / raw)
  To: gcc-bugs

The following code in invalid IMHO, since using declarations shall refer to
members of base classes (according to [7.3.3]/4), but B<T> is not a base class.

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

template <typename T> struct B : A<T>
{
    using B<T>::i;
    int foo() { return i; }
};
===========================================

However, gcc accepts the code since at least 2.95.x.

-- 
           Summary: GCC accepts invalid using declaration
           Product: gcc
           Version: unknown
            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


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


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

end of thread, other threads:[~2005-06-09  7:27 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-11-18  0:13 [Bug c++/13095] New: GCC accepts invalid using declaration reichelt at gcc dot gnu dot org
2003-11-18  2:17 ` [Bug c++/13095] " pinskia at gcc dot gnu dot org
2003-11-18 20:12 ` bangerth at dealii dot org
2004-01-24 11:23 ` giovannibajo at libero dot it
2004-06-18  4:49 ` pinskia at gcc dot gnu dot org
2004-09-20  0:55 ` pinskia at gcc dot gnu dot org
2005-06-09  7:27 ` reichelt 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).