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


Groups > comp.lang.c > #71840

Re: Making sense of warning about "initialization makes pointer from integer without a cast"

From James Kuyper <jameskuyper@verizon.net>
Newsgroups comp.lang.c
Subject Re: Making sense of warning about "initialization makes pointer from integer without a cast"
Date 2015-10-04 15:12 -0400
Organization Self
Message-ID <56117A16.9060904@verizon.net> (permalink)
References (2 earlier) <muq62o$9up$1@speranza.aioe.org> <muq6k3$i2m$1@dont-email.me> <muq7m9$c80$1@speranza.aioe.org> <561166A5.5070806@verizon.net> <murq0j$4oa$1@dont-email.me>

Show all headers | View raw


On 10/04/2015 02:11 PM, Richard Heathfield wrote:
...
> For CLI programs, I find the C90/C99 common subset (pace, C2011, if I 
> spot any bits that I have to chop off to fit you in, I will indeed chop 
> those bits off) to be so familiar that programming in it is easier and 
> quicker than switching to C99 (or, nowadays, C11). Why switch if there's 
> no need?

Just because there's no need, doesn't mean there's no desire. You
obviously don't desire to use the new features of C99 and C2011 - but I
certain would like to, if I could.

VLAs would simplify a lot of my code, which deals with small
multi-dimensional arrays whose dimensions are variable. The size-named
types would allow me to more precisely specify the characteristics I
want for each variable. Dropping implicit int, dropping implicit
function declarations, removing gets(), new restrictions on the use of
return statements, and standardizing the handling of a/b when a and b
have opposite signs are all significant fixes to misfeatures of C90. the
snprintf() family does something I've long wanted to be able to do.
Designated initializers would be helpful in a few special cases. Complex
math would make some things I'm interested in doing (but am not
currently doing) a lot easier - with C90 I'd have to write the code in
terms of separate real and imaginary parts, which makes it the code a
whole lot more obscure. The many other improvements to floating point
math support are also far more attractive to me than they are to most
people. // comments are a nice convenience. Declarations mixed in with
statements, and declarations in the first part of for() statements make
it easier to more tightly control the scope of my declarations.

I don't have any current need to write multi-threaded code, but if I
did, having the ability to rely upon <threads.h> rather than, for
instance, <pthreads.h> would have some attraction. Someday, the number
of non-POSIX platforms where <threads.h> is supported might exceed the
number of POSIX platforms where <threads.h> is not yet supported, though
I don't think we're there yet. If that happens, code that can be written
to use only <threads.h> would be more portable.
I think that _Static_assert and _Noreturn are definite improvements, and
that _Generic could reduce the need to switch to C++.

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


Thread

Making sense of warning about "initialization makes pointer from integer without a cast" "Morten W. Petersen" <morphex@gmail.com> - 2015-10-04 04:40 +0200
  Re: Making sense of warning about "initialization makes pointer from integer without a cast" "Morten W. Petersen" <morphex@gmail.com> - 2015-10-04 04:59 +0200
    Re: Making sense of warning about "initialization makes pointer from integer without a cast" James Kuyper <jameskuyper@verizon.net> - 2015-10-03 23:23 -0400
    Re: Making sense of warning about "initialization makes pointer from integer without a cast" Ben Bacarisse <ben.usenet@bsb.me.uk> - 2015-10-04 13:47 +0100
      Re: Making sense of warning about "initialization makes pointer from integer without a cast" Eric Sosman <esosman@comcast-dot-net.invalid> - 2015-10-04 09:40 -0400
        Re: Making sense of warning about "initialization makes pointer from integer without a cast" "Morten W. Petersen" <morphex@gmail.com> - 2015-10-05 00:33 +0200
          Re: Making sense of warning about "initialization makes pointer from integer without a cast" James Kuyper <jameskuyper@verizon.net> - 2015-10-04 19:07 -0400
  Re: Making sense of warning about "initialization makes pointer from integer without a cast" Melzzzzz <mel@zzzzz.com> - 2015-10-04 05:08 +0200
  Re: Making sense of warning about "initialization makes pointer from integer without a cast" James Kuyper <jameskuyper@verizon.net> - 2015-10-03 23:16 -0400
    Re: Making sense of warning about "initialization makes pointer from integer without a cast" "Morten W. Petersen" <morphex@gmail.com> - 2015-10-04 05:23 +0200
      Re: Making sense of warning about "initialization makes pointer from integer without a cast" James Kuyper <jameskuyper@verizon.net> - 2015-10-03 23:34 -0400
        Re: Making sense of warning about "initialization makes pointer from integer without a cast" "Morten W. Petersen" <morphex@gmail.com> - 2015-10-04 05:50 +0200
          Re: Making sense of warning about "initialization makes pointer from integer without a cast" James Kuyper <jameskuyper@verizon.net> - 2015-10-04 13:49 -0400
            Re: Making sense of warning about "initialization makes pointer from integer without a cast" Richard Heathfield <rjh@cpax.org.uk> - 2015-10-04 19:11 +0100
              Re: Making sense of warning about "initialization makes pointer from integer without a cast" James Kuyper <jameskuyper@verizon.net> - 2015-10-04 15:12 -0400
                Re: Making sense of warning about "initialization makes pointer from integer without a cast" Richard Heathfield <rjh@cpax.org.uk> - 2015-10-04 20:52 +0100
                Re: Making sense of warning about "initialization makes pointer from integer without a cast" supercat@casperkitty.com - 2015-10-04 13:18 -0700
            Re: Making sense of warning about "initialization makes pointer from integer without a cast" "Morten W. Petersen" <morphex@gmail.com> - 2015-10-05 00:26 +0200
              Re: Making sense of warning about "initialization makes pointer from integer without a cast" Keith Thompson <kst-u@mib.org> - 2015-10-04 18:09 -0700
                Re: Making sense of warning about "initialization makes pointer from integer without a cast" supercat@casperkitty.com - 2015-10-04 19:55 -0700
      Re: Making sense of warning about "initialization makes pointer from integer without a cast" Keith Thompson <kst-u@mib.org> - 2015-10-04 15:10 -0700
  Re: Making sense of warning about "initialization makes pointer from integer without a cast" Geoff <geoff@invalid.invalid> - 2015-10-03 22:04 -0700
    Re: Making sense of warning about "initialization makes pointer from integer without a cast" "Morten W. Petersen" <morphex@gmail.com> - 2015-10-04 07:07 +0200
      Re: Making sense of warning about "initialization makes pointer from integer without a cast" Geoff <geoff@invalid.invalid> - 2015-10-03 23:29 -0700
  Re: Making sense of warning about "initialization makes pointer from   integer without a cast" Ian Collins <ian-news@hotmail.com> - 2015-10-04 19:18 +1300
  Re: Making sense of warning about "initialization makes pointer from integer without a cast" Siri Cruz <chine.bleu@yahoo.com> - 2015-10-03 23:29 -0700

csiph-web