[LLVMbugs] [Bug 8550] New: Spurious conversion error ?

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Fri Nov 5 06:26:26 PDT 2010


http://llvm.org/bugs/show_bug.cgi?id=8550

           Summary: Spurious conversion error ?
           Product: clang
           Version: unspecified
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: zaffanella at cs.unipr.it
                CC: llvmbugs at cs.uiuc.edu, dgregor at apple.com


$ cat bug.C
struct Z {};

Z* foo(Z*);

struct B : Z
{
  static const int i = sizeof( foo((B*) 0) );
};


$ clang++ -cc1 bug.C
bug.C:7:32: error: no matching function for call to 'foo'
  static const int i = sizeof( foo((B*) 0) );
                               ^~~
bug.C:3:4: note: candidate function not viable: cannot convert argument of
incomplete type 'B *' to 'Z *'
Z* foo(Z*);
   ^
1 error generated.


The test is compiled by both gcc and Comeau.

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list