public inbox for libstdc++@gcc.gnu.org
 help / color / mirror / Atom feed
From: Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
To: "CHIGOT, CLEMENT" <clement.chigot@atos.net>
Cc: libstdc++ <libstdc++@gcc.gnu.org>,
	 Jonathan Wakely <jwakely@redhat.com>,
	 David Edelsohn <dje.gcc@gmail.com>
Subject: Re: [PATCH] libstdc++: implement locale support for AIX
Date: Wed, 09 Jun 2021 16:50:35 +0200	[thread overview]
Message-ID: <ydd35trm6ro.fsf@CeBiTec.Uni-Bielefeld.DE> (raw)
In-Reply-To: <PA4PR02MB66869D2297256420B19394BDEA379@PA4PR02MB6686.eurprd02.prod.outlook.com> (CLEMENT CHIGOT's message of "Tue, 8 Jun 2021 06:59:14 +0000")

[-- Attachment #1: Type: text/plain, Size: 259 bytes --]

Hi Clement,

> Did anyone have time to take a look at this patch ?

I've finally manged to give it a try on sparc-sun-solaris2.11 (Solaris
11.4).  I had to apply the following additional patch, matching what you
did in config/os/aix/ctype_configure_char.cc:


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: sccc.patch --]
[-- Type: text/x-patch, Size: 1590 bytes --]

