Liste des Groupes | Revenir à cl c |
On 09/08/2024 00:17, Keith Thompson wrote:You've written it yourself. Both are conversions - one is implicit, the other is explicit.Bart <bc@freeuk.com> writes:Suppose I write this code:
[...]Take:>
>
int a; double x;
>
x = (double)a;
>
The cast is implicit here but I've written it out to make it clear.
[...]
>
The *conversion* could be done implicitly, but you've used a cast (i.e.,
an explicit conversion) to make it clear.
>
There is no such thing as an "implicit cast" in C.
>
x = a; // implicit 'conversion'
x = (double)a; // explicit 'conversion'
My compiler produces these two bits of AST for the RHS of both expressions:
1 00009 r64---|---2 convert: sfloat_c i32 => r64
1 00009 i32---|---|---1 name: t.main.a.1
1 00010 r64---|---2 convert: sfloat_c i32 => r64
1 00010 i32---|---|---1 name: t.main.a.1
So whatever you call that `(double)` part of the second line, which is written explicitly, exactly the same thing is done internally (ie 'implicitly') to the first line. (The 09/10 are line numbers.)
Since C likes to use the term 'cast' for such conversions, I don't see a problem with talking about implicit and explicit versions.C does not "like" to use the term "cast" for anything other than cast operations, as defined by the C standards. Implicit conversions are not casts.
>
It just seems to irk the pedantics here.You mean, people who know what they are talking about rather than those that make up stuff as they go along?
Date | Sujet | # | Auteur | |
7 Aug 24 | ![]() | 122 | Thiago Adams | |
7 Aug 24 | ![]() ![]() | 7 | Thiago Adams | |
7 Aug 24 | ![]() ![]() ![]() | 1 | Keith Thompson | |
12 Aug 24 | ![]() ![]() ![]() | 5 | Tim Rentsch | |
12 Aug 24 | ![]() ![]() ![]() ![]() | 4 | Vir Campestris | |
12 Aug 24 | ![]() ![]() ![]() ![]() ![]() | 3 | Tim Rentsch | |
12 Aug 24 | ![]() ![]() ![]() ![]() ![]() ![]() | 2 | Lew Pitcher | |
12 Aug 24 | ![]() ![]() ![]() ![]() ![]() ![]() ![]() | 1 | Tim Rentsch | |
7 Aug 24 | ![]() ![]() | 107 | Dan Purgert | |
7 Aug 24 | ![]() ![]() ![]() | 1 | Keith Thompson | |
8 Aug 24 | ![]() ![]() ![]() | 1 | Lawrence D'Oliveiro | |
8 Aug 24 | ![]() ![]() ![]() | 101 | Thiago Adams | |
8 Aug 24 | ![]() ![]() ![]() ![]() | 25 | Bart | |
8 Aug 24 | ![]() ![]() ![]() ![]() ![]() | 24 | Michael S | |
8 Aug 24 | ![]() ![]() ![]() ![]() ![]() ![]() | 1 | Thiago Adams | |
8 Aug 24 | ![]() ![]() ![]() ![]() ![]() ![]() | 22 | Bart | |
8 Aug 24 | ![]() ![]() ![]() ![]() ![]() ![]() ![]() | 5 | Thiago Adams | |
8 Aug 24 | ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | 1 | Thiago Adams | |
8 Aug 24 | ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | 2 | Bart | |
8 Aug 24 | ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | 1 | Thiago Adams | |
8 Aug 24 | ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | 1 | Keith Thompson | |
8 Aug 24 | ![]() ![]() ![]() ![]() ![]() ![]() ![]() | 16 | David Brown | |
8 Aug 24 | ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | 15 | Bart | |
8 Aug 24 | ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | 13 | David Brown | |
9 Aug 24 | ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | 9 | Keith Thompson | |
9 Aug 24 | ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | 3 | Lawrence D'Oliveiro | |
9 Aug 24 | ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | 1 | Keith Thompson | |
9 Aug 24 | ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | 1 | James Kuyper | |
9 Aug 24 | ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | 5 | David Brown | |
9 Aug 24 | ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | 4 | Keith Thompson | |
12 Aug 24 | ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | 3 | Tim Rentsch | |
12 Aug 24 | ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | 2 | Keith Thompson | |
3 Sep 24 | ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | 1 | Tim Rentsch | |
9 Aug 24 | ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | 3 | Bart | |
9 Aug 24 | ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | 2 | David Brown | |
10 Aug 24 | ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | 1 | Bart | |
9 Aug 24 | ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | 1 | Lawrence D'Oliveiro | |
8 Aug 24 | ![]() ![]() ![]() ![]() | 75 | Keith Thompson | |
8 Aug 24 | ![]() ![]() ![]() ![]() ![]() | 74 | Thiago Adams | |
8 Aug 24 | ![]() ![]() ![]() ![]() ![]() ![]() | 72 | Bart | |
9 Aug 24 | ![]() ![]() ![]() ![]() ![]() ![]() ![]() | 47 | Keith Thompson | |
9 Aug 24 | ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | 38 | Bart | |
9 Aug 24 | ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | 2 | David Brown | |
12 Aug 24 | ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | 1 | Bart | |
9 Aug 24 | ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | 29 | James Kuyper | |
9 Aug 24 | ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | 14 | Bart | |
9 Aug 24 | ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | 3 | Keith Thompson | |
10 Aug 24 | ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | 2 | Bart | |
10 Aug 24 | ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | 1 | Keith Thompson | |
9 Aug 24 | ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | 10 | James Kuyper | |
13 Aug 24 | ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | 1 | David Brown | |
13 Aug 24 | ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | 1 | Bart | |
13 Aug 24 | ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | 7 | James Kuyper | |
13 Aug 24 | ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | 6 | Bart | |
13 Aug 24 | ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | 5 | Keith Thompson | |
13 Aug 24 | ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | 4 | Bart | |
14 Aug 24 | ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | 3 | Tim Rentsch | |
14 Aug 24 | ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | 2 | Bart | |
18 Aug 24 | ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | 1 | Tim Rentsch | |
9 Aug 24 | ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | 2 | Keith Thompson | |
9 Aug 24 | ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | 1 | James Kuyper | |
9 Aug 24 | ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | 12 | Kaz Kylheku | |
9 Aug 24 | ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | 9 | Keith Thompson | |
10 Aug 24 | ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | 8 | Kaz Kylheku | |
10 Aug 24 | ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | 6 | Keith Thompson | |
10 Aug 24 | ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | 3 | Kaz Kylheku | |
10 Aug 24 | ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | 1 | Keith Thompson | |
10 Aug 24 | ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | 1 | James Kuyper | |
10 Aug 24 | ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | 2 | Bart | |
13 Aug 24 | ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | 1 | David Brown | |
12 Aug 24 | ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | 1 | Tim Rentsch | |
9 Aug 24 | ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | 1 | James Kuyper | |
12 Aug 24 | ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | 1 | Tim Rentsch | |
9 Aug 24 | ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | 4 | Keith Thompson | |
9 Aug 24 | ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | 3 | Bart | |
9 Aug 24 | ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | 2 | Keith Thompson | |
9 Aug 24 | ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | 1 | Bart | |
12 Aug 24 | ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | 2 | Tim Rentsch | |
12 Aug 24 | ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | 1 | Bart | |
12 Aug 24 | ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | 8 | Tim Rentsch | |
12 Aug 24 | ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | 7 | Bart | |
12 Aug 24 | ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | 1 | Keith Thompson | |
12 Aug 24 | ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | 5 | Tim Rentsch | |
12 Aug 24 | ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | 4 | Keith Thompson | |
12 Aug 24 | ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | 3 | Ben Bacarisse | |
12 Aug 24 | ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | 2 | Tim Rentsch | |
12 Aug 24 | ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | 1 | Keith Thompson | |
9 Aug 24 | ![]() ![]() ![]() ![]() ![]() ![]() ![]() | 24 | Thiago Adams | |
9 Aug 24 | ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | 2 | Bart | |
9 Aug 24 | ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | 1 | Keith Thompson | |
9 Aug 24 | ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | 19 | David Brown | |
9 Aug 24 | ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | 18 | Thiago Adams | |
9 Aug 24 | ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | 3 | Thiago Adams | |
9 Aug 24 | ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | 1 | David Brown | |
9 Aug 24 | ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | 1 | Keith Thompson | |
9 Aug 24 | ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | 11 | David Brown | |
10 Aug 24 | ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | 10 | Bart | |
10 Aug 24 | ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | 9 | Thiago Adams | |
10 Aug 24 | ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | 8 | Bart | |
11 Aug 24 | ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | 7 | Thiago Adams | |
11 Aug 24 | ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | 6 | Keith Thompson | |
9 Aug 24 | ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | 3 | Keith Thompson | |
9 Aug 24 | ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | 2 | Keith Thompson | |
8 Aug 24 | ![]() ![]() ![]() ![]() ![]() ![]() | 1 | David Brown | |
8 Aug 24 | ![]() ![]() ![]() | 3 | Stefan Ram | |
7 Aug 24 | ![]() ![]() | 6 | Keith Thompson | |
8 Aug 24 | ![]() ![]() | 1 | Lawrence D'Oliveiro |
Les messages affichés proviennent d'usenet.