Implict casts disappeared from syntactic init list expressions in C++
Abramo Bagnara via cfe-commits
cfe-commits at lists.llvm.org
Fri Aug 28 08:31:07 PDT 2015
Ping.
Il 25/08/2015 19:27, Abramo Bagnara ha scritto:
> Comparing the result of InitListExpr::getSyntacticForm between r224986
> and r245836 I've discovered that integer to char implicit cast for
> integer literal 3 is no longer added to AST for C++ (while it is present
> in C).
>
> This is the source used to test:
>
> char v[10] = { 3 };
>
> Taken in account that:
>
> - implicit cast (and other conversions, constructor calls, etc.) are
> very important also for who need to visit the syntactic form (obvious in
> *both* C and C++)
>
> - to generate that for the syntactic form permit to increase the
> efficiency and the sharing when using designated range extensions (as
> the conversion chain don't need to be replicated for each entry)
>
> I think it is a regression. Am I missing something?
>
--
Abramo Bagnara
BUGSENG srl - http://bugseng.com
mailto:abramo.bagnara at bugseng.com
More information about the cfe-commits
mailing list