public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/66990] New: Wrong diagnostics when template being specialized is ambiguous
@ 2015-07-24  9:06 rs2740 at gmail dot com
  2015-07-24  9:08 ` [Bug c++/66990] " rs2740 at gmail dot com
  2015-07-24 10:18 ` redi at gcc dot gnu.org
  0 siblings, 2 replies; 3+ messages in thread
From: rs2740 at gmail dot com @ 2015-07-24  9:06 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66990

            Bug ID: 66990
           Summary: Wrong diagnostics when template being specialized is
                    ambiguous
           Product: gcc
           Version: 5.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: rs2740 at gmail dot com
  Target Milestone: ---

Consider:

namespace A {
    inline namespace B { template<class> struct C; }
    template<class> struct C;
    template<> struct C<int>{};
}

Lookup for `C` is ambiguous, obviously, but the diagnostics doesn't say that.
Instead, we get (with gcc 

prog.cc:4:23: error: 'C' is not a class template
     template<> struct C<int>{};
                       ^
prog.cc:4:28: error: template specifiers not specified in declaration of
'template<class> struct A::C'
     template<> struct C<int>{};
                            ^

which is rather unhelpful.


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

* [Bug c++/66990] Wrong diagnostics when template being specialized is ambiguous
  2015-07-24  9:06 [Bug c++/66990] New: Wrong diagnostics when template being specialized is ambiguous rs2740 at gmail dot com
@ 2015-07-24  9:08 ` rs2740 at gmail dot com
  2015-07-24 10:18 ` redi at gcc dot gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: rs2740 at gmail dot com @ 2015-07-24  9:08 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66990

TC <rs2740 at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |diagnostic

--- Comment #1 from TC <rs2740 at gmail dot com> ---
I meant, "(with gcc 5.2.0, as well as 6.0.0 20150722 (experimental))"


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

* [Bug c++/66990] Wrong diagnostics when template being specialized is ambiguous
  2015-07-24  9:06 [Bug c++/66990] New: Wrong diagnostics when template being specialized is ambiguous rs2740 at gmail dot com
  2015-07-24  9:08 ` [Bug c++/66990] " rs2740 at gmail dot com
@ 2015-07-24 10:18 ` redi at gcc dot gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: redi at gcc dot gnu.org @ 2015-07-24 10:18 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66990

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2015-07-24
     Ever confirmed|0                           |1

--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> ---
I thought this was a dup but maybe I'm thinking of PR 44283 which is different
(but similarly unhelpful)


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

end of thread, other threads:[~2015-07-24 10:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-07-24  9:06 [Bug c++/66990] New: Wrong diagnostics when template being specialized is ambiguous rs2740 at gmail dot com
2015-07-24  9:08 ` [Bug c++/66990] " rs2740 at gmail dot com
2015-07-24 10:18 ` redi 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).