[libcxx-commits] [PATCH] D149573: [Clang][C++23] Implement core language changes from P1467R9 extended floating-point types and standard names and introduce Bfloat16 arithmetic type.

M. Zeeshan Siddiqui via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Wed May 10 10:36:07 PDT 2023


codemzs marked an inline comment as done.
codemzs added a comment.

In D149573#4332549 <https://reviews.llvm.org/D149573#4332549>, @tahonermann wrote:

> I reviewed about a third of this, but then stopped due to the `__bf16` vs `std::bfloat16_t` naming issues. I think the existing names that use "bfloat16" to support the `__bf16` type should be renamed, in a separate patch, and this patch rebased on top of it. We are sure to make mistakes if this confusing situation is not resolved.

@tahonermann, thank you for your review and highlighting the naming issues with `__bf16` and `std::bfloat16_t`. I agree that reversing the type names will improve readability and maintainability. I considered this while working on the code and appreciate your suggestion to address it in a separate patch before rebasing this one.



================
Comment at: clang/include/clang/Lex/LiteralSupport.h:75
   bool isBitInt : 1;        // 1wb, 1uwb (C2x)
+  bool isBF16 : 1;          // 1.0bf
   uint8_t MicrosoftInteger; // Microsoft suffix extension i8, i16, i32, or i64.
----------------
tahonermann wrote:
> Is this for `__bf16` or for `std::bfloat16_t`?
Its for `std::bfloat16_t`, I don't believe `__bf16` has a literal suffix. 


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

https://reviews.llvm.org/D149573



More information about the libcxx-commits mailing list