[PATCH] D62944: [Driver] Fix wchar_t and wint_t definitions on Solaris

Rainer Orth via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jun 17 04:52:19 PDT 2019


ro added a comment.

In D62944#1542217 <https://reviews.llvm.org/D62944#1542217>, @efriedma wrote:

> For format-strings.c, I'm not really happy suggesting `#if defined(__sun) && !defined(__LP64__)`, but I don't think the alternative is better.  We could restrict the test so it doesn't run using a Solaris target triple, but we actually want coverage here: the difference in wint_t affects the semantics of "%lc", so we want some coverage of that path.


Agreed.  While gcc supports quite a number of targets with long int for wchar_t/wint_t, Solaris is the only one in clang.  I've now adapted
the test accordingly.  Should there be more in the future, we can look for a more generic solution.

Tested on `i386-pc-solaris2.11`, `x86_64-pc-solaris2.11`, and `x86_64-pc-linux-gnu`.  Ok for trunk now?


Repository:
  rC Clang

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

https://reviews.llvm.org/D62944





More information about the cfe-commits mailing list