Re: how can i generate warnings for implicit casts that lose bits?
- From: robert bristow-johnson <rbj@xxxxxxxxxxxxxxxxxxxx>
- Date: Wed, 06 Jun 2007 18:47:27 -0000
On Jun 6, 4:44 am, Chris Dollin <chris.dol...@xxxxxx> wrote:
robert bristow-johnson wrote:
here is a post i put out (using Google Groups) that got dropped by
google:
I'm going to ignore your real problem [1] in favour of criticising your
subject line:
... implicit casts ...
C doesn't have implicit casts.
the manual speaks of "explicit casts", then what is a cast that is not
an "explicit" cast? i think that
short a_short;
double a_double;
a_short = a_double;
is an "implicit cast". saying
a_short = (short)a_double;
is an "explicit cast." am i using the language incorrectly?
Casts are explicit syntax, `(Type) Expr`.
It has implicit /conversions/.
I'll have another latte now.
[1] Which I see has generated much -- hopefully helpful -- response.
i still haven't heard the magic invocation i make to the gcc compiler
that will warn me when an implicit conversion can potentially change a
value. the manual seems to say that -Wconversion should do it, but i
know that it does not, at least in my reasonably current
implementation of gcc on linux.
but i like to see the discussion it generated, anyway.
r b-j
.
- Follow-Ups:
- Re: how can i generate warnings for implicit casts that lose bits?
- From: Erik de Castro Lopo
- Re: how can i generate warnings for implicit casts that lose bits?
- Prev by Date: Re: dividing two signals using fft
- Next by Date: Re: Carrier Frequency correction
- Previous by thread: Re: how can i generate warnings for implicit casts that lose bits?
- Next by thread: Re: how can i generate warnings for implicit casts that lose bits?
- Index(es):
Relevant Pages
|
Loading