Skip to content

libc++ recursive setjmp() macro causes -Wdisabled-macro-expansion warning #27091

@seanm

Description

@seanm
Bugzilla Link 26717
Version trunk
OS MacOS X

Extended Description

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugzillaIssues migrated from bugzillac++libc++libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions