This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH[ Fix pr87269.C testcase
- From: Jason Merrill <jason at redhat dot com>
- To: Jakub Jelinek <jakub at redhat dot com>, Nathan Sidwell <nathan at acm dot org>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 5 Dec 2018 20:12:18 -0500
- Subject: Re: [PATCH[ Fix pr87269.C testcase
- References: <ca8aaf78-83dc-1e5b-adf4-d2161e30c8df@acm.org> <20181116205050.GK11625@tucnak>
On 11/16/18 3:50 PM, Jakub Jelinek wrote:
On Fri, Nov 16, 2018 at 10:01:05AM -0500, Nathan Sidwell wrote:
2018-11-16 Nathan Sidwell <nathan@acm.org>
PR c++/87269
* parser.c (lookup_literal_operator): Mark overload for keeping
when inside template. Refactor.
* g++.dg/lookup/pr87269.C: New.
This test fails on i686-linux (and on any other where std::size_t is
not unsigned long.
Fixed thusly, tested on x86_64-linux and i686-linux, ok for trunk?
OK. This sort of fix qualifies as obvious IMO.
2018-11-16 Jakub Jelinek <jakub@redhat.com>
PR c++/87269
* g++.dg/lookup/pr87269.C (std::size_t): New typedef.
(operator"" _a) Change unsigned long type to std::size_t.
--- gcc/testsuite/g++.dg/lookup/pr87269.C.jj 2018-11-16 17:33:44.534188632 +0100
+++ gcc/testsuite/g++.dg/lookup/pr87269.C 2018-11-16 21:48:00.243033194 +0100
@@ -1,8 +1,12 @@
// { dg-do compile { target c++11 } }
// PR c++/87269 ICE failing to keep a lookup
+namespace std {
+ typedef decltype (sizeof (0)) size_t;
+}
+
namespace {
- void operator"" _a (const char *, unsigned long) {}
+ void operator"" _a (const char *, std::size_t) {}
}
void operator"" _a (unsigned long long);
Jakub