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: [email protected]
        ReportedBy: [email protected]
                CC: [email protected], [email protected]


$ 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.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to