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 <nat...@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 <ja...@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