re PR c++/37217 (-Wconversion causes ICE with __builtin_strcmp with one char compare)

2008-08-27  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>

	PR 37217
	* c-common.c (conversion_warning): Check for null operands.
testsuite/
	* gcc.dg/pr37217.c: New.

From-SVN: r139682
parent e9527cfd
2008-08-27 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
PR 37217
* c-common.c (convesion_warning): Check for null operands.
2008-08-27 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
PR c/31673
* c-decl.c (check_for_loop_decls): Improve error message. Give
hint.
......
......@@ -1568,7 +1568,7 @@ conversion_warning (tree type, tree expr)
for (i = 0; i < expr_num_operands; i++)
{
tree op = TREE_OPERAND (expr, i);
if (DECL_P (op) && DECL_ARTIFICIAL (op))
if (op && DECL_P (op) && DECL_ARTIFICIAL (op))
return;
}
......
2008-08-27 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
PR 37217
* gcc.dg/pr37217.c: New.
2008-08-27 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
PR c/31673
* gcc.dg/c90-fordecl-1.c: Update.
......
/* PR 37217 ICE with -Wconversion */
/* { dg-do compile } */
/* { dg-options "-Wconversion" } */
typedef struct Tcl_ResolvedVarInfo {
char *re_guts;
} regex_t;
void TclReComp(regex_t *re)
{
if (re->re_guts == ((void *)0)) ;
}
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