diff options
author | pinskia <pinskia@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-12-04 02:24:42 +0000 |
---|---|---|
committer | pinskia <pinskia@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-12-04 02:24:42 +0000 |
commit | 2947608c10b46f11a22d2ee1d4976eb52185f499 (patch) | |
tree | 2e4aa196c51f94d752ebcab9cde74543444bda3a /gcc/cp | |
parent | a47cd78650ce6b82271133e1c319674401e0b4cb (diff) | |
download | gcc-2947608c10b46f11a22d2ee1d4976eb52185f499.tar.gz |
2006-12-03 Richard Henderson <rth@redhat.com>
Andrew Pinski <pinskia@gmail.com>
PR C++/14329
* error.c (cp_printer) <'D'>: Handle DECL_DEBUG_EXPR.
2006-12-03 Richard Henderson <rth@redhat.com>
Andrew Pinski <pinskia@gmail.com>
PR C++/14329
* g++.dg/warn/unit-1.C: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@119478 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp')
-rw-r--r-- | gcc/cp/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/cp/error.c | 17 |
2 files changed, 22 insertions, 1 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index cfd933c314d..7e482c01e1d 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,9 @@ +2006-12-03 Richard Henderson <rth@redhat.com> + Andrew Pinski <pinskia@gmail.com> + + PR C++/14329 + * error.c (cp_printer) <'D'>: Handle DECL_DEBUG_EXPR. + 2006-12-02 Andrew Pinski <andrew_pinski@playstation.sony.com> PR C++/30033 diff --git a/gcc/cp/error.c b/gcc/cp/error.c index c4f4d461c2f..49f3367d743 100644 --- a/gcc/cp/error.c +++ b/gcc/cp/error.c @@ -2337,7 +2337,22 @@ cp_printer (pretty_printer *pp, text_info *text, const char *spec, { case 'A': result = args_to_string (next_tree, verbose); break; case 'C': result = code_to_string (next_tcode); break; - case 'D': result = decl_to_string (next_tree, verbose); break; + case 'D': + { + tree temp = next_tree; + if (DECL_P (temp) + && DECL_DEBUG_EXPR_IS_FROM (temp) && DECL_DEBUG_EXPR (temp)) + { + temp = DECL_DEBUG_EXPR (temp); + if (!DECL_P (temp)) + { + result = expr_to_string (temp); + break; + } + } + result = decl_to_string (temp, verbose); + } + break; case 'E': result = expr_to_string (next_tree); break; case 'F': result = fndecl_to_string (next_tree, verbose); break; case 'L': result = language_to_string (next_lang); break; |