[LLVMbugs] [Bug 16946] New: sizeof(__func__) etc are wrong in lambdas

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Tue Aug 20 12:52:11 PDT 2013


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

            Bug ID: 16946
           Summary: sizeof(__func__) etc are wrong in lambdas
           Product: clang
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: -New Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: b.r.longbons at gmail.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

Created attachment 11075
  --> http://llvm.org/bugs/attachment.cgi?id=11075&action=edit
demonstration of the problem

sizeof(__func__), sizeof(__FUNCTION__), and sizeof(__PRETTY_FUNCTION__) are
wrong in lambdas; they print the size of the magic variable from the containing
function.

I tested clang 3.3 as released by Debian; sdt on IRC tested with yesterday's
trunk.

The attached program should always output the length of the string that
follows, including the the \0.

Expected output includes: 11 operator()
Actual output includes: 5 operator()

-- 
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/20130820/597f6bd6/attachment.html>


More information about the llvm-bugs mailing list