[LLVMbugs] [Bug 17859] New: mishandling of cv-qualification dropping in covariant return types

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Fri Nov 8 16:44:03 PST 2013


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

            Bug ID: 17859
           Summary: mishandling of cv-qualification dropping in covariant
                    return types
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
          Assignee: unassignedclangbugs at nondot.org
          Reporter: richard-llvm at metafoo.co.uk
                CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
    Classification: Unclassified

Clang accepts this ill-formed code:

typedef int X;
struct A { virtual const X *f(); };
struct B : A { virtual X *f(); };

Per 10.3/7, a covariant return type can only drop a cv-qualifier if it is a
pointer or reference to *class* type.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20131109/175487bc/attachment.html>


More information about the llvm-bugs mailing list