Path: csiph.com!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Keith Thompson Newsgroups: comp.lang.c Subject: Re: better atoi Date: Sun, 12 Feb 2017 11:15:37 -0800 Organization: None to speak of Lines: 24 Message-ID: References: <853138f9-54d1-435f-90d5-ef75a38e65bf@googlegroups.com> <1b1sv5k98w.fsf@pfeifferfamily.net> <874m011wzn.fsf@bsb.me.uk> <1bwpcxiaq2.fsf@pfeifferfamily.net> <87shnlx73d.fsf@bsb.me.uk> <1bbmu8isvo.fsf@pfeifferfamily.net> <877f4wy6xt.fsf@bsb.me.uk> <1blgtc5piu.fsf@pfeifferfamily.net> <87inogwd09.fsf@bsb.me.uk> <1b8tpc5gdc.fsf@pfeifferfamily.net> <01bd8443-f20c-4183-8df7-c23b93b6887b@googlegroups.com> <649395f0-f6fa-4779-b563-71527b7e677c@googlegroups.com> <491bde1c-4dc9-4c49-ab7c-496eb64f4362@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: mx02.eternal-september.org; posting-host="33cadd0b020fd5cbab9e766f139f7a17"; logging-data="18604"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+AOHqT1xYnnWyBTtPbKTGq" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) Cancel-Lock: sha1:8vuuIZPxMyHC0yLtVLqWZcZGu00= sha1:n2mAh3U6+UcylGVOZfgf5TISHVs= Xref: csiph.com comp.lang.c:103753 BartC writes: > On 12/02/2017 17:44, Malcolm McLean wrote: [...] >> It's useful to have a copy for reference however. Like the >> dictionary, 99% of it you probably won't read, but still needs to be >> there. > > Yes, so that most compilers can ignore it! Apparently: > > int; > > is illegal according to the grammar. Yes out of six compilers I tried, > three don't consider that an error, while one just gives a warning. So four out of the six compilers you tried correctly diagosed the error (a warning is a valid diagnostic for a syntax error or constraint violation). The other two probably are not conforming by default, but such compilers commonly can be made conforming with appropriate options. -- 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"