diff --git a/libstdc++-v3/config/os/solaris/ctype_configure_char.cc b/libstdc++-v3/config/os/solaris/ctype_configure_char.cc
--- a/libstdc++-v3/config/os/solaris/ctype_configure_char.cc
+++ b/libstdc++-v3/config/os/solaris/ctype_configure_char.cc
@@ -42,27 +42,27 @@ namespace std _GLIBCXX_VISIBILITY(defaul
   ctype<char>::classic_table() throw()
   { return __ctype_mask; }
 
-  ctype<char>::ctype(__c_locale, const mask* __table, bool __del,
+  ctype<char>::ctype(__c_locale __cloc, const mask* __table, bool __del,
 		     size_t __refs)
-  : facet(__refs), _M_del(__table != 0 && __del),
+  : facet(__refs), _M_c_locale_ctype(_S_clone_c_locale(__cloc)),
+  _M_del(__table != 0 && __del),
   _M_toupper(__trans_upper), _M_tolower(__trans_lower),
-  _M_table(__table ? __table : classic_table())
+  _M_table(__table ? __table : classic_table()),
+  _M_widen_ok(0), _M_narrow_ok(0)
   {
     memset(_M_widen, 0, sizeof(_M_widen));
-    _M_widen_ok = 0;
     memset(_M_narrow, 0, sizeof(_M_narrow));
-    _M_narrow_ok = 0;
   }
 
   ctype<char>::ctype(const mask* __table, bool __del, size_t __refs)
-  : facet(__refs), _M_del(__table != 0 && __del),
+  : facet(__refs), _M_c_locale_ctype(_S_get_c_locale()),
+  _M_del(__table != 0 && __del),
   _M_toupper(__trans_upper), _M_tolower(__trans_lower),
-  _M_table(__table ? __table : classic_table())
+  _M_table(__table ? __table : classic_table()),
+  _M_widen_ok(0), _M_narrow_ok(0)
   {
     memset(_M_widen, 0, sizeof(_M_widen));
-    _M_widen_ok = 0;
     memset(_M_narrow, 0, sizeof(_M_narrow));
-    _M_narrow_ok = 0;
   }
 
   char

[-- Attachment #3: Type: text/plain, Size: 4780 bytes --]


For now, I'm passing --enable-clocale=xpg7 at configure time rather than
changing the default.

Results are mixed: with the previous patch, I had 29 FAILs (both 32 and
64-bit).  The number has remained the same, but the exact set of failing
patches changed:

FAIL: libstdc++-abi/abi_check
FAIL: 22_locale/codecvt/encoding/wchar_t/wrapped_locale.cc execution test
FAIL: 22_locale/codecvt/in/wchar_t/3.cc execution test
FAIL: 22_locale/codecvt/max_length/wchar_t/4.cc execution test
FAIL: 22_locale/codecvt/max_length/wchar_t/wrapped_locale.cc execution test
FAIL: 22_locale/codecvt/out/wchar_t/3.cc execution test
FAIL: 22_locale/collate/compare/wchar_t/2.cc execution test
FAIL: 22_locale/collate/compare/wchar_t/3.cc execution test
FAIL: 22_locale/collate/compare/wchar_t/wrapped_env.cc execution test
FAIL: 22_locale/collate/compare/wchar_t/wrapped_locale.cc execution test
FAIL: 22_locale/collate/transform/wchar_t/2.cc execution test
FAIL: 22_locale/collate/transform/wchar_t/3.cc execution test
FAIL: 22_locale/collate/transform/wchar_t/wrapped_env.cc execution test
FAIL: 22_locale/collate/transform/wchar_t/wrapped_locale.cc execution test
FAIL: 22_locale/ctype/widen/wchar_t/2.cc execution test
FAIL: 22_locale/money_get/get/wchar_t/1.cc execution test
FAIL: 22_locale/money_put/put/char/9780-3.cc execution test
FAIL: 22_locale/money_put/put/wchar_t/1.cc execution test
FAIL: 22_locale/money_put/put/wchar_t/3.cc execution test
FAIL: 22_locale/time_get/get_date/wchar_t/4.cc execution test
FAIL: 22_locale/time_put/put/char/2.cc execution test
FAIL: 22_locale/time_put/put/char/4.cc execution test
FAIL: 22_locale/time_put/put/wchar_t/2.cc execution test
FAIL: 22_locale/time_put/put/wchar_t/4.cc execution test
FAIL: 27_io/basic_filebuf/overflow/wchar_t/11305-1.cc execution test
FAIL: 27_io/basic_filebuf/overflow/wchar_t/11305-2.cc execution test
FAIL: 27_io/basic_filebuf/overflow/wchar_t/11305-3.cc execution test
FAIL: 27_io/basic_filebuf/overflow/wchar_t/11305-4.cc execution test
FAIL: 27_io/manipulators/extended/get_time/char/2.cc execution test

-FAIL: 22_locale/codecvt/encoding/wchar_t/wrapped_locale.cc execution test

-FAIL: 22_locale/codecvt/max_length/wchar_t/wrapped_locale.cc execution test

-FAIL: 22_locale/collate/compare/wchar_t/2.cc execution test

-FAIL: 22_locale/collate/compare/wchar_t/wrapped_env.cc execution test
-FAIL: 22_locale/collate/compare/wchar_t/wrapped_locale.cc execution test
-FAIL: 22_locale/collate/transform/wchar_t/2.cc execution test

-FAIL: 22_locale/collate/transform/wchar_t/wrapped_env.cc execution test
-FAIL: 22_locale/collate/transform/wchar_t/wrapped_locale.cc execution test
+FAIL: 22_locale/ctype/is/wchar_t/1.cc execution test
+FAIL: 22_locale/ctype/is/wchar_t/wrapped_env.cc execution test
+FAIL: 22_locale/ctype/scan/wchar_t/1.cc execution test
+FAIL: 22_locale/ctype/scan/wchar_t/wrapped_env.cc execution test

+FAIL: 22_locale/locale/cons/29217.cc execution test
+FAIL: 22_locale/locale/cons/38368.cc execution test
+FAIL: 22_locale/messages/members/char/1.cc execution test
+FAIL: 22_locale/messages_byname/named_equivalence.cc execution test

-FAIL: 22_locale/money_put/put/char/9780-3.cc execution test

-FAIL: 22_locale/time_get/get_date/wchar_t/4.cc execution test

-FAIL: 22_locale/time_put/put/char/4.cc execution test

+FAIL: 28_regex/algorithms/regex_match/ecma/wchar_t/hex.cc execution test
+FAIL: 28_regex/algorithms/regex_match/extended/wstring_locale.cc execution test
+FAIL: 28_regex/iterators/regex_token_iterator/wchar_t/wstring_02.cc execution test
+FAIL: 28_regex/traits/wchar_t/isctype.cc execution test

Just a number of comments on the patch itself:

* In a couple of places, you use uselocale, e.g. in
  config/locale/xpg7/c_locale.h.  E.g. on Solaris 11.3, this is
  missing, which is no wonder given that the OS only conforms to XPG6.
  We will either have to hardcode the clocale based on the minor/micro
  version or check for a couple of necessary XPG7 functions before
  enabling the xpg7 clocale.  However, we can cross that bridge once the
  code works on actual XPG7 systems.

* Your patch changes indentation in a couple of places
  (e.g. config/locale/xpg7/ctype_members.cc,
  config/os/aix/ctype_configure_char.cc) for no reason I can see.  This
  seems to violate the coding style.

* When I tried GCC master on FreeBSD (for the previous version of your
  patch), libstdc++ locale test results were pretty horrible, both
  without and with your patch.  If the dragonfly/xpg7 locale code has
  considerable problems even on the native system it originates from, I
  wonder if it's the best basis for the new xpg7 clocale.

	Rainer

-- 
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University

  reply	other threads:[~2021-06-09 14:50 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <PA4PR02MB6686075C6C254E583B72BC2AEAAB0@PA4PR02MB6686.eurprd02.prod.outlook.com>
     [not found] ` <CAGWvny=XpcWGnyb=MWg5ziYSND7O1AnQ6-NAX811p1b5urH0YA@mail.gmail.com>
2021-01-11 15:35   ` Rainer Orth
2021-01-11 15:40     ` Jonathan Wakely
2021-01-11 15:56       ` CHIGOT, CLEMENT
2021-01-11 22:20         ` David Edelsohn
2021-01-12 15:14           ` CHIGOT, CLEMENT
2021-01-12 15:23             ` CHIGOT, CLEMENT
2021-01-12 15:25             ` Jonathan Wakely
2021-01-12 15:40               ` CHIGOT, CLEMENT
2021-01-12 15:44               ` David Edelsohn
2021-01-12 17:34                 ` Jonathan Wakely
2021-01-12 15:52               ` Rainer Orth
2021-01-12 17:41                 ` Rainer Orth
2021-01-12 17:44                   ` David Edelsohn
2021-01-12 19:58                     ` Rainer Orth
2021-01-13 11:57                       ` Rainer Orth
2021-01-13 12:23                         ` CHIGOT, CLEMENT
2021-01-13 12:31                           ` Rainer Orth
2021-01-13 12:41                             ` CHIGOT, CLEMENT
2021-01-13 12:47                               ` Rainer Orth
2021-01-21 12:48                                 ` CHIGOT, CLEMENT
2021-01-21 16:36                                   ` Rainer Orth
2021-01-22  9:57                                     ` CHIGOT, CLEMENT
2021-01-22 11:04                                       ` Rainer Orth
2021-01-22 11:29                                         ` Jonathan Wakely
2021-01-22 11:54                                           ` Rainer Orth
2021-01-22 12:23                                             ` CHIGOT, CLEMENT
2021-01-27 12:52                                               ` CHIGOT, CLEMENT
2021-01-27 14:26                                                 ` Rainer Orth
2021-01-27 14:44                                                   ` CHIGOT, CLEMENT
2021-01-28 10:09                                                     ` CHIGOT, CLEMENT
2021-05-17  9:17                                                       ` CHIGOT, CLEMENT
2021-06-08  6:59                                                         ` CHIGOT, CLEMENT
2021-06-09 14:50                                                           ` Rainer Orth [this message]
2021-07-21 12:00                                                             ` CHIGOT, CLEMENT
2021-07-21 13:04                                                               ` Rainer Orth
2021-07-22 12:09                                                                 ` CHIGOT, CLEMENT
2021-07-22 12:19                                                                   ` Rainer Orth
2021-07-30 14:02                                                                     ` CHIGOT, CLEMENT
2022-03-16  9:57                                                                       ` CHIGOT, CLEMENT
2021-01-22 11:12                                       ` Jonathan Wakely
2021-01-22 11:02                                     ` Jonathan Wakely
2021-01-12 16:00             ` Rainer Orth
     [not found]   ` <PA4PR02MB6686C2022E2B42D82DC9F269EAAB0@PA4PR02MB6686.eurprd02.prod.outlook.com>
2021-01-11 15:38     ` Rainer Orth

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=ydd35trm6ro.fsf@CeBiTec.Uni-Bielefeld.DE \
    --to=ro@cebitec.uni-bielefeld.de \
    --cc=clement.chigot@atos.net \
    --cc=dje.gcc@gmail.com \
    --cc=jwakely@redhat.com \
    --cc=libstdc++@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).