public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/15946] New: Unhelpful error message when "typename" is omitted
@ 2004-06-11 17:17 pkoning at equallogic dot com
  2004-06-11 17:26 ` [Bug c++/15946] " pinskia at gcc dot gnu dot org
  2004-11-12 14:12 ` pinskia at gcc dot gnu dot org
  0 siblings, 2 replies; 3+ messages in thread
From: pkoning at equallogic dot com @ 2004-06-11 17:17 UTC (permalink / raw)
  To: gcc-bugs

Consider this test case:

template <class T> class Foo
{
public:
    typedef T bar;
    int x;
    T z;
};
template <class T> class Test: public Foo<T>
{
public:
    typedef T * t2;
    typedef Foo<T> F;
    
    t2 t;
    F f;
    typename F::bar b;
    typename Foo<T>::bar b2;
    F::bar b3;
    Foo<T>::bar b4;
};

Test<int> T2;

GCC 3.3.3 complains about the declarations of b3 and b4, saying that it's an
implicit typename and that's deprecated.

GCC 3.4.0 rejects the code outright.  Given that it's the next version, and it
was deprecated, that's ok.  What's not ok is the error message:

foo.cc:18: error: expected `;' before "b3"
foo.cc:19: error: expected `;' before "b4"

This gives no clue at all about what the problem is or how to correct it.

-- 
           Summary: Unhelpful error message when "typename" is omitted
           Product: gcc
           Version: 3.4.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: pkoning at equallogic dot com
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: i386-unknown-netbsdelf1.6.2
  GCC host triplet: i386-unknown-netbsdelf1.6.2
GCC target triplet: i386-unknown-netbsdelf1.6.2


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


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

* [Bug c++/15946] Unhelpful error message when "typename" is omitted
  2004-06-11 17:17 [Bug c++/15946] New: Unhelpful error message when "typename" is omitted pkoning at equallogic dot com
@ 2004-06-11 17:26 ` pinskia at gcc dot gnu dot org
  2004-11-12 14:12 ` pinskia at gcc dot gnu dot org
  1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-06-11 17:26 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-06-11 17:26 -------
Confirmed.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |enhancement
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
           Keywords|                            |diagnostic
   Last reconfirmed|0000-00-00 00:00:00         |2004-06-11 17:26:40
               date|                            |


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


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

* [Bug c++/15946] Unhelpful error message when "typename" is omitted
  2004-06-11 17:17 [Bug c++/15946] New: Unhelpful error message when "typename" is omitted pkoning at equallogic dot com
  2004-06-11 17:26 ` [Bug c++/15946] " pinskia at gcc dot gnu dot org
@ 2004-11-12 14:12 ` pinskia at gcc dot gnu dot org
  1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-11-12 14:12 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-11-12 14:11 -------
*** Bug 18451 has been marked as a duplicate of this bug. ***

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |sschunck at pdf dot de


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


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

end of thread, other threads:[~2004-11-12 14:12 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-06-11 17:17 [Bug c++/15946] New: Unhelpful error message when "typename" is omitted pkoning at equallogic dot com
2004-06-11 17:26 ` [Bug c++/15946] " pinskia at gcc dot gnu dot org
2004-11-12 14:12 ` pinskia 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).