[LLVMbugs] [Bug 23546] New: cv-qualifiers not ignored on function type

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Sat May 16 03:24:13 PDT 2015


https://llvm.org/bugs/show_bug.cgi?id=23546

            Bug ID: 23546
           Summary: cv-qualifiers not ignored on function type
           Product: clang
           Version: 3.6
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++11
          Assignee: unassignedclangbugs at nondot.org
          Reporter: david_work at me.com
                CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
    Classification: Unclassified

[dcl.fct] ยง8.3.5/7 says,

"The effect of a cv-qualifier-seq in a function declarator is not the same as
adding cv-qualification on top of the function type. In the latter case, the
cv-qualifiers are ignored."

The last sentence doesn't seem to be implemented. The test below is
well-formed, but generates various errors including a warning, "qualifier on
function type 't' (aka 'void ()') has unspecified behavior."

Johannes Schaub says that this is a C++11 feature. Perhaps it should be
contingent on the language flag.

typedef void t();
void f();
t const f;

-- 
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/20150516/0206b0d4/attachment.html>


More information about the llvm-bugs mailing list