public inbox for libstdc++@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] libstdc++: Fix 28_regex/basic_regex/84110.cc on Solaris
@ 2021-10-25 12:01 Rainer Orth
  2021-10-26  9:15 ` Jonathan Wakely
  0 siblings, 1 reply; 2+ messages in thread
From: Rainer Orth @ 2021-10-25 12:01 UTC (permalink / raw)
  To: gcc-patches; +Cc: libstdc++

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

28_regex/basic_regex/84110.cc currently FAILs on Solaris:

FAIL: 28_regex/basic_regex/84110.cc (test for excess errors)
UNRESOLVED: 28_regex/basic_regex/84110.cc compilation failed to produce executable

Excess errors:
/vol/gcc/src/hg/master/local/libstdc++-v3/testsuite/28_regex/basic_regex/84110.cc:14: error: reference to 'extended' is ambiguous

The issue is seen in the full output:

/vol/gcc/src/hg/master/local/libstdc++-v3/testsuite/28_regex/basic_regex/84110.cc: In function ‘void test01()’:
/vol/gcc/src/hg/master/local/libstdc++-v3/testsuite/28_regex/basic_regex/84110.cc:14: error: reference to ‘extended’ is ambiguous
In file included from /var/gcc/regression/master/11.4-gcc-gas/build/gcc/include-fixed/math.h:391,
                 from /var/gcc/regression/master/11.4-gcc-gas/build/i386-pc-solaris2.11/libstdc++-v3/include/cmath:45,
                 from /vol/gcc/src/hg/master/local/libstdc++-v3/include/precompiled/stdc++.h:41:
/usr/include/floatingpoint.h:73: note: candidates are: ‘typedef unsigned int extended [3]’

Fixed by qualifying extended.  Tested on i386-pc-solaris2.11,
sparc-sun-solaris2.11, and x86_64-pc-linux-gnu.

Ok for master?

I'm not certain if this is the best fix, though.

	Rainer

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


2021-10-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>

	libstdc++-v3:
	* testsuite/28_regex/basic_regex/84110.cc (test01)
	[__cpp_exceptions]: Disambiguate extended.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: sol2-libstdc++-84110.patch --]
[-- Type: text/x-patch, Size: 610 bytes --]

# HG changeset patch
# Parent  1a71c5553268184d62ac25cc8838e7ad096199b3
libstdc++: Fix 28_regex/basic_regex/84110.cc on Solaris

diff --git a/libstdc++-v3/testsuite/28_regex/basic_regex/84110.cc b/libstdc++-v3/testsuite/28_regex/basic_regex/84110.cc
--- a/libstdc++-v3/testsuite/28_regex/basic_regex/84110.cc
+++ b/libstdc++-v3/testsuite/28_regex/basic_regex/84110.cc
@@ -11,7 +11,7 @@ void test01()
 
 #if __cpp_exceptions
   using namespace std::regex_constants;
-  for (auto syn : {basic, extended, awk, grep, egrep})
+  for (auto syn : {basic, std::regex::extended, awk, grep, egrep})
   {
     try
     {

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] libstdc++: Fix 28_regex/basic_regex/84110.cc on Solaris
  2021-10-25 12:01 [PATCH] libstdc++: Fix 28_regex/basic_regex/84110.cc on Solaris Rainer Orth
@ 2021-10-26  9:15 ` Jonathan Wakely
  0 siblings, 0 replies; 2+ messages in thread
From: Jonathan Wakely @ 2021-10-26  9:15 UTC (permalink / raw)
  To: Rainer Orth; +Cc: gcc-patches, libstdc++

On Mon, 25 Oct 2021 at 13:09, Rainer Orth wrote:
>
> 28_regex/basic_regex/84110.cc currently FAILs on Solaris:
>
> FAIL: 28_regex/basic_regex/84110.cc (test for excess errors)
> UNRESOLVED: 28_regex/basic_regex/84110.cc compilation failed to produce executable
>
> Excess errors:
> /vol/gcc/src/hg/master/local/libstdc++-v3/testsuite/28_regex/basic_regex/84110.cc:14: error: reference to 'extended' is ambiguous
>
> The issue is seen in the full output:
>
> /vol/gcc/src/hg/master/local/libstdc++-v3/testsuite/28_regex/basic_regex/84110.cc: In function ‘void test01()’:
> /vol/gcc/src/hg/master/local/libstdc++-v3/testsuite/28_regex/basic_regex/84110.cc:14: error: reference to ‘extended’ is ambiguous
> In file included from /var/gcc/regression/master/11.4-gcc-gas/build/gcc/include-fixed/math.h:391,
>                  from /var/gcc/regression/master/11.4-gcc-gas/build/i386-pc-solaris2.11/libstdc++-v3/include/cmath:45,
>                  from /vol/gcc/src/hg/master/local/libstdc++-v3/include/precompiled/stdc++.h:41:
> /usr/include/floatingpoint.h:73: note: candidates are: ‘typedef unsigned int extended [3]’
>
> Fixed by qualifying extended.  Tested on i386-pc-solaris2.11,
> sparc-sun-solaris2.11, and x86_64-pc-linux-gnu.
>
> Ok for master?
>
> I'm not certain if this is the best fix, though.

Yeah, it's a bit odd to have only one of them qualified. I'll probably
forget why it's like that and remove it again to make it consistent
;-)

Please do:

using namespace std::regex_constants;
// See https://gcc.gnu.org/pipermail/gcc-patches/2021-October/582486.html
using std::regex_constants::extended;

(There's no difference between std::regex::extended and
std::regex_constants::extended, but we might as well consistently
qualify it one way or the other in a given scope).

OK for master like that - thanks!

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-10-26  9:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-25 12:01 [PATCH] libstdc++: Fix 28_regex/basic_regex/84110.cc on Solaris Rainer Orth
2021-10-26  9:15 ` Jonathan Wakely

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).