Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!1.eu.feeder.erje.net!newsfeed.fsmpi.rwth-aachen.de!newsfeed.straub-nv.de!eternal-september.org!feeder.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail From: Keith Thompson Newsgroups: comp.lang.c Subject: Re: Spurious diagnostic messages Date: Wed, 20 May 2015 10:44:46 -0700 Organization: None to speak of Lines: 17 Message-ID: <877fs32lf5.fsf@kst-u.example.com> References: <55586ec4.5718781@news.xs4all.nl> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: mx02.eternal-september.org; posting-host="9be37d943435275679235b07c7947eef"; logging-data="25175"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX192ZB4bBmjDrizbgoDpCWOn" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) Cancel-Lock: sha1:VDF9Ztc0qyRA9O7E9VDgnFxtM4o= sha1:3ER8FtOm+Q3C4OsD1Cc4H7X0Ca4= Xref: csiph.com comp.lang.c:62363 Stephen Sprunk writes: [...] > OTOH, if what you really want is to detect letters and numbers in > general, then there are various is*() functions that are far better for > that purpose than anything the average programmer will come up with, and > IMHO we shouldn't tempt him away from the correct solution by offering a > better way to do the incorrect solution. I suspect the average programmer wouldn't write a set of is*() and to*( functions that have undefined behavior when called with a negative `char` argument other than EOF. -- 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"