aboutsummaryrefslogtreecommitdiff
path: root/gcc/c-common.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/c-common.c')
-rw-r--r--gcc/c-common.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/c-common.c b/gcc/c-common.c
index 1fb5a6a..1cef321 100644
--- a/gcc/c-common.c
+++ b/gcc/c-common.c
@@ -2501,7 +2501,9 @@ c_common_truthvalue_conversion (tree expr)
{
tree inner = TREE_OPERAND (expr, 0);
if (DECL_P (inner)
- && (TREE_CODE (inner) == PARM_DECL || !DECL_WEAK (inner)))
+ && (TREE_CODE (inner) == PARM_DECL
+ || TREE_CODE (inner) == LABEL_DECL
+ || !DECL_WEAK (inner)))
{
/* Common Ada/Pascal programmer's mistake. We always warn
about this since it is so bad. */