Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Tim Rentsch Newsgroups: comp.arch Subject: Re: Computer architects leaving Intel... Date: Sun, 08 Sep 2024 17:52:33 -0700 Organization: A noiseless patient Spider Lines: 41 Message-ID: <867cbllkby.fsf@linuxsc.com> References: <2024Aug30.161204@mips.complang.tuwien.ac.at> <2024Aug30.195831@mips.complang.tuwien.ac.at> <2024Aug31.170347@mips.complang.tuwien.ac.at> <2024Sep5.151959@mips.complang.tuwien.ac.at> <868qw3m3iu.fsf@linuxsc.com> <86v7z6lv3p.fsf@linuxsc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Date: Mon, 09 Sep 2024 02:52:33 +0200 (CEST) Injection-Info: dont-email.me; posting-host="2550a8cb929efdfde26bde1f2c6c70c6"; logging-data="2237343"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/7ztL5I4r0TcB8vc003x0nsy0R+gPbtsE=" User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.4 (gnu/linux) Cancel-Lock: sha1:DriVPGFjxjbfn5AYpVzWMBnaYSQ= sha1:noZQ/SdliuR8Lv7TepOVMVfxKB0= mitchalsup@aol.com (MitchAlsup1) writes: > On Sun, 8 Sep 2024 2:47:38 +0000, Tim Rentsch wrote: > >> mitchalsup@aol.com (MitchAlsup1) writes: >> >>> On Sat, 7 Sep 2024 23:45:45 +0000, Tim Rentsch wrote: >>> >>> Another issue is that main() may not have the 3 defined arguments >>> and the containing environment is not supposed to complain when >>> argc, arv, and envp are unused or even unnamed as arguments. >> >> The usual "Hello, World" program defines main() either with no >> arguments >> >> int >> main(){ >> ... >> } >> >> or with two arguments >> >> int >> main( int argc, char *argv[] ){ >> ... >> } >> >> and in both cases main() has defined behavior and does not >> violate the strictures of strictly conforming programs. > > The Linux environment (crt0) calls main with 3 arguments. > > Are you arguing that a program can be strictly conforming and > not be type safe at its call/return interfaces ?? Note by the way that the C standard doesn't make any guarantees about how a strictly conforming program will run under any given implementation. All the standard does say is that a conforming implementation shall accept any strictly conforming program (with slightly different rules for conforming hosted implementations as compared to conforming freestanding implementations).