aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp
diff options
context:
space:
mode:
authorPaolo Carlini <paolo.carlini@oracle.com>2011-12-31 17:29:30 +0000
committerPaolo Carlini <paolo@gcc.gnu.org>2011-12-31 17:29:30 +0000
commit32210fd616cd79ae540b9731e7efa9288ccc0b87 (patch)
tree783c6fc1ba99d5694094e6f5fd680a6886425ad0 /gcc/cp
parent553fb1c20117027fd5a352987f4773736f9f3382 (diff)
downloadgcc-32210fd616cd79ae540b9731e7efa9288ccc0b87.zip
gcc-32210fd616cd79ae540b9731e7efa9288ccc0b87.tar.gz
gcc-32210fd616cd79ae540b9731e7efa9288ccc0b87.tar.bz2
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
Diffstat (limited to 'gcc/cp')
-rw-r--r--gcc/cp/ChangeLog6
-rw-r--r--gcc/cp/semantics.c2
2 files changed, 7 insertions, 1 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 309738c..5065989 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -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
diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c
index bad418f..835632f 100644
--- a/gcc/cp/semantics.c
+++ b/gcc/cp/semantics.c
@@ -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");