Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c > #11598

Re: no warning for assigning unsigned int to plain int

From Keith Thompson <kst-u@mib.org>
Newsgroups comp.lang.c
Subject Re: no warning for assigning unsigned int to plain int
Date 2011-10-12 12:36 -0700
Organization None to speak of
Message-ID <ln7h4at326.fsf@nuthaus.mib.org> (permalink)
References <4075cf5b-5ede-472b-8a8f-aaeca4205c8d@l39g2000pro.googlegroups.com> <j74in1$pp3$1@dont-email.me>

Show all headers | View raw


Kleuskes & Moos <kleuske@somewhere.else.net> writes:
[...]
> It should not generate a warning. You invoke an implicit cast from size_t to
> int. This is perfectly acceptable according to the C standard. One of the
> regulars will undoubtedly provide chapter and verse...

An implicit *conversion*.  A "cast" is an explicit operator that
specifies a conversion.

-- 
Keith Thompson (The_Other_Keith) kst-u@mib.org  <http://www.ghoti.net/~kst>
"We must do something.  This is something.  Therefore, we must do this."
    -- Antony Jay and Jonathan Lynn, "Yes Minister"

Back to comp.lang.c | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

no warning for assigning unsigned int to plain int "V.Subramanian, India" <subramanian100in@yahoo.com> - 2011-10-12 07:36 -0700
  Re: no warning for assigning unsigned int to plain int James Kuyper <jameskuyper@verizon.net> - 2011-10-12 12:17 -0400
  Re: no warning for assigning unsigned int to plain int Kleuskes & Moos <kleuske@somewhere.else.net> - 2011-10-12 17:28 +0000
    Re: no warning for assigning unsigned int to plain int Keith Thompson <kst-u@mib.org> - 2011-10-12 12:36 -0700
  Re: no warning for assigning unsigned int to plain int Ike Naar <ike@sverige.freeshell.org> - 2011-10-12 17:53 +0000
  Re: no warning for assigning unsigned int to plain int Keith Thompson <kst-u@mib.org> - 2011-10-12 12:41 -0700

csiph-web