R
RCollins
Keith said:No, it's an implicit conversion. There's no such thing as an implicit
cast.
A conversion is an action that occurs during program execution. It
can be either explicit (i.e., specified by a cast operator in the
program source) or implicit (i.e., not specified by a cast operator).
A cast is a source construct, consisting of a parenthesized type-name
followed by an expression. It specifies an explicit conversion.
I admit it's a bit confusing. For most other constructs, we use the
same name for the syntactic construct as for the action that occurs
during execution. For example, we commonly refer to both the source
construct "foo(42)" and to the action that it specifies as a "function
call", and there can be implicit function calls that don't correspond
to any source-code function call. For casts and conversions, we use
two different terms.
It is confusing. To my mind, it is not a feature of the C language,
but more of a convention of how we use the English language.