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

Reply via email to