public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/19787] New: Internal compiler error with ambiguous conversion functions
@ 2005-02-06 10:20 belz@kolumbus.fi
  2005-02-06 15:19 ` [Bug c++/19787] [4.0 Regression] " pinskia@gcc.gnu.org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: belz@kolumbus.fi @ 2005-02-06 10:20 UTC (permalink / raw)
  To: gcc-bugs

struct H {
    operator char();
    operator short();
};

int const& ref = H();

output:
oref.cpp:7: error: conversion from 'H' to 'const int' is ambiguous
oref.cpp:4: note: candidates are: H::operator short int()
oref.cpp:3: note:                 H::operator char()
oref.cpp:7: internal compiler error: tree check: expected class 'type', have 
'exceptional' (error_mark) in initialize_reference, at cp/call.c:6586
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL: http://gcc.gnu.org/bugs.html > for instructions.

using:
$ g++ -v
Using built-in specs.
Target: i686-pc-linux-gnu
Configured with: ../gcc/configure --enable-languages=c++,c --enable-
threads=posix
Thread model: posix
gcc version 4.0.0 20050203 (experimental)


This is a regression from earlier versions. There does not seem to be any 
problems if I do the reference binding in block scope.


Mikael

-- 
           Summary: Internal compiler error with ambiguous conversion
                    functions
           Product: gcc
           Version: 4.0.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: belz at kolumbus dot fi
                CC: gcc-bugs at gcc dot gnu dot org


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


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

end of thread, other threads:[~2005-02-10  1:13 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-02-06 10:20 [Bug c++/19787] New: Internal compiler error with ambiguous conversion functions belz@kolumbus.fi
2005-02-06 15:19 ` [Bug c++/19787] [4.0 Regression] " pinskia@gcc.gnu.org
2005-02-08  3:11 ` [Bug c++/19787] [3.4/4.0 " pinskia at gcc dot gnu dot org
2005-02-09 13:51 ` mmitchel at gcc dot gnu dot org
2005-02-10  7:57 ` cvs-commit at gcc dot gnu dot org
2005-02-10  9:23 ` [Bug c++/19787] [3.4 " mmitchel at gcc dot gnu dot org
2005-02-10 10:17 ` mmitchel at gcc dot gnu dot org
2005-02-10 10:37 ` cvs-commit 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).