jhuber6 added a comment.

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

> This looks good to me, and I agree we should document what this is fixing. 
> Any update on if/when this will land?
>
> In my opinion, there's nothing broken about the user code (definitely 
> contrived, though). They didn't ask for `stdbool.h` so there should not be a 
> redeclaration error. This doesn't seem to be an issue when compiling for 
> NVIDIA or host-only OpenMP, either.

The example code in the bug report suggests the user is defining their own 
boolean type. I think the C and C++ standard is pretty clear that `__` and 
`_[A-Z]` identifiers are reserved and may clash at any point if defined by the 
user. This is typically why these are provided via headers that are guarded 
appropriates as `stdbool.h` is. I'm also not sure if this is a problem 
upstream, or it just reflects some vendor's implementation of it. Maybe others 
want to comment on this.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D131639

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to