diff options
author | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-03-10 19:43:16 +0000 |
---|---|---|
committer | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-03-10 19:43:16 +0000 |
commit | fc47df6871f871915bd8f3a6b117a4b4b0ba02a0 (patch) | |
tree | 2bdf8189fe3bf35af3815ca8e41eec34b41f78ca /gcc/cp | |
parent | 50389d5d3edc2cce6cf4ae18853aeaa90b70aaad (diff) | |
download | gcc-fc47df6871f871915bd8f3a6b117a4b4b0ba02a0.tar.gz |
PR c++/35337
* semantics.c (finish_omp_clauses): Use %qD instead of %qE for
DECL_P in not a variable and appears more than once error messages.
* g++.dg/gomp/pr35337.C: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@133086 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp')
-rw-r--r-- | gcc/cp/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/cp/semantics.c | 14 |
2 files changed, 16 insertions, 4 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 6415063aa79..4ae8f17330f 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,9 @@ +2008-03-10 Jakub Jelinek <jakub@redhat.com> + + PR c++/35337 + * semantics.c (finish_omp_clauses): Use %qD instead of %qE for + DECL_P in not a variable and appears more than once error messages. + 2008-03-07 Paolo Bonzini <bonzini@gnu.org> Revert: diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c index 472c5cc72f2..2ee67cbf4dc 100644 --- a/gcc/cp/semantics.c +++ b/gcc/cp/semantics.c @@ -3400,13 +3400,16 @@ finish_omp_clauses (tree clauses) { if (processing_template_decl) break; - error ("%qE is not a variable in clause %<firstprivate%>", t); + if (DECL_P (t)) + error ("%qD is not a variable in clause %<firstprivate%>", t); + else + error ("%qE is not a variable in clause %<firstprivate%>", t); remove = true; } else if (bitmap_bit_p (&generic_head, DECL_UID (t)) || bitmap_bit_p (&firstprivate_head, DECL_UID (t))) { - error ("%qE appears more than once in data clauses", t); + error ("%qD appears more than once in data clauses", t); remove = true; } else @@ -3419,13 +3422,16 @@ finish_omp_clauses (tree clauses) { if (processing_template_decl) break; - error ("%qE is not a variable in clause %<lastprivate%>", t); + if (DECL_P (t)) + error ("%qD is not a variable in clause %<lastprivate%>", t); + else + error ("%qE is not a variable in clause %<lastprivate%>", t); remove = true; } else if (bitmap_bit_p (&generic_head, DECL_UID (t)) || bitmap_bit_p (&lastprivate_head, DECL_UID (t))) { - error ("%qE appears more than once in data clauses", t); + error ("%qD appears more than once in data clauses", t); remove = true; } else |