]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR c++/34918 (Broken diagnostic: 'vector_cst' not supported by dump_expr)
authorJakub Jelinek <jakub@redhat.com>
Tue, 22 Jan 2008 16:22:06 +0000 (17:22 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Tue, 22 Jan 2008 16:22:06 +0000 (17:22 +0100)
PR c++/34918
* error.c (dump_expr): Handle VECTOR_CST.

* g++.dg/other/error23.C: New test.

From-SVN: r131727

gcc/cp/ChangeLog
gcc/cp/error.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/other/error23.C [new file with mode: 0644]

index 807f1b5be45f0d6ef767f07cb24d7325c0365dbe..b039b37b30cd900284215b99fdeab4e408ad9c22 100644 (file)
@@ -1,3 +1,8 @@
+2008-01-22  Jakub Jelinek  <jakub@redhat.com>
+
+       PR c++/34918
+       * error.c (dump_expr): Handle VECTOR_CST.
+
 2008-01-21  Jason Merrill  <jason@redhat.com>
 
        PR c++/33959
index 94f108e5c3777b320a887d09bc89fa247c479925..af86cf5916aadad0d79c96ecbc48d3662da9045b 100644 (file)
@@ -1,7 +1,7 @@
 /* Call-backs for C++ error reporting.
    This code is non-reentrant.
    Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2002,
-   2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
+   2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
    This file is part of GCC.
 
 GCC is free software; you can redistribute it and/or modify
@@ -2079,6 +2079,7 @@ dump_expr (tree t, int flags)
     case VEC_DELETE_EXPR:
     case MODOP_EXPR:
     case ABS_EXPR:
+    case VECTOR_CST:
       pp_expression (cxx_pp, t);
       break;
 
index 7f0c716a0698578fb7cd105ee07e276aaf8275f4..7447d479e0335b66eb0bb6d9f0f8751814ca8dc5 100644 (file)
@@ -1,5 +1,8 @@
 2008-01-22  Jakub Jelinek  <jakub@redhat.com>
 
+       PR c++/34918
+       * g++.dg/other/error23.C: New test.
+
        PR c++/34917
        * g++.dg/ext/vector12.C: New test.
 
diff --git a/gcc/testsuite/g++.dg/other/error23.C b/gcc/testsuite/g++.dg/other/error23.C
new file mode 100644 (file)
index 0000000..d919cda
--- /dev/null
@@ -0,0 +1,5 @@
+// PR c++/34918
+// { dg-do compile }
+
+int v __attribute ((vector_size (8)));
+bool b = !(v - v);     // { dg-error "could not convert .\\(int __vector__\\)\\{0, 0\\}. to .bool.|in argument to unary" }