Commit dd90d2b2 by Richard Henderson Committed by Andrew Pinski

re PR c++/14329 ([4.1 only] badly formatted warnings for SRA replacements used uninitialized)

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.




Co-Authored-By: Andrew Pinski <pinskia@gmail.com>

From-SVN: r119478
parent bd6a0889
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
......
......@@ -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;
......
2006-12-03 Richard Henderson <rth@redhat.com>
Andrew Pinski <pinskia@gmail.com>
PR C++/14329
* g++.dg/warn/unit-1.C: New test.
2006-12-03 Uros Bizjak <ubizjak@gmail.com>
* gcc.dg/visibility-11.c: Compile with -mstringop-strategy=libcall.
/* { dg-do compile } */
/* { dg-options "-O2 -Wuninitialized" } */
struct a { int mode; };
int sys_msgctl (void)
{
struct a setbuf; /* { dg-warning "'setbuf\.a::mode' is used" } */
return setbuf.mode;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment