[llvm-bugs] [Bug 26717] New: libc++ recursive setjmp() macro causes -Wdisabled-macro-expansion warning

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Feb 23 10:15:48 PST 2016


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

            Bug ID: 26717
           Summary: libc++ recursive setjmp() macro causes
                    -Wdisabled-macro-expansion warning
           Product: new-bugs
           Version: trunk
          Hardware: Macintosh
                OS: MacOS X
            Status: NEW
          Severity: normal
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: sean at rogue-research.com
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

Consider this reduced/trivial C++ snippet:

----------
#include <setjmp.h>

int main()
{
  setjmp(0);
  return 0;
}
----------

compiling with clang trunk gives:

/Users/sean/test.cxx:5:3: warning: disabled expansion of recursive macro
[-Wdisabled-macro-expansion]
  setjmp(0);
  ^
/Users/sean/llvm/llvm-rel-install/bin/../include/c++/v1/setjmp.h:40:21: note:
expanded from macro 'setjmp'
#define setjmp(env) setjmp(env)
                    ^

(If I use a .c file, I don't get the warning.)

As that's an llvm header (and has '#pragma GCC system_header'), I would hope
not to get this warning.

-- 
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/20160223/347cac7d/attachment.html>


More information about the llvm-bugs mailing list