DKIM-Filter: OpenDKIM Filter v2.11.0 delorie.com 46R6wqwN710954 Authentication-Results: delorie.com; dkim=pass (1024-bit key, unprotected) header.d=cygwin.com header.i=@cygwin.com header.a=rsa-sha256 header.s=default header.b=sjd456pG X-Recipient: archive-cygwin AT delorie DOT com DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 541CE3858402 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com; s=default; t=1722063531; bh=3tz2M7DlNUiK6J4qGTI/o45damXvQzExpxSlklRhsTA=; h=To:Subject:In-Reply-To:References:Date:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=sjd456pGbehVZ6t/1XZhNxiy0SxIBNSDvSF1wHVd5ZBHeCnzMrVfi5Y5q2EWjKxG1 ycnqSDrItssy5duDDLVTlWLg91QrcnEioUzCNMh0Te6cUZPeO7EV2lEvHtO6FRczHl 3P2Tv7ahVTpeJO5kK/RPbjPXde99lQPY/hm9ihwo= X-Original-To: cygwin AT cygwin DOT com Delivered-To: cygwin AT cygwin DOT com DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org BC35E3858D34 ARC-Filter: OpenARC Filter v1.0.0 sourceware.org BC35E3858D34 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1722063510; cv=none; b=xcvN/LG/kN7bhyZxROISLqngA266pv5vF0MZkGhrhsyPAlDDYxfmhnT6NeHam/EQHMOlrjyNNAGSb0mJRzb/xmSmBxvf9uAdDcpZgH5Fhkc0awMnATwyyD+Tnfc8rUd2p0wbMhCb7O20+yiy1R5E1HLiGTL5AaHFPkVhJxKm7qs= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1722063510; c=relaxed/simple; bh=1qyI3KzEfgZ82Wex03edTpfBcGR8LWBroOHAGDwzs9A=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=VdQZicVi1c4JxRVPESX0FDXRVUZ2nU/x+PzLlcdpWUevEwLQNBYy5N10fEmRBN1J8dnB8MdgcThu6KCJixZIh8+4TQNZlMZgHaAGQK5eVGYc9ItSMHunwiPf6dW4ibKQNtHM6/oi+AMHHBP+lf+QJ5In4N5lmzo8FunOpN7snMw= ARC-Authentication-Results: i=1; server2.sourceware.org To: cygwin AT cygwin DOT com Subject: Re: Bug in GCC / libstdc++: Space character categorized as non-printable by std::ctype In-Reply-To: (Kristian Spangsege via Cygwin's message of "Fri, 14 Jun 2024 17:37:13 +0200") References: Date: Sat, 27 Jul 2024 08:58:20 +0200 Message-ID: <87y15nb9tf.fsf@Gerda.invalid> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 X-purgate-type: clean X-purgate: clean X-purgate-size: 1311 X-purgate-ID: 155817::1722063503-66FFBBA7-A28B64B3/0/0 X-Spam-Status: No, score=0.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_BARRACUDACENTRAL, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: cygwin AT cygwin DOT com X-Mailman-Version: 2.1.30 Precedence: list List-Id: General Cygwin discussions and problem reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: ASSI via Cygwin Reply-To: ASSI Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: cygwin-bounces~archive-cygwin=delorie DOT com AT cygwin DOT com Sender: "Cygwin" Kristian Spangsege via Cygwin writes: > In C++, a space character is reported as non-printable by > `std::ctype` in the "C" locale (the only locale supported by > `std::ctype`). In other words, the following expression evaluates to > `false`: > > ctype.is(std::ctype_base::print, ctype.widen(' ')) > > where `ctype` is obtained by `std::use_facet>(loc)` and > `loc` is the "C" locale. > > It should have been evaluated to `true` because a space character is > required by the C++ standard to be categorized as printable. > > Also, it is reported as printable by `std::iswprint(int ch)`. > > Also, the non-wide space character is reported as printable, i.e, > `std::use_facet>(loc)::is(std::ctype_base::print, ' ')` is > `true`. > > Also, `ctype.is(std::ctype_base::print, ctype.widen(' '))` is `true` with > MinGW, with GCC on Linux, and with Visual Studio. This sounds like it might be a bug in newlib, so you should either report it there or else it would be the newlib integration for gcc. In any case this needs to be fixed upstream. Regards, Achim. -- +<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+ Samples for the Waldorf Blofeld: http://Synth.Stromeko.net/Downloads.html#BlofeldSamplesExtra -- Problem reports: https://cygwin.com/problems.html FAQ: https://cygwin.com/faq/ Documentation: https://cygwin.com/docs.html Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple