Path: csiph.com!eternal-september.org!feeder.eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail From: Keith Thompson Newsgroups: comp.lang.c Subject: Re: Compiling and linking code from different places in the file system Date: Mon, 12 Mar 2018 09:23:17 -0700 Organization: None to speak of Lines: 26 Message-ID: References: <6oSnC.178019$eQ7.108635@fx46.am4> <87o9k055d2.fsf@bsb.me.uk> <13a67039-e46b-4337-a1a3-058210e55b6e@googlegroups.com> <2c91fbad-d3aa-40b7-88a7-124845c1201f@googlegroups.com> <748d0aaa-e82a-4437-b6bd-f70e69c82904@googlegroups.com> <601fd63c-4613-4892-9dd6-8fe8cc61c043@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: reader02.eternal-september.org; posting-host="877122f47cb3293e34ad9ed0b03f90bc"; logging-data="6599"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18sO3KzhVWcscvTeunDgS9J" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) Cancel-Lock: sha1:X8iu1eyU1P+u96Fqe7IANwzeE+g= sha1:eBgpLVT93/RzesKaXHpQTCddOFw= Xref: csiph.com comp.lang.c:127686 supercat@casperkitty.com writes: > On Saturday, March 10, 2018 at 10:39:48 AM UTC-6, David Brown wrote: [...] >> If you have existing code that cannot be modified, and it makes invalid >> assumptions that don't apply on your current target, then you can't use >> it. It is that simple. > > So it would be impossible for a compiler targeting x64 to successfully > process code that expects "long" to be 32 bits? Maybe someone should tell > Microsoft that. Nobody said that. Of course it's possible for an x86_64 compiler to use 32-bit long. It's just not required. If you write code that assumes long is exactly 32 bits, it will break when compiled with a compiler that makes long 64 bits. Such compilers are common. Are you suggesting that all x86_64 compilers *should* use 32-bit long? If so, why? If not, what point are you trying make? -- Keith Thompson (The_Other_Keith) kst-u@mib.org 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"