Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c > #103757

Re: better atoi

Path csiph.com!news.swapon.de!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From Keith Thompson <kst-u@mib.org>
Newsgroups comp.lang.c
Subject Re: better atoi
Date Sun, 12 Feb 2017 11:54:32 -0800
Organization None to speak of
Lines 47
Message-ID <lnfujjtcav.fsf@kst-u.example.com> (permalink)
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> <aae7f429-49c0-562c-b96c-30ca65f21343@verizon.net> <01bd8443-f20c-4183-8df7-c23b93b6887b@googlegroups.com> <649395f0-f6fa-4779-b563-71527b7e677c@googlegroups.com> <a0b5a4f1-4e7b-41d6-88b8-d63a0de85a4c@googlegroups.com> <491bde1c-4dc9-4c49-ab7c-496eb64f4362@googlegroups.com> <o7q9kb$dcr$1@dont-email.me> <lnpointe3q.fsf@kst-u.example.com> <o7qcn2$p1l$1@dont-email.me>
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="U2FsdGVkX19ckVwOf+dcab4PN5c5DLn5"
User-Agent Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux)
Cancel-Lock sha1:n5EvQBoSz103xq0w2sDMOk9NZHM= sha1:37x8aY9akyWTGS5wHThb2d6ajFQ=
Xref csiph.com comp.lang.c:103757

Show key headers only | View raw


BartC <bc@freeuk.com> writes:
> On 12/02/2017 19:15, Keith Thompson wrote:
>> BartC <bc@freeuk.com> 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
>
> 3 didn't say anything about it (no error or warning)
> 1 gave a warning
> 2 gave an error
>
> That's one out of three that took it seriously.

If a diagnostic is a non-fatal warning, then you say that the compiler
doesn't consider it an error.  I disagree; as has been said many times,
a non-fatal warning is a valid diagnostic for an error.

So 3 out of 6 correctly diagnosed the error, 2 fatally and 1
non-fatally.

The other three compilers are non-conforming *in the mode in which you
invoked them*.  Can you make them conforming with appropriate options?

> It's not the most serious error, as adding that to a program and then 
> having it ignored will do nothing. But that would mean you can write any 
> old rubbish in program. It should be diagnosed because probably 
> something is wrong.

If you invoke a compiler *in conforming mode*, you can't get away with
writting "any old rubbish".

-- 
Keith Thompson (The_Other_Keith) kst-u@mib.org  <http://www.ghoti.net/~kst>
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"

Back to comp.lang.c | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

