public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/48920] New: typename specifier should not ignore non-type names
@ 2011-05-06 22:54 schaub.johannes at googlemail dot com
  2011-05-06 23:56 ` [Bug c++/48920] " schaub.johannes at googlemail dot com
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: schaub.johannes at googlemail dot com @ 2011-05-06 22:54 UTC (permalink / raw)
  To: gcc-bugs

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

           Summary: typename specifier should not ignore non-type names
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: schaub.johannes@googlemail.com


The following is ill-formed code

    struct A {
      struct B { };
      int B;
    };

    typename A::B a;

GCC accepts it. As a perhaps related issue, the following looks well-formed:

    template<typename T>
    void f(typename T::B) { }

    template<typename T>
    void f(struct T::B) { }

GCC rejects it as a redefinition. The dependent parameter types of both look
different.


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

end of thread, other threads:[~2021-12-09  2:25 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-06 22:54 [Bug c++/48920] New: typename specifier should not ignore non-type names schaub.johannes at googlemail dot com
2011-05-06 23:56 ` [Bug c++/48920] " schaub.johannes at googlemail dot com
2012-12-26 13:21 ` redi at gcc dot gnu.org
2020-03-12 19:27 ` mpolacek at gcc dot gnu.org
2021-12-08  8:48 ` pinskia at gcc dot gnu.org
2021-12-08  9:40 ` schaub.johannes at googlemail dot com
2021-12-08 16:36 ` pinskia at gcc dot gnu.org
2021-12-09  2:25 ` pinskia at gcc dot gnu.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).