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: memcpy not memcpying? Date: Sat, 02 Nov 2019 13:06:53 -0700 Organization: None to speak of Lines: 94 Message-ID: References: <2LVuF.7$BF1.0@fx26.iad> <6KfvF.57888$rJ1.57717@fx01.am4> <0DivF.23103$Q26.16540@fx34.am4> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: reader02.eternal-september.org; posting-host="9098de3fd9a31fa536b44e8ea792881e"; logging-data="32484"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+nSArCIKsze4iYKe3+Ex+V" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) Cancel-Lock: sha1:Qpin/rWvXrn9Qe5bOz6/l6OwOV4= sha1:N4J0k7sNCO5VPx6QOacSKLMYTQ0= Xref: csiph.com comp.lang.c:147513 Bart writes: > On 02/11/2019 16:24, David Brown wrote: >> On 02/11/2019 14:43, Bart wrote: >>> On 02/11/2019 12:04, David Brown wrote: >>>> That's your problem.  Tcc is a compiler, not a full C implementation >>>> - it uses MS's hopelessly outdated and inefficient C library DLL. >>> >>> So does gcc: >> >> gcc is a compiler - it needs a library.  tcc is a build of gcc for >> Windows, which relies on MS's piss-poor C library.  The solution is to >> get a /decent/ C implementation for Windows - including a good compiler >> and a good library.  My recommendation is mingw64, which consists of gcc >> /and/ a good library. >> >> You /know/ all this.  Why do you continually muddy the waters and >> attempt to confuse people? > > gcc, gnu, mingw, whatever the whole thing is supposed to be called, is a > monstrosity. > > My gcc/tdm installation consists of 666MB of 13,000 files including 900 > lib*.a files, and yet it hasn't bothered to include an up-to-date C > runtime? It doesn't make sense does it. TDM is apparently based on MinGW, an implementation that uses the gcc compiler and the Microsoft C runtime library. No, it hasn't bothered to include an up-to-date C runtime, preferring for whatever reason to use the existing Microsoft C runtime. Its failure to support "%zu" has nothing to do with gcc. Of course you know that, but you deliberately refuse to acknowledge it. > Well, OK, let's download this mingw64 (which I thought I already had). > It describes itself as a "complete runtime environment for gcc to > support binaries", yet the 450MB, also 13,000-file installation > confusingly also includes compilers such as gcc.exe and g++.exe. (So is > it a runtime environment, or a C implementation, or can't it make its > mind up?) https://sourceforge.net/projects/mingw-w64/ says The mingw-w64 project is a complete runtime environment for gcc to support binaries native to Windows 64-bit and 32-bit operating systems. Perhaps "runtime environment" isn't the best description. It is, as you know perfectly well, a C implementation that includes a compiler, a (non-Microsoft) runtime library, and other components. (Some of those components probably aren't part of what the standard calls a C implementation.) Naturally you seize on a single poorly worded description so you can spread confusion. Yes the old MinGW's use of the Microsoft C library is a problem. That problem was corrected by the introduction of MinGW-w64. (I'm not entirely sure to what extent MinGW-w64 is, or is intended to be, a replacement for MinGW.) But since the old MinGW still exists, you still have something to complain about. > Anyway I might as well use them. This is the result (after hiding the > directories of my tdm version) on a modified hello.c: > > C:\mingw\mingw64\bin>type hello.c > #include > > int main(void) { > printf("%zu\n",sizeof(int*)); > } > > C:\mingw\mingw64\bin>gcc hello.c > > C:\mingw\mingw64\bin>a > zu > > Brilliant! So it looks like someone really has to do battle to get this > %zu thing working. I don't know why it doesn't work for you. My guess is that either you're not using the gcc provided by MinGW-w64, or you've managed to use it along with the Microsoft runtime library. It does work for me. What does "gcc --version" print? Normally I'd suggest that you ask for help resolving the issue, but I'm sure that would be futile. [...] -- Keith Thompson (The_Other_Keith) kst-u@mib.org Working, but not speaking, for Philips Healthcare void Void(void) { Void(); } /* The recursive call of the void */