[cfe-dev] Surprising cast
John McCall
rjmccall at apple.com
Sat Dec 11 14:33:34 PST 2010
On Dec 11, 2010, at 9:21 AM, Abramo Bagnara wrote:
> $ cat p.c
> enum {
> a = 1
> };
> $ clang -cc1 -ast-dump p.c
> typedef char *__builtin_va_list;
> enum {
> a = (ImplicitCastExpr 0xb9e11f0 <p.c:2:7> 'int' <IntegralCast>
> (IntegerLiteral 0xb9e11a0 <col:7> 'int' 1))
>
> };
>
> The implicit cast from int to int is deliberate?
Seems unnecessary to me; probably something is just making an explicit expression instead of using ImpCastExprToType (which would be appropriate here, I think).
John.
More information about the cfe-dev
mailing list