From: Jonathan Wakely <jwakely.gcc@gmail.com>
To: David Edelsohn <dje.gcc@gmail.com>
Cc: GCC Patches <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH] g++.dg/cpp1y/pr58708.C wchar_t size
Date: Tue, 17 Nov 2015 16:22:00 -0000 [thread overview]
Message-ID: <CAH6eHdSZJr0NwG=rvJeidgBtV4m8L3DuUwfZ8RJBQH+OVCBzzg@mail.gmail.com> (raw)
In-Reply-To: <CAGWvnym6qLBn7=kpHdwnCNSDPSX5Jk4=wjvtH822hPey_P9Hbg@mail.gmail.com>
On 17 November 2015 at 16:04, David Edelsohn wrote:
> The testcase in the GCC testsuite assumes that wchar_t is 32 bits,
> which is not correct on AIX. 32 bit AIX maintains 16 bit wchar_t for
> backward compatibility (64 bit AIX uses 32 bit wchar_t).
>
> What is the preferred method to make the testcase safe for smaller wchar_t?
>
> The following patch works for me. I wasn't sure what header file and
> what macro test would be considered portable. I could include
> stdint.h and compare
>
> WCHAR_MAX == UINT16_MAX
>
> or
>
> WCHAR_MAX < UINT32_MAX
__SIZEOF_WCHAR_T__ is always pre-defined by the compiler, so that
could be used.
next prev parent reply other threads:[~2015-11-17 16:22 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-17 16:04 David Edelsohn
2015-11-17 16:22 ` Jonathan Wakely [this message]
2015-11-17 16:50 ` David Edelsohn
2015-11-17 23:41 ` Mike Stump
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAH6eHdSZJr0NwG=rvJeidgBtV4m8L3DuUwfZ8RJBQH+OVCBzzg@mail.gmail.com' \
--to=jwakely.gcc@gmail.com \
--cc=dje.gcc@gmail.com \
--cc=gcc-patches@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).