mirror of git://gcc.gnu.org/git/gcc.git
re PR c++/52521 ([C++11] user defined literals and order of declaration)
PR c++/52521 * mangle.c (write_literal_operator_name): The length comes after the operator prefix. From-SVN: r185079
This commit is contained in:
parent
12fc7dea65
commit
5ceb809d01
|
@ -1,3 +1,9 @@
|
||||||
|
2012-03-07 Jason Merrill <jason@redhat.com>
|
||||||
|
|
||||||
|
PR c++/52521
|
||||||
|
* mangle.c (write_literal_operator_name): The length comes after the
|
||||||
|
operator prefix.
|
||||||
|
|
||||||
2012-03-05 Jakub Jelinek <jakub@redhat.com>
|
2012-03-05 Jakub Jelinek <jakub@redhat.com>
|
||||||
|
|
||||||
* pt.c (local_specializations): Change from htab_t into
|
* pt.c (local_specializations): Change from htab_t into
|
||||||
|
|
|
@ -1292,18 +1292,16 @@ write_source_name (tree identifier)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Write a user-defined literal operator.
|
/* Write a user-defined literal operator.
|
||||||
|
::= li <source-name> # "" <source-name>
|
||||||
IDENTIFIER is an LITERAL_IDENTIFIER_NODE. */
|
IDENTIFIER is an LITERAL_IDENTIFIER_NODE. */
|
||||||
|
|
||||||
static void
|
static void
|
||||||
write_literal_operator_name (tree identifier)
|
write_literal_operator_name (tree identifier)
|
||||||
{
|
{
|
||||||
const char* suffix = UDLIT_OP_SUFFIX (identifier);
|
const char* suffix = UDLIT_OP_SUFFIX (identifier);
|
||||||
char* buffer = XNEWVEC (char, strlen (UDLIT_OP_MANGLED_PREFIX)
|
write_identifier (UDLIT_OP_MANGLED_PREFIX);
|
||||||
+ strlen (suffix) + 10);
|
write_unsigned_number (strlen (suffix));
|
||||||
sprintf (buffer, UDLIT_OP_MANGLED_FORMAT, suffix);
|
write_identifier (suffix);
|
||||||
|
|
||||||
write_unsigned_number (strlen (buffer));
|
|
||||||
write_identifier (buffer);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Encode 0 as _, and 1+ as n-1_. */
|
/* Encode 0 as _, and 1+ as n-1_. */
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
|
2012-03-07 Jason Merrill <jason@redhat.com>
|
||||||
|
|
||||||
|
PR c++/52521
|
||||||
|
* g++.dg/cpp0x/udlit-mangle.C: New.
|
||||||
|
|
||||||
2012-03-06 Pat Haugen <pthaugen@us.ibm.com>
|
2012-03-06 Pat Haugen <pthaugen@us.ibm.com>
|
||||||
|
|
||||||
* gcc.dg/torture/va-arg-25.c: Fix typo for powerpc64-*-* check.
|
* gcc.dg/torture/va-arg-25.c: Fix typo for powerpc64-*-* check.
|
||||||
|
|
|
@ -0,0 +1,8 @@
|
||||||
|
// PR c++/52521
|
||||||
|
// { dg-options -std=c++0x }
|
||||||
|
// { dg-final { scan-assembler "_Zli2_wPKc" } }
|
||||||
|
|
||||||
|
int operator "" _w(const char*);
|
||||||
|
int main() {
|
||||||
|
123_w;
|
||||||
|
}
|
Loading…
Reference in New Issue