[LLVMbugs] [Bug 9047] New: Poor handling of erroneous return type

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Mon Jan 24 20:40:04 PST 2011


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

           Summary: Poor handling of erroneous return type
           Product: clang
           Version: unspecified
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: clattner at apple.com
                CC: llvmbugs at cs.uiuc.edu, dgregor at apple.com


$ cat t2.cc
const foo *Bar() { return 42; }

$ clang t2.cc 
t2.cc:3:7: error: unknown type name 'foo'
const foo *Bar() { return 42; }
      ^
t2.cc:3:27: error: cannot initialize return object of type 'const int *' with
an rvalue of type 'int'
const foo *Bar() { return 42; }
                          ^~


What is this "const int *" that you speak of??

-Chris

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