From: Kamil Dudka <kdudka@redhat.com>
To: Pavel Roskin <proski@gnu.org>
Cc: Josh Triplett <josh@joshtriplett.org>,
Christopher Li <sparse@chrisli.org>,
linux-sparse@vger.kernel.org
Subject: Re: Sparse crash when mixing int and enum in ternary operator
Date: Wed, 10 Mar 2010 00:30:49 +0100 [thread overview]
Message-ID: <201003100030.50165.kdudka@redhat.com> (raw)
In-Reply-To: <201003092129.16118.kdudka@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 544 bytes --]
On Tuesday 09 of March 2010 21:29:15 Kamil Dudka wrote:
> Unfortunately it's not that easy. I am still getting a non-sense warning
> for:
>
> static void foo(void)
> {
> enum { VAL } y, x = VAL;
> y = x ?: VAL;
> }
>
> $ ./sparse enum.c
> enum.c:4:9: warning: conversion of
> enum.c:4:9: int to
> enum.c:4:9: int enum <noident>
>
> I need to somehow get over the EXPR_IMPLIED_CAST to dig the original
> enum_type from there...
Hopefully I got it. The promissed fix, which includes new test-cases for ?:,
is attached.
Kamil
[-- Attachment #2: 0001--Wenum-mismatch-now-works-better-with-conditional-op.patch --]
[-- Type: text/x-diff, Size: 17053 bytes --]
From b6aa6a18318c83e317b1488ce9c0409e109d89fa Mon Sep 17 00:00:00 2001
From: Kamil Dudka <kdudka@redhat.com>
Date: Tue, 9 Mar 2010 23:45:25 +0100
Subject: [PATCH 1/2] -Wenum-mismatch now works better with conditional op.
It used to crash instead of reporting the warnings properly. Reported by
Pavel Roskin. Additionally noticed that -Wenum-to-int is too noisy, it should
be emitted only for assignments.
Signed-off-by: Kamil Dudka <kdudka@redhat.com>
---
evaluate.c | 28 +++++++++++-
validation/enum-common.c | 15 ++++++
validation/enum-from-int.c | 63 +++++++++++++++-----------
validation/enum-mismatch.c | 100 ++++++++++++++++++++++++++----------------
validation/enum-to-int.c | 105 ++++++++++++++++++++++++++++++++++++--------
5 files changed, 227 insertions(+), 84 deletions(-)
diff --git a/evaluate.c b/evaluate.c
index d3d5e6f..b4c2758 100644
--- a/evaluate.c
+++ b/evaluate.c
@@ -327,13 +327,39 @@ warn_for_int_to_enum_conversion (struct expression *expr, struct symbol *typeb)
}
static void
-warn_for_enum_conversions(struct expression *expr, struct symbol *type)
+do_warn_for_enum_conversions(struct expression *expr, struct symbol *type)
{
+ if (expr && expr->type == EXPR_IMPLIED_CAST)
+ /* look through the enum/int implied cast */
+ expr = expr->cast_expression;
+
+ if (!expr || !type)
+ /* do not crash when there is nothing to check */
+ return;
+
warn_for_different_enum_types (expr, type);
warn_for_enum_to_int_conversion (expr, type);
warn_for_int_to_enum_conversion (expr, type);
}
+static void
+warn_for_enum_conversions(struct expression *expr, struct symbol *type)
+{
+ switch (expr->type) {
+ case EXPR_CONDITIONAL:
+ case EXPR_SELECT:
+ do_warn_for_enum_conversions(expr->cond_true
+ /* handle the "?:" quirk */
+ ?: expr->conditional,
+ type);
+ do_warn_for_enum_conversions(expr->cond_false, type);
+ break;
+
+ default:
+ do_warn_for_enum_conversions(expr, type);
+ }
+}
+
/*
* This gets called for implicit casts in assignments and
* integer promotion. We often want to try to move the
diff --git a/validation/enum-common.c b/validation/enum-common.c
index f940fef..06fedac 100644
--- a/validation/enum-common.c
+++ b/validation/enum-common.c
@@ -46,6 +46,10 @@ static void always_ok(void)
default:
take_int(VALUE_C);
}
+
+ var_a = var_b ? var_a : VALUE_A;
+ var_b = VALUE_A ? VALUE_B : var_b;
+ take_enum_of_type_a(var_a ?: var_a);
}
static void trigger_enum_mismatch(void)
@@ -74,6 +78,13 @@ static void trigger_enum_mismatch(void)
var_a = VALUE_B;
var_b = VALUE_C;
anon_enum_var = VALUE_A;
+
+ // conditional operator
+ anon_enum_var = i ? VALUE_A : VALUE_B;
+ var_a = anon_enum_var ? VALUE_A : VALUE_B;
+ var_b = anon_enum_var ? VALUE_A : VALUE_B;
+ take_enum_of_type_a(var_a ?: var_b);
+ take_enum_of_type_a(var_b ?: var_a);
}
static void trigger_int_to_enum_conversion(void)
@@ -90,6 +101,10 @@ static void trigger_int_to_enum_conversion(void)
anon_enum_var = i;
var_a = (int) VALUE_A;
var_a = (int) VALUE_B;
+
+ // conditional operator
+ take_enum_of_type_a(var_a ?: i);
+ take_enum_of_type_a(i ?: var_a);
}
static void trigger_enum_to_int_conversion(void)
diff --git a/validation/enum-from-int.c b/validation/enum-from-int.c
index 15b1e4d..92a7e94 100644
--- a/validation/enum-from-int.c
+++ b/validation/enum-from-int.c
@@ -5,32 +5,41 @@
* check-command: sparse -Wno-enum-mismatch $file
*
* check-error-start
-enum-common.c:84:45: warning: conversion of
-enum-common.c:84:45: int to
-enum-common.c:84:45: int enum ENUM_TYPE_A
-enum-common.c:85:45: warning: conversion of
-enum-common.c:85:45: int to
-enum-common.c:85:45: int enum ENUM_TYPE_A
-enum-common.c:82:22: warning: conversion of
-enum-common.c:82:22: int to
-enum-common.c:82:22: int enum ENUM_TYPE_A
-enum-common.c:87:17: warning: conversion of
-enum-common.c:87:17: int to
-enum-common.c:87:17: int enum ENUM_TYPE_A
-enum-common.c:88:17: warning: conversion of
-enum-common.c:88:17: int to
-enum-common.c:88:17: int enum ENUM_TYPE_B
-enum-common.c:89:25: warning: conversion of
-enum-common.c:89:25: int to
-enum-common.c:89:25: int enum <noident>
-enum-common.c:90:25: warning: conversion of
-enum-common.c:90:25: int to
-enum-common.c:90:25: int enum <noident>
-enum-common.c:91:18: warning: conversion of
-enum-common.c:91:18: int to
-enum-common.c:91:18: int enum ENUM_TYPE_A
-enum-common.c:92:18: warning: conversion of
-enum-common.c:92:18: int to
-enum-common.c:92:18: int enum ENUM_TYPE_A
+enum-common.c:95:45: warning: conversion of
+enum-common.c:95:45: int to
+enum-common.c:95:45: int enum ENUM_TYPE_A
+enum-common.c:96:45: warning: conversion of
+enum-common.c:96:45: int to
+enum-common.c:96:45: int enum ENUM_TYPE_A
+enum-common.c:93:22: warning: conversion of
+enum-common.c:93:22: int to
+enum-common.c:93:22: int enum ENUM_TYPE_A
+enum-common.c:98:17: warning: conversion of
+enum-common.c:98:17: int to
+enum-common.c:98:17: int enum ENUM_TYPE_A
+enum-common.c:99:17: warning: conversion of
+enum-common.c:99:17: int to
+enum-common.c:99:17: int enum ENUM_TYPE_B
+enum-common.c:100:25: warning: conversion of
+enum-common.c:100:25: int to
+enum-common.c:100:25: int enum <noident>
+enum-common.c:101:25: warning: conversion of
+enum-common.c:101:25: int to
+enum-common.c:101:25: int enum <noident>
+enum-common.c:102:18: warning: conversion of
+enum-common.c:102:18: int to
+enum-common.c:102:18: int enum ENUM_TYPE_A
+enum-common.c:103:18: warning: conversion of
+enum-common.c:103:18: int to
+enum-common.c:103:18: int enum ENUM_TYPE_A
+enum-common.c:106:38: warning: conversion of
+enum-common.c:106:38: int to
+enum-common.c:106:38: int enum ENUM_TYPE_A
+enum-common.c:107:29: warning: conversion of
+enum-common.c:107:29: int to
+enum-common.c:107:29: int enum ENUM_TYPE_A
+enum-common.c:107:29: warning: conversion of
+enum-common.c:107:29: int to
+enum-common.c:107:29: int enum ENUM_TYPE_A
* check-error-end
*/
diff --git a/validation/enum-mismatch.c b/validation/enum-mismatch.c
index 6db016f..2fc2fea 100644
--- a/validation/enum-mismatch.c
+++ b/validation/enum-mismatch.c
@@ -5,44 +5,68 @@
* check-command: sparse -Wenum-mismatch -Wno-int-to-enum $file
*
* check-error-start
-enum-common.c:57:45: warning: mixing different enum types
-enum-common.c:57:45: int enum ENUM_TYPE_B versus
-enum-common.c:57:45: int enum ENUM_TYPE_A
-enum-common.c:58:45: warning: mixing different enum types
-enum-common.c:58:45: int enum ENUM_TYPE_B versus
-enum-common.c:58:45: int enum ENUM_TYPE_A
-enum-common.c:54:22: warning: mixing different enum types
-enum-common.c:54:22: int enum ENUM_TYPE_B versus
-enum-common.c:54:22: int enum ENUM_TYPE_A
-enum-common.c:55:22: warning: mixing different enum types
-enum-common.c:55:22: int enum <noident> versus
-enum-common.c:55:22: int enum ENUM_TYPE_A
-enum-common.c:64:45: warning: mixing different enum types
-enum-common.c:64:45: int enum <noident> versus
-enum-common.c:64:45: int enum ENUM_TYPE_A
-enum-common.c:65:45: warning: mixing different enum types
-enum-common.c:65:45: int enum <noident> versus
-enum-common.c:65:45: int enum ENUM_TYPE_A
-enum-common.c:62:22: warning: mixing different enum types
-enum-common.c:62:22: int enum ENUM_TYPE_A versus
-enum-common.c:62:22: int enum <noident>
-enum-common.c:69:17: warning: mixing different enum types
-enum-common.c:69:17: int enum ENUM_TYPE_B versus
-enum-common.c:69:17: int enum ENUM_TYPE_A
-enum-common.c:70:17: warning: mixing different enum types
-enum-common.c:70:17: int enum <noident> versus
-enum-common.c:70:17: int enum ENUM_TYPE_B
-enum-common.c:71:25: warning: mixing different enum types
-enum-common.c:71:25: int enum ENUM_TYPE_A versus
-enum-common.c:71:25: int enum <noident>
+enum-common.c:61:45: warning: mixing different enum types
+enum-common.c:61:45: int enum ENUM_TYPE_B versus
+enum-common.c:61:45: int enum ENUM_TYPE_A
+enum-common.c:62:45: warning: mixing different enum types
+enum-common.c:62:45: int enum ENUM_TYPE_B versus
+enum-common.c:62:45: int enum ENUM_TYPE_A
+enum-common.c:58:22: warning: mixing different enum types
+enum-common.c:58:22: int enum ENUM_TYPE_B versus
+enum-common.c:58:22: int enum ENUM_TYPE_A
+enum-common.c:59:22: warning: mixing different enum types
+enum-common.c:59:22: int enum <noident> versus
+enum-common.c:59:22: int enum ENUM_TYPE_A
+enum-common.c:68:45: warning: mixing different enum types
+enum-common.c:68:45: int enum <noident> versus
+enum-common.c:68:45: int enum ENUM_TYPE_A
+enum-common.c:69:45: warning: mixing different enum types
+enum-common.c:69:45: int enum <noident> versus
+enum-common.c:69:45: int enum ENUM_TYPE_A
+enum-common.c:66:22: warning: mixing different enum types
+enum-common.c:66:22: int enum ENUM_TYPE_A versus
+enum-common.c:66:22: int enum <noident>
+enum-common.c:73:17: warning: mixing different enum types
+enum-common.c:73:17: int enum ENUM_TYPE_B versus
+enum-common.c:73:17: int enum ENUM_TYPE_A
enum-common.c:74:17: warning: mixing different enum types
-enum-common.c:74:17: int enum ENUM_TYPE_B versus
-enum-common.c:74:17: int enum ENUM_TYPE_A
-enum-common.c:75:17: warning: mixing different enum types
-enum-common.c:75:17: int enum <noident> versus
-enum-common.c:75:17: int enum ENUM_TYPE_B
-enum-common.c:76:25: warning: mixing different enum types
-enum-common.c:76:25: int enum ENUM_TYPE_A versus
-enum-common.c:76:25: int enum <noident>
+enum-common.c:74:17: int enum <noident> versus
+enum-common.c:74:17: int enum ENUM_TYPE_B
+enum-common.c:75:25: warning: mixing different enum types
+enum-common.c:75:25: int enum ENUM_TYPE_A versus
+enum-common.c:75:25: int enum <noident>
+enum-common.c:78:17: warning: mixing different enum types
+enum-common.c:78:17: int enum ENUM_TYPE_B versus
+enum-common.c:78:17: int enum ENUM_TYPE_A
+enum-common.c:79:17: warning: mixing different enum types
+enum-common.c:79:17: int enum <noident> versus
+enum-common.c:79:17: int enum ENUM_TYPE_B
+enum-common.c:80:25: warning: mixing different enum types
+enum-common.c:80:25: int enum ENUM_TYPE_A versus
+enum-common.c:80:25: int enum <noident>
+enum-common.c:83:29: warning: mixing different enum types
+enum-common.c:83:29: int enum ENUM_TYPE_A versus
+enum-common.c:83:29: int enum <noident>
+enum-common.c:83:39: warning: mixing different enum types
+enum-common.c:83:39: int enum ENUM_TYPE_B versus
+enum-common.c:83:39: int enum <noident>
+enum-common.c:84:43: warning: mixing different enum types
+enum-common.c:84:43: int enum ENUM_TYPE_B versus
+enum-common.c:84:43: int enum ENUM_TYPE_A
+enum-common.c:85:33: warning: mixing different enum types
+enum-common.c:85:33: int enum ENUM_TYPE_A versus
+enum-common.c:85:33: int enum ENUM_TYPE_B
+enum-common.c:86:29: warning: mixing different enum types
+enum-common.c:86:29: int enum ENUM_TYPE_A versus
+enum-common.c:86:29: int enum ENUM_TYPE_B
+enum-common.c:86:38: warning: mixing different enum types
+enum-common.c:86:38: int enum ENUM_TYPE_B versus
+enum-common.c:86:38: int enum ENUM_TYPE_A
+enum-common.c:87:29: warning: mixing different enum types
+enum-common.c:87:29: int enum ENUM_TYPE_B versus
+enum-common.c:87:29: int enum ENUM_TYPE_A
+enum-common.c:87:29: warning: mixing different enum types
+enum-common.c:87:29: int enum ENUM_TYPE_B versus
+enum-common.c:87:29: int enum ENUM_TYPE_A
* check-error-end
*/
diff --git a/validation/enum-to-int.c b/validation/enum-to-int.c
index a981ce5..33fdeeb 100644
--- a/validation/enum-to-int.c
+++ b/validation/enum-to-int.c
@@ -5,23 +5,92 @@
* check-command: sparse -Wenum-to-int -Wno-enum-mismatch -Wno-int-to-enum $file
*
* check-error-start
-enum-common.c:97:13: warning: conversion of
-enum-common.c:97:13: int enum ENUM_TYPE_A to
-enum-common.c:97:13: int
-enum-common.c:98:13: warning: conversion of
-enum-common.c:98:13: int enum ENUM_TYPE_B to
-enum-common.c:98:13: int
-enum-common.c:103:34: warning: conversion of
-enum-common.c:103:34: int enum ENUM_TYPE_A to
-enum-common.c:103:34: int
-enum-common.c:104:34: warning: conversion of
-enum-common.c:104:34: int enum ENUM_TYPE_B to
-enum-common.c:104:34: int
-enum-common.c:100:22: warning: conversion of
-enum-common.c:100:22: int enum ENUM_TYPE_A to
-enum-common.c:100:22: int
-enum-common.c:101:22: warning: conversion of
-enum-common.c:101:22: int enum ENUM_TYPE_B to
-enum-common.c:101:22: int
+enum-common.c:50:25: warning: conversion of
+enum-common.c:50:25: int enum ENUM_TYPE_A to
+enum-common.c:50:25: int
+enum-common.c:50:25: warning: conversion of
+enum-common.c:50:25: int enum ENUM_TYPE_A to
+enum-common.c:50:25: int
+enum-common.c:50:33: warning: conversion of
+enum-common.c:50:33: int enum ENUM_TYPE_A to
+enum-common.c:50:33: int
+enum-common.c:51:27: warning: conversion of
+enum-common.c:51:27: int enum ENUM_TYPE_B to
+enum-common.c:51:27: int
+enum-common.c:51:37: warning: conversion of
+enum-common.c:51:37: int enum ENUM_TYPE_B to
+enum-common.c:51:37: int
+enum-common.c:52:29: warning: conversion of
+enum-common.c:52:29: int enum ENUM_TYPE_A to
+enum-common.c:52:29: int
+enum-common.c:52:38: warning: conversion of
+enum-common.c:52:38: int enum ENUM_TYPE_A to
+enum-common.c:52:38: int
+enum-common.c:83:29: warning: conversion of
+enum-common.c:83:29: int enum ENUM_TYPE_A to
+enum-common.c:83:29: int
+enum-common.c:83:29: warning: conversion of
+enum-common.c:83:29: int enum ENUM_TYPE_A to
+enum-common.c:83:29: int
+enum-common.c:83:39: warning: conversion of
+enum-common.c:83:39: int enum ENUM_TYPE_B to
+enum-common.c:83:39: int
+enum-common.c:84:33: warning: conversion of
+enum-common.c:84:33: int enum ENUM_TYPE_A to
+enum-common.c:84:33: int
+enum-common.c:84:33: warning: conversion of
+enum-common.c:84:33: int enum ENUM_TYPE_A to
+enum-common.c:84:33: int
+enum-common.c:84:43: warning: conversion of
+enum-common.c:84:43: int enum ENUM_TYPE_B to
+enum-common.c:84:43: int
+enum-common.c:85:33: warning: conversion of
+enum-common.c:85:33: int enum ENUM_TYPE_A to
+enum-common.c:85:33: int
+enum-common.c:85:33: warning: conversion of
+enum-common.c:85:33: int enum ENUM_TYPE_A to
+enum-common.c:85:33: int
+enum-common.c:85:43: warning: conversion of
+enum-common.c:85:43: int enum ENUM_TYPE_B to
+enum-common.c:85:43: int
+enum-common.c:86:29: warning: conversion of
+enum-common.c:86:29: int enum ENUM_TYPE_A to
+enum-common.c:86:29: int
+enum-common.c:86:38: warning: conversion of
+enum-common.c:86:38: int enum ENUM_TYPE_B to
+enum-common.c:86:38: int
+enum-common.c:87:29: warning: conversion of
+enum-common.c:87:29: int enum ENUM_TYPE_B to
+enum-common.c:87:29: int
+enum-common.c:87:38: warning: conversion of
+enum-common.c:87:38: int enum ENUM_TYPE_A to
+enum-common.c:87:38: int
+enum-common.c:106:29: warning: conversion of
+enum-common.c:106:29: int enum ENUM_TYPE_A to
+enum-common.c:106:29: int
+enum-common.c:106:29: warning: conversion of
+enum-common.c:106:29: int enum ENUM_TYPE_A to
+enum-common.c:106:29: int
+enum-common.c:107:34: warning: conversion of
+enum-common.c:107:34: int enum ENUM_TYPE_A to
+enum-common.c:107:34: int
+enum-common.c:112:13: warning: conversion of
+enum-common.c:112:13: int enum ENUM_TYPE_A to
+enum-common.c:112:13: int
+enum-common.c:113:13: warning: conversion of
+enum-common.c:113:13: int enum ENUM_TYPE_B to
+enum-common.c:113:13: int
+enum-common.c:118:34: warning: conversion of
+enum-common.c:118:34: int enum ENUM_TYPE_A to
+enum-common.c:118:34: int
+enum-common.c:119:34: warning: conversion of
+enum-common.c:119:34: int enum ENUM_TYPE_B to
+enum-common.c:119:34: int
+enum-common.c:115:22: warning: conversion of
+enum-common.c:115:22: int enum ENUM_TYPE_A to
+enum-common.c:115:22: int
+enum-common.c:116:22: warning: conversion of
+enum-common.c:116:22: int enum ENUM_TYPE_B to
+enum-common.c:116:22: int
* check-error-end
*/
--
1.6.1.2
[-- Attachment #3: 0002--Wenum-to-int-is-now-emitted-only-for-and-switch.patch --]
[-- Type: text/x-diff, Size: 4719 bytes --]
From 50a39380f5f97e5c379c6464eff609916175640c Mon Sep 17 00:00:00 2001
From: Kamil Dudka <kdudka@redhat.com>
Date: Wed, 10 Mar 2010 00:15:08 +0100
Subject: [PATCH 2/2] -Wenum-to-int is now emitted only for = and switch
Signed-off-by: Kamil Dudka <kdudka@redhat.com>
---
evaluate.c | 3 +-
validation/enum-to-int.c | 69 ----------------------------------------------
2 files changed, 2 insertions(+), 70 deletions(-)
diff --git a/evaluate.c b/evaluate.c
index b4c2758..9e5f28e 100644
--- a/evaluate.c
+++ b/evaluate.c
@@ -338,7 +338,6 @@ do_warn_for_enum_conversions(struct expression *expr, struct symbol *type)
return;
warn_for_different_enum_types (expr, type);
- warn_for_enum_to_int_conversion (expr, type);
warn_for_int_to_enum_conversion (expr, type);
}
@@ -1473,6 +1472,7 @@ Err:
*rp = cast_to(*rp, target);
return 0;
Cast:
+ warn_for_enum_to_int_conversion (*rp, target);
*rp = cast_to(*rp, target);
return 1;
}
@@ -3352,6 +3352,7 @@ static void check_case_type(struct expression *switch_expr,
if (!switch_type || !case_type)
goto Bad;
+ warn_for_enum_to_int_conversion (case_expr, switch_type);
warn_for_enum_conversions(case_expr, switch_type);
sclass = classify_type(switch_type, &switch_type);
diff --git a/validation/enum-to-int.c b/validation/enum-to-int.c
index 33fdeeb..134a34d 100644
--- a/validation/enum-to-int.c
+++ b/validation/enum-to-int.c
@@ -5,75 +5,6 @@
* check-command: sparse -Wenum-to-int -Wno-enum-mismatch -Wno-int-to-enum $file
*
* check-error-start
-enum-common.c:50:25: warning: conversion of
-enum-common.c:50:25: int enum ENUM_TYPE_A to
-enum-common.c:50:25: int
-enum-common.c:50:25: warning: conversion of
-enum-common.c:50:25: int enum ENUM_TYPE_A to
-enum-common.c:50:25: int
-enum-common.c:50:33: warning: conversion of
-enum-common.c:50:33: int enum ENUM_TYPE_A to
-enum-common.c:50:33: int
-enum-common.c:51:27: warning: conversion of
-enum-common.c:51:27: int enum ENUM_TYPE_B to
-enum-common.c:51:27: int
-enum-common.c:51:37: warning: conversion of
-enum-common.c:51:37: int enum ENUM_TYPE_B to
-enum-common.c:51:37: int
-enum-common.c:52:29: warning: conversion of
-enum-common.c:52:29: int enum ENUM_TYPE_A to
-enum-common.c:52:29: int
-enum-common.c:52:38: warning: conversion of
-enum-common.c:52:38: int enum ENUM_TYPE_A to
-enum-common.c:52:38: int
-enum-common.c:83:29: warning: conversion of
-enum-common.c:83:29: int enum ENUM_TYPE_A to
-enum-common.c:83:29: int
-enum-common.c:83:29: warning: conversion of
-enum-common.c:83:29: int enum ENUM_TYPE_A to
-enum-common.c:83:29: int
-enum-common.c:83:39: warning: conversion of
-enum-common.c:83:39: int enum ENUM_TYPE_B to
-enum-common.c:83:39: int
-enum-common.c:84:33: warning: conversion of
-enum-common.c:84:33: int enum ENUM_TYPE_A to
-enum-common.c:84:33: int
-enum-common.c:84:33: warning: conversion of
-enum-common.c:84:33: int enum ENUM_TYPE_A to
-enum-common.c:84:33: int
-enum-common.c:84:43: warning: conversion of
-enum-common.c:84:43: int enum ENUM_TYPE_B to
-enum-common.c:84:43: int
-enum-common.c:85:33: warning: conversion of
-enum-common.c:85:33: int enum ENUM_TYPE_A to
-enum-common.c:85:33: int
-enum-common.c:85:33: warning: conversion of
-enum-common.c:85:33: int enum ENUM_TYPE_A to
-enum-common.c:85:33: int
-enum-common.c:85:43: warning: conversion of
-enum-common.c:85:43: int enum ENUM_TYPE_B to
-enum-common.c:85:43: int
-enum-common.c:86:29: warning: conversion of
-enum-common.c:86:29: int enum ENUM_TYPE_A to
-enum-common.c:86:29: int
-enum-common.c:86:38: warning: conversion of
-enum-common.c:86:38: int enum ENUM_TYPE_B to
-enum-common.c:86:38: int
-enum-common.c:87:29: warning: conversion of
-enum-common.c:87:29: int enum ENUM_TYPE_B to
-enum-common.c:87:29: int
-enum-common.c:87:38: warning: conversion of
-enum-common.c:87:38: int enum ENUM_TYPE_A to
-enum-common.c:87:38: int
-enum-common.c:106:29: warning: conversion of
-enum-common.c:106:29: int enum ENUM_TYPE_A to
-enum-common.c:106:29: int
-enum-common.c:106:29: warning: conversion of
-enum-common.c:106:29: int enum ENUM_TYPE_A to
-enum-common.c:106:29: int
-enum-common.c:107:34: warning: conversion of
-enum-common.c:107:34: int enum ENUM_TYPE_A to
-enum-common.c:107:34: int
enum-common.c:112:13: warning: conversion of
enum-common.c:112:13: int enum ENUM_TYPE_A to
enum-common.c:112:13: int
--
1.6.1.2
next prev parent reply other threads:[~2010-03-09 23:32 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-09 1:24 Sparse crash when mixing int and enum in ternary operator Pavel Roskin
2010-03-09 5:43 ` Christopher Li
2010-03-09 13:46 ` Kamil Dudka
2010-03-09 18:26 ` Pavel Roskin
2010-03-09 18:35 ` Pavel Roskin
2010-03-09 19:06 ` Kamil Dudka
2010-03-09 19:15 ` Josh Triplett
2010-03-09 20:11 ` Pavel Roskin
2010-03-09 20:29 ` Kamil Dudka
2010-03-09 23:30 ` Kamil Dudka [this message]
2010-03-10 1:09 ` Pavel Roskin
2010-03-10 16:05 ` Kamil Dudka
2010-03-10 20:27 ` Pavel Roskin
2010-03-10 20:44 ` Kamil Dudka
2010-03-10 21:03 ` Kamil Dudka
2010-03-10 21:56 ` Christopher Li
2010-03-13 17:22 ` Kamil Dudka
2010-03-21 15:27 ` Kamil Dudka
2010-03-24 10:07 ` Christopher Li
2010-03-24 10:51 ` Kamil Dudka
2010-03-27 9:16 ` Kamil Dudka
2010-03-27 9:29 ` Josh Triplett
2010-03-27 9:53 ` [PATCH] eliminate insane conversions from int to enum Kamil Dudka
2010-03-29 18:11 ` Christopher Li
2010-03-29 18:05 ` Sparse crash when mixing int and enum in ternary operator Christopher Li
2010-03-29 18:17 ` Kamil Dudka
2010-03-29 18:48 ` Christopher Li
2010-03-29 19:23 ` Kamil Dudka
2010-03-30 5:29 ` Pavel Roskin
2010-03-29 21:26 ` Josh Triplett
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201003100030.50165.kdudka@redhat.com \
--to=kdudka@redhat.com \
--cc=josh@joshtriplett.org \
--cc=linux-sparse@vger.kernel.org \
--cc=proski@gnu.org \
--cc=sparse@chrisli.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).