Path: csiph.com!eternal-september.org!feeder.eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail From: Keith Thompson Newsgroups: comp.lang.c Subject: Re: Sort char array Date: Wed, 09 Oct 2019 15:35:59 -0700 Organization: None to speak of Lines: 28 Message-ID: References: <20191007174244.385138503569a8bc6d4eec9d@g{oogle}mail.com> <20191008022725.36fbd95aa45ba185290e5e11@gmail.com> <1q_mF.841756$Zy3.585129@fx33.am4> <20191009020207.b533aa1c6d95f44eb314ffc1@gmail.com> <5alnF.1041354$WI2.353384@fx34.am4> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: reader02.eternal-september.org; posting-host="ae453da06a2b0ba7b51610fa3f87a41c"; logging-data="21052"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+zihwmOoGsYIRg6c2SGbDk" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) Cancel-Lock: sha1:h0LFjoNWFo4l9F7FE+qQEmdTDLg= sha1:Wp3Ai64gB6Iph0JzNSaWu/aba08= Xref: csiph.com comp.lang.c:146825 scott@slp53.sl.home (Scott Lurndal) writes: > Keith Thompson writes: >>David Brown writes: >>For an implementation where long and long long are both 64 bits, and >>therefore candidates for int64_t, it wouldn't occur to me to have a >>preference for which one the implementation should pick. > > For me, I'd prefer int64_t to always be 'long long'. Then I can use > the same format specifiers with printf when compiling for both 32-bit > and 64-bit targets. You can do that already, using the PRId64 macro from . int64_t max = INT64_MAX; printf("INT64_MAX = %" PRId64 "\n", max); Or if you don't like those macros (I'm not a huge fan of them myself), convert to long long: printf("INT64_MAX = %lld\n", (long long)max); If you want to use "%lld", why aren't you declaring your objects as long long in the first place? -- Keith Thompson (The_Other_Keith) kst-u@mib.org Will write code for food. void Void(void) { Void(); } /* The recursive call of the void */