[PATCH] D131639: [OpenMP] Remove 'stdbool.h' from OpenMP header wrappers

Joseph Huber via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Aug 25 10:41:17 PDT 2022


jhuber6 added a comment.

In D131639#3749582 <https://reviews.llvm.org/D131639#3749582>, @ivanrodriguez3753 wrote:

> They are defining their own `bool`, which aliases to the built-in `_Bool` (which is reserved, as you noted with `_[A-Z]`). I thought `bool` was fair game unless they included `stdbool.h`?

You're right, I was reading it wrong. It should be "legal" to typedef something if no one else has done it.

I'm still wondering if this is really our fault as it's still likely to conflict. The `<stdbool.h>` header supplies `__bool_true_false_are_defined` exactly for this reason. Can the user not check this locally to prevent re-declaration? I think it's perfectly reasonable to include system files as part of a toolchain.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D131639/new/

https://reviews.llvm.org/D131639



More information about the cfe-commits mailing list