[libcxx-commits] [PATCH] D110647: [SystemZ][z/OS] Resolve missing table_size symbol

Muiez Ahmed via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Wed Oct 13 12:47:28 PDT 2021


muiez added inline comments.


================
Comment at: libcxx/test/std/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.statics/table_size.pass.cpp:23
+  typedef std::ctype<char> F;
+  const size_t *G = &F::table_size;
+  assert(*G >= 256);
----------------
jloser wrote:
> jloser wrote:
> > Do we need the pointer? Or can we just say
> > ```
> > assert(F::table_size >= 256);
> > ```
> It could be a `static_assert` even, right?
Yes, we need the pointer since the error under test occurs when we have a reference to `F::table_size`. The assert is there to avoid getting an unused variable warning (`G`).


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

https://reviews.llvm.org/D110647



More information about the libcxx-commits mailing list