better atoi fir <profesor.fir@gmail.com> - 2017-02-10 12:24 -0800
  Re: better atoi fir <profesor.fir@gmail.com> - 2017-02-10 12:35 -0800
  Re: better atoi Joe Pfeiffer <pfeiffer@cs.nmsu.edu> - 2017-02-10 14:48 -0700
    Re: better atoi fir <profesor.fir@gmail.com> - 2017-02-10 14:12 -0800
      Re: better atoi Joe Pfeiffer <pfeiffer@cs.nmsu.edu> - 2017-02-10 22:36 -0700
        Re: better atoi fir <profesor.fir@gmail.com> - 2017-02-11 01:07 -0800
          Re: better atoi Joe Pfeiffer <pfeiffer@cs.nmsu.edu> - 2017-02-11 10:10 -0700
            Re: better atoi fir <profesor.fir@gmail.com> - 2017-02-11 09:26 -0800
              Re: better atoi Joe Pfeiffer <pfeiffer@cs.nmsu.edu> - 2017-02-11 15:36 -0700
                Re: better atoi fir <profesor.fir@gmail.com> - 2017-02-12 00:18 -0800
                Re: better atoi fir <profesor.fir@gmail.com> - 2017-02-12 00:31 -0800
                Re: better atoi fir <profesor.fir@gmail.com> - 2017-02-12 03:47 -0800
                Re: better atoi fir <profesor.fir@gmail.com> - 2017-02-12 04:22 -0800
                Re: better atoi fir <profesor.fir@gmail.com> - 2017-02-12 06:08 -0800
                Re: better atoi fir <profesor.fir@gmail.com> - 2017-02-12 06:13 -0800
                Re: better atoi fir <profesor.fir@gmail.com> - 2017-02-12 07:31 -0800
                Re: better atoi fir <profesor.fir@gmail.com> - 2017-02-12 08:02 -0800
                Re: better atoi fir <profesor.fir@gmail.com> - 2017-02-12 08:08 -0800
                Re: better atoi fir <profesor.fir@gmail.com> - 2017-02-12 08:17 -0800
                Re: better atoi fir <profesor.fir@gmail.com> - 2017-02-12 08:23 -0800
                Re: better atoi Robert Latest <boblatest@yahoo.com> - 2017-02-19 11:11 +0000
            Re: better atoi Ben Bacarisse <ben.usenet@bsb.me.uk> - 2017-02-11 17:33 +0000
              Re: better atoi Joe Pfeiffer <pfeiffer@cs.nmsu.edu> - 2017-02-11 15:35 -0700
                Re: better atoi "James R. Kuyper" <jameskuyper@verizon.net> - 2017-02-11 17:52 -0500
                Re: better atoi Joe Pfeiffer <pfeiffer@cs.nmsu.edu> - 2017-02-11 18:53 -0700
    Re: better atoi Ben Bacarisse <ben.usenet@bsb.me.uk> - 2017-02-10 22:50 +0000
      Re: better atoi Joe Pfeiffer <pfeiffer@cs.nmsu.edu> - 2017-02-10 21:59 -0700
        Re: better atoi Ben Bacarisse <ben.usenet@bsb.me.uk> - 2017-02-11 12:08 +0000
          Re: better atoi Joe Pfeiffer <pfeiffer@cs.nmsu.edu> - 2017-02-11 09:39 -0700
            Re: better atoi Ben Bacarisse <ben.usenet@bsb.me.uk> - 2017-02-11 17:26 +0000
              Re: better atoi Joe Pfeiffer <pfeiffer@cs.nmsu.edu> - 2017-02-11 15:30 -0700
                Re: better atoi Ben Bacarisse <ben.usenet@bsb.me.uk> - 2017-02-11 22:58 +0000
                Re: better atoi Joe Pfeiffer <pfeiffer@cs.nmsu.edu> - 2017-02-11 18:48 -0700
                Re: better atoi Ben Bacarisse <ben.usenet@bsb.me.uk> - 2017-02-12 02:16 +0000
                Re: better atoi "James R. Kuyper" <jameskuyper@verizon.net> - 2017-02-12 09:57 -0500
                Re: better atoi fir <profesor.fir@gmail.com> - 2017-02-12 07:27 -0800
                Re: better atoi jameskuyper@verizon.net - 2017-02-12 08:44 -0800
                Re: better atoi fir <profesor.fir@gmail.com> - 2017-02-12 09:15 -0800
                Re: better atoi Malcolm McLean <malcolm.mclean5@btinternet.com> - 2017-02-12 09:44 -0800
                Re: better atoi BartC <bc@freeuk.com> - 2017-02-12 18:32 +0000
                Re: better atoi Ben Bacarisse <ben.usenet@bsb.me.uk> - 2017-02-12 18:56 +0000
                Re: better atoi BartC <bc@freeuk.com> - 2017-02-12 19:18 +0000
                Re: better atoi Ben Bacarisse <ben.usenet@bsb.me.uk> - 2017-02-13 00:16 +0000
                Re: better atoi BartC <bc@freeuk.com> - 2017-02-13 01:56 +0000
                Re: better atoi Ben Bacarisse <ben.usenet@bsb.me.uk> - 2017-02-13 10:44 +0000
                Re: better atoi BartC <bc@freeuk.com> - 2017-02-13 11:38 +0000
                Re: better atoi Ben Bacarisse <ben.usenet@bsb.me.uk> - 2017-02-13 14:37 +0000
                Re: better atoi BartC <bc@freeuk.com> - 2017-02-13 15:00 +0000
                Re: better atoi Keith Thompson <kst-u@mib.org> - 2017-02-12 11:15 -0800
                Re: better atoi BartC <bc@freeuk.com> - 2017-02-12 19:25 +0000
                Re: better atoi Keith Thompson <kst-u@mib.org> - 2017-02-12 11:54 -0800
                Re: better atoi supercat@casperkitty.com - 2017-02-12 13:13 -0800
    Re: better atoi Keith Thompson <kst-u@mib.org> - 2017-02-10 15:16 -0800
      Re: better atoi Joe Pfeiffer <pfeiffer@cs.nmsu.edu> - 2017-02-10 22:01 -0700
        Re: better atoi Keith Thompson <kst-u@mib.org> - 2017-02-11 01:30 -0800
      Re: better atoi Joe Pfeiffer <pfeiffer@cs.nmsu.edu> - 2017-02-10 22:26 -0700
    Re: better atoi Nick Bowler <nbowler@draconx.ca> - 2017-02-11 00:26 +0000
      Re: better atoi Joe Pfeiffer <pfeiffer@cs.nmsu.edu> - 2017-02-10 22:32 -0700
    Re: better atoi "James R. Kuyper" <jameskuyper@verizon.net> - 2017-02-19 11:10 -0500

csiph-web