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


Groups > comp.lang.c > #62546

Re: Could you please discuss whether casting a size_t variable to unsigned int variable is the correct way to handle...

From Keith Thompson <kst-u@mib.org>
Newsgroups comp.lang.c
Subject Re: Could you please discuss whether casting a size_t variable to unsigned int variable is the correct way to handle...
Date 2015-05-24 13:44 -0700
Organization None to speak of
Message-ID <87617hpuwn.fsf@kst-u.example.com> (permalink)
References (9 earlier) <kfnvbfxbra4.fsf@x-alumni2.alumni.caltech.edu> <87lhgtefe2.fsf@kst-u.example.com> <kfnzj4w8x6f.fsf@x-alumni2.alumni.caltech.edu> <87lhggsccs.fsf@kst-u.example.com> <kfnmw0u6mxx.fsf@x-alumni2.alumni.caltech.edu>

Show all headers | View raw


Tim Rentsch <txr@alumni.caltech.edu> writes:
> Keith Thompson <kst-u@mib.org> writes:
[...]
>> A compiler that wants to support, say, 24-bit integers as
>> extended integer types could reasonably use __int24 and
>> __uint24;  no diagnostic would be required.
>
> Strictly speaking I don't think a diagnostic is required
> for a declaration using __int128 either.  Uses would, but
> AFAICS declarations do not (presuming __int128 is a typedef
> name, which it could be).  Do you agree?

If __int128 were a typedef, then no diagnostic would be required for
code that uses it.  But in fact it's a gcc implementation-defined
keyword.  I *think* a diagnostic is required for any use of it.
(Of course that requirement doesn't apply to non-conforming
compilers, such as gcc in its default mode.)

>> It would make sense for the standard to permit the types to
>> be written as __int24 and unsigned __int24, but as far as I
>> can tell it doesn't.
>
> 10-4, and I concur.  (And I assume you put 'signed __int24'
> on that list as well;  certainly I would.)

Yes.

-- 
Keith Thompson (The_Other_Keith) kst-u@mib.org  <http://www.ghoti.net/~kst>
Working, but not speaking, for JetHead Development, Inc.
"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

Could you please discuss whether casting a size_t variable to unsigned int variable is the correct way to handle... G G <gdotone@gmail.com> - 2015-05-07 17:12 -0700
  Re: Could you please discuss whether casting a size_t variable to unsigned int variable is the correct way to handle... Keith Thompson <kst-u@mib.org> - 2015-05-07 18:18 -0700
    Re: Could you please discuss whether casting a size_t variable to unsigned int variable is the correct way to handle... G G <gdotone@gmail.com> - 2015-05-07 20:16 -0700
      Re: Could you please discuss whether casting a size_t variable to unsigned int variable is the correct way to handle... mark.bluemel@gmail.com - 2015-05-08 01:09 -0700
      Re: Could you please discuss whether casting a size_t variable to   unsigned int variable is the correct way to handle... Tim Prince <tprince@computer.org> - 2015-05-08 09:16 -0400
      Re: Could you please discuss whether casting a size_t variable to unsigned int variable is the correct way to handle... Keith Thompson <kst-u@mib.org> - 2015-05-08 08:03 -0700
        Re: Could you please discuss whether casting a size_t variable to unsigned int variable is the correct way to handle... Malcolm McLean <malcolm.mclean5@btinternet.com> - 2015-05-08 10:30 -0700
          Re: Could you please discuss whether casting a size_t variable to unsigned int variable is the correct way to handle... jadill33@gmail.com - 2015-05-08 11:12 -0700
          Re: Could you please discuss whether casting a size_t variable to unsigned int variable is the correct way to handle... Keith Thompson <kst-u@mib.org> - 2015-05-08 11:22 -0700
            Re: Could you please discuss whether casting a size_t variable to unsigned int variable is the correct way to handle... glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2015-05-08 18:42 +0000
          Re: Could you please discuss whether casting a size_t variable to unsigned int variable is the correct way to handle... Bartc <bc@freeuk.com> - 2015-05-08 19:25 +0100
            Re: Could you please discuss whether casting a size_t variable to unsigned int variable is the correct way to handle... Stephen Sprunk <stephen@sprunk.org> - 2015-05-08 15:12 -0500
              Re: Could you please discuss whether casting a size_t variable to unsigned int variable is the correct way to handle... Bartc <bc@freeuk.com> - 2015-05-08 22:38 +0100
                Re: Could you please discuss whether casting a size_t variable to   unsigned int variable is the correct way to handle... Ian Collins <ian-news@hotmail.com> - 2015-05-09 11:01 +1200
        Re: Could you please discuss whether casting a size_t variable to unsigned int variable is the correct way to handle... Tim Rentsch <txr@alumni.caltech.edu> - 2015-05-10 09:19 -0700
          Re: Could you please discuss whether casting a size_t variable to unsigned int variable is the correct way to handle... Keith Thompson <kst-u@mib.org> - 2015-05-10 11:26 -0700
            Re: Could you please discuss whether casting a size_t variable to unsigned int variable is the correct way to handle... Tim Rentsch <txr@alumni.caltech.edu> - 2015-05-11 21:31 -0700
              Re: Could you please discuss whether casting a size_t variable to unsigned int variable is the correct way to handle... glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2015-05-12 05:50 +0000
                Re: Could you please discuss whether casting a size_t variable to unsigned int variable is the correct way to handle... Keith Thompson <kst-u@mib.org> - 2015-05-12 10:05 -0700
                Re: Could you please discuss whether casting a size_t variable to unsigned int variable is the correct way to handle... Tim Rentsch <txr@alumni.caltech.edu> - 2015-05-12 11:10 -0700
                Re: Could you please discuss whether casting a size_t variable to unsigned int variable is the correct way to handle... Keith Thompson <kst-u@mib.org> - 2015-05-12 12:59 -0700
                Re: Could you please discuss whether casting a size_t variable to unsigned int variable is the correct way to handle... Tim Rentsch <txr@alumni.caltech.edu> - 2015-05-22 08:11 -0700
                Re: Could you please discuss whether casting a size_t variable to unsigned int variable is the correct way to handle... Keith Thompson <kst-u@mib.org> - 2015-05-22 11:20 -0700
                Re: Could you please discuss whether casting a size_t variable to unsigned int variable is the correct way to handle... Tim Rentsch <txr@alumni.caltech.edu> - 2015-05-24 07:59 -0700
                Re: Could you please discuss whether casting a size_t variable to unsigned int variable is the correct way to handle... Keith Thompson <kst-u@mib.org> - 2015-05-24 13:44 -0700
                Re: Could you please discuss whether casting a size_t variable to unsigned int variable is the correct way to handle... Tim Rentsch <txr@alumni.caltech.edu> - 2015-05-12 11:09 -0700
              Re: Could you please discuss whether casting a size_t variable to unsigned int variable is the correct way to handle... Keith Thompson <kst-u@mib.org> - 2015-05-12 11:02 -0700
                Re: Could you please discuss whether casting a size_t variable to unsigned int variable is the correct way to handle... Tim Rentsch <txr@alumni.caltech.edu> - 2015-05-22 08:01 -0700
            Re: Could you please discuss whether casting a size_t variable to unsigned int variable is the correct way to handle... Waldek Hebisch <hebisch@antispam.uni.wroc.pl> - 2015-06-08 01:06 +0000
              Re: Could you please discuss whether casting a size_t variable to unsigned int variable is the correct way to handle... Keith Thompson <kst-u@mib.org> - 2015-06-07 19:12 -0700
                Re: Could you please discuss whether casting a size_t variable to unsigned int variable is the correct way to handle... James Kuyper <jameskuyper@verizon.net> - 2015-06-08 11:28 -0400
                Re: Could you please discuss whether casting a size_t variable to unsigned int variable is the correct way to handle... Waldek Hebisch <hebisch@antispam.uni.wroc.pl> - 2015-06-09 12:23 +0000
            Re: Could you please discuss whether casting a size_t variable to unsigned int variable is the correct way to handle... David Kleinecke <dkleinecke@gmail.com> - 2015-06-08 10:56 -0700
              Re: Could you please discuss whether casting a size_t variable to unsigned int variable is the correct way to handle... Keith Thompson <kst-u@mib.org> - 2015-06-08 11:32 -0700
                Re: Could you please discuss whether casting a size_t variable to unsigned int variable is the correct way to handle... Bartc <bc@freeuk.com> - 2015-06-08 19:40 +0100
                Re: Could you please discuss whether casting a size_t variable to unsigned int variable is the correct way to handle... Richard Heathfield <rjh@cpax.org.uk> - 2015-06-08 20:03 +0100
                Re: Could you please discuss whether casting a size_t variable to unsigned int variable is the correct way to handle... Keith Thompson <kst-u@mib.org> - 2015-06-08 13:43 -0700
                Re: Could you please discuss whether casting a size_t variable to unsigned int variable is the correct way to handle... glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2015-06-08 21:03 +0000
                Re: Could you please discuss whether casting a size_t variable to unsigned int variable is the correct way to handle... Keith Thompson <kst-u@mib.org> - 2015-06-08 14:52 -0700
                Re: Could you please discuss whether casting a size_t variable to unsigned int variable is the correct way to handle... David Kleinecke <dkleinecke@gmail.com> - 2015-06-09 08:30 -0700
                Re: Could you please discuss whether casting a size_t variable to unsigned int variable is the correct way to handle... Ben Bacarisse <ben.usenet@bsb.me.uk> - 2015-06-09 16:48 +0100
                Re: Could you please discuss whether casting a size_t variable to unsigned int variable is the correct way to handle... Keith Thompson <kst-u@mib.org> - 2015-06-09 08:55 -0700
                Re: Could you please discuss whether casting a size_t variable to unsigned int variable is the correct way to handle... David Kleinecke <dkleinecke@gmail.com> - 2015-06-10 10:09 -0700
                Re: Could you please discuss whether casting a size_t variable to unsigned int variable is the correct way to handle... Keith Thompson <kst-u@mib.org> - 2015-06-10 11:05 -0700
                Re: Could you please discuss whether casting a size_t variable to unsigned int variable is the correct way to handle... David Kleinecke <dkleinecke@gmail.com> - 2015-06-11 11:04 -0700
                Re: Could you please discuss whether casting a size_t variable to unsigned int variable is the correct way to handle... Keith Thompson <kst-u@mib.org> - 2015-06-11 11:31 -0700
                Re: Could you please discuss whether casting a size_t variable to unsigned int variable is the correct way to handle... Malcolm McLean <malcolm.mclean5@btinternet.com> - 2015-06-11 13:49 -0700
                Re: Could you please discuss whether casting a size_t variable to unsigned int variable is the correct way to handle... David Kleinecke <dkleinecke@gmail.com> - 2015-06-12 09:00 -0700
                Re: Could you please discuss whether casting a size_t variable to unsigned int variable is the correct way to handle... Tim Rentsch <txr@alumni.caltech.edu> - 2015-07-11 07:25 -0700
                Re: Could you please discuss whether casting a size_t variable to unsigned int variable is the correct way to handle... David Kleinecke <dkleinecke@gmail.com> - 2015-07-11 10:04 -0700
                Re: Could you please discuss whether casting a size_t variable to unsigned int variable is the correct way to handle... James Kuyper <jameskuyper@verizon.net> - 2015-07-11 13:39 -0400
                Re: Could you please discuss whether casting a size_t variable to unsigned int variable is the correct way to handle... Tim Rentsch <txr@alumni.caltech.edu> - 2015-07-11 13:44 -0700
                Re: Could you please discuss whether casting a size_t variable to unsigned int variable is the correct way to handle... Keith Thompson <kst-u@mib.org> - 2015-07-11 16:15 -0700
                Re: Could you please discuss whether casting a size_t variable to unsigned int variable is the correct way to handle... David Kleinecke <dkleinecke@gmail.com> - 2015-06-09 08:31 -0700
  Re: Could you please discuss whether casting a size_t variable to unsigned int variable is the correct way to handle... Malcolm McLean <malcolm.mclean5@btinternet.com> - 2015-05-07 20:34 -0700
    Re: Could you please discuss whether casting a size_t variable to unsigned int variable is the correct way to handle... Richard Heathfield <rjh@cpax.org.uk> - 2015-05-08 09:48 +0100
  Re: Could you please discuss whether casting a size_t variable to unsigned int variable is the correct way to handle... glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2015-05-08 05:12 +0000

csiph-web