re PR c++/51397 (static_assert message formatting)
/cp 2011-12-31 Paolo Carlini <paolo.carlini@oracle.com> PR c++/51397 * semantics.c (finish_static_assert): Use %s instead of %E for the error message. /testsuite 2011-12-31 Paolo Carlini <paolo.carlini@oracle.com> PR c++/51397 * g++.dg/cpp0x/static_assert6.C: New. From-SVN: r182757
This commit is contained in:
parent
553fb1c201
commit
32210fd616
@ -1,3 +1,9 @@
|
||||
2011-12-31 Paolo Carlini <paolo.carlini@oracle.com>
|
||||
|
||||
PR c++/51397
|
||||
* semantics.c (finish_static_assert): Use %s instead of %E for
|
||||
the error message.
|
||||
|
||||
2011-12-27 Fabien Chêne <fabien@gcc.gnu.org>
|
||||
|
||||
PR c++/23211
|
||||
|
@ -5127,7 +5127,7 @@ finish_static_assert (tree condition, tree message, location_t location,
|
||||
if (TREE_CODE (condition) == INTEGER_CST
|
||||
&& integer_zerop (condition))
|
||||
/* Report the error. */
|
||||
error ("static assertion failed: %E", message);
|
||||
error ("static assertion failed: %s", TREE_STRING_POINTER (message));
|
||||
else if (condition && condition != error_mark_node)
|
||||
{
|
||||
error ("non-constant condition for static assertion");
|
||||
|
@ -1,3 +1,8 @@
|
||||
2011-12-31 Paolo Carlini <paolo.carlini@oracle.com>
|
||||
|
||||
PR c++/51397
|
||||
* g++.dg/cpp0x/static_assert6.C: New.
|
||||
|
||||
2011-12-31 Uros Bizjak <ubizjak@gmail.com>
|
||||
|
||||
* gcc.dg/tree-ssa/vrp47: Pass -march=i586 for ia32 target.
|
||||
|
4
gcc/testsuite/g++.dg/cpp0x/static_assert6.C
Normal file
4
gcc/testsuite/g++.dg/cpp0x/static_assert6.C
Normal file
@ -0,0 +1,4 @@
|
||||
// PR c++/51397
|
||||
// { dg-options "-std=c++0x" }
|
||||
|
||||
static_assert('X' != '\130', "'X' has the wrong value"); // { dg-error "'X' has the wrong value" }
|
Loading…
Reference in New Issue
Block a user