public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/31986] conversion-type-id should match in both contexts
       [not found] <bug-31986-4@http.gcc.gnu.org/bugzilla/>
@ 2012-01-28  3:07 ` pinskia at gcc dot gnu.org
  0 siblings, 0 replies; 2+ messages in thread
From: pinskia at gcc dot gnu.org @ 2012-01-28  3:07 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |accepts-invalid, wrong-code
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2012-01-28
     Ever Confirmed|0                           |1
      Known to fail|                            |4.7.0

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> 2012-01-28 02:53:17 UTC ---
Confirmed.


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

* [Bug c++/31986] conversion-type-id should match in both contexts
  2007-05-18 13:38 [Bug c++/31986] New: " andrew dot stubbs at st dot com
@ 2007-05-18 13:54 ` andrew dot stubbs at st dot com
  0 siblings, 0 replies; 2+ messages in thread
From: andrew dot stubbs at st dot com @ 2007-05-18 13:54 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from andrew dot stubbs at st dot com  2007-05-18 14:54 -------
EDG version 3.8 gives the warning:

t.cpp", line 15: warning: 
          ambiguous class member reference -- type "T" (declared at line 14)
          used in preference to type "C::T" (declared at line 6)
    printf ("%d\n", (T) c.operator T());  // invalid
                                   ^

In contrast to GCC, this gives the output "2 2 2", not "1 2 2".

And in -strict mode (full standard conformance) gives the error:
t.cpp", line 15: error: 
          ambiguous class member reference -- type "T" (declared at line 14)
          used in preference to type "C::T" (declared at line 6)
    printf ("%d\n", (T) c.operator T());  // invalid
                                   ^


-- 


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


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

end of thread, other threads:[~2012-01-28  2:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-31986-4@http.gcc.gnu.org/bugzilla/>
2012-01-28  3:07 ` [Bug c++/31986] conversion-type-id should match in both contexts pinskia at gcc dot gnu.org
2007-05-18 13:38 [Bug c++/31986] New: " andrew dot stubbs at st dot com
2007-05-18 13:54 ` [Bug c++/31986] " andrew dot stubbs at st dot com

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).