This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH, PR C++/61038] - g++ -E is unusable with UDL strings
- From: Andreas Schwab <schwab at suse dot de>
- To: Ed Smith-Rowland <3dw4rd at verizon dot net>
- Cc: gcc-patches <gcc-patches at gcc dot gnu dot org>, Jason Merrill <jason at redhat dot com>
- Date: Wed, 21 May 2014 11:37:03 +0200
- Subject: Re: [PATCH, PR C++/61038] - g++ -E is unusable with UDL strings
- Authentication-results: sourceware.org; auth=none
- References: <5371859C dot 3050502 at verizon dot net>
Ed Smith-Rowland <3dw4rd@verizon.net> writes:
> Index: ../gcc/testsuite/g++.dg/cpp0x/pr61038.C
> ===================================================================
> --- ../gcc/testsuite/g++.dg/cpp0x/pr61038.C (revision 0)
> +++ ../gcc/testsuite/g++.dg/cpp0x/pr61038.C (working copy)
> @@ -0,0 +1,23 @@
> +// PR c++/61038
> +// { dg-do compile { target c++11 } }
> +// { dg-options "-E" }
> +
> +void
> +operator "" _s(const char *, unsigned long)
../../gcc/gcc/testsuite/g++.dg/cpp0x/pr61038.C:8:43: error: âvoid operator""_s(const char*, long unsigned int)â has invalid argument list
Andreas.
* g++.dg/cpp0x/pr61038.C (operator "" _s): Use size_t.
Index: g++.dg/cpp0x/pr61038.C
===================================================================
--- g++.dg/cpp0x/pr61038.C (revision 210686)
+++ g++.dg/cpp0x/pr61038.C (working copy)
@@ -5,7 +5,7 @@
#include <cstdlib>
void
-operator "" _s(const char *, unsigned long)
+operator "" _s(const char *, size_t)
{ }
void
--
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."