This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: __intN patch 3/5: main __int128 -> __intN conversion.
- From: "Joseph S. Myers" <joseph at codesourcery dot com>
- To: DJ Delorie <dj at redhat dot com>
- Cc: <gcc-patches at gcc dot gnu dot org>, <libstdc++ at gcc dot gnu dot org>
- Date: Mon, 1 Sep 2014 21:47:10 +0000
- Subject: Re: __intN patch 3/5: main __int128 -> __intN conversion.
- Authentication-results: sourceware.org; auth=none
- References: <201408132211 dot s7DMBGBu016387 at greed dot delorie dot com> <Pine dot LNX dot 4 dot 64 dot 1408212030310 dot 16900 at digraph dot polyomino dot org dot uk> <201408212123 dot s7LLNPIQ018746 at greed dot delorie dot com> <Pine dot LNX dot 4 dot 64 dot 1408212131060 dot 16900 at digraph dot polyomino dot org dot uk> <201408220515 dot s7M5Fhpa007479 at greed dot delorie dot com> <Pine dot LNX dot 4 dot 64 dot 1408221051550 dot 5292 at digraph dot polyomino dot org dot uk> <201408221924 dot s7MJOcjB022631 at greed dot delorie dot com> <Pine dot LNX dot 4 dot 64 dot 1408222013390 dot 16713 at digraph dot polyomino dot org dot uk> <201408260303 dot s7Q33nqm024601 at greed dot delorie dot com>
On Mon, 25 Aug 2014, DJ Delorie wrote:
> + for (i = 0; i < NUM_INT_N_ENTS; i ++)
> + if (int_n_enabled_p[i])
> + {
> + char buf[35+20+20];
> +
> + /* These are used to configure the C++ library. */
> +
> + if (!flag_iso || int_n_data[i].bitsize == POINTER_SIZE)
> + {
> + sprintf (buf, "__GLIBCXX_TYPE_INT_N_%d=__int%d", i, int_n_data[i].bitsize);
> + cpp_define (parse_in, buf);
> +
> + sprintf (buf, "__GLIBCXX_BITSIZE_INT_N_%d=%d", i, int_n_data[i].bitsize);
> + cpp_define (parse_in, buf);
> + }
> + }
I think this should at least initially be conditioned on c_dialect_cxx ().
> + case RID_INT_N_0:
> + case RID_INT_N_1:
> + case RID_INT_N_2:
> + case RID_INT_N_3:
> + specs->int_n_idx = i - RID_INT_N_0;
> + if (!in_system_header_at (input_location)
> + /* As a special exception, allow a type that's used
> + for __SIZE_TYPE__. */
> + && int_n_data[specs->int_n_idx].bitsize != POINTER_SIZE)
Given the precedent for long long as __SIZE_TYPE__, I don't think we
should have that special exception.
The non-C++/libstdc++ parts are OK with those changes.
--
Joseph S. Myers
joseph@codesourcery.com