Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watmath!watdragon!jmsellens From: jmsellens@watdragon.UUCP Newsgroups: comp.lang.c,comp.sys.ibm.pc Subject: Re: MSC toupper (was Re: MS-DOS NRO ) Message-ID: <2863@watdragon.UUCP> Date: Mon, 1-Jun-87 14:56:27 EDT Article-I.D.: watdrago.2863 Posted: Mon Jun 1 14:56:27 1987 Date-Received: Tue, 2-Jun-87 01:36:18 EDT References: <405@ritcv.UUCP> <725@thumper.UUCP> <345@polyslo.UUCP> Reply-To: jmsellens@watdragon.UUCP (John M. Sellens) Distribution: na Organization: U. of Waterloo, Ontario Lines: 35 Xref: utgpu comp.lang.c:2169 comp.sys.ibm.pc:3920 Summary: I wish you guys would pay attention ... In article <5915@brl-smoke.ARPA> gwyn@brl.arpa (Doug Gwyn (VLD/VMB) ) writes: >In article <1163@oliveb.UUCP> rap@olivej.UUCP (Robert A. Pease) writes: >>In article <6933@alice.UUCP> ark@alice.UUCP writes: >>>In article <348@polyslo.UUCP>, mpatnode@polyslo.UUCP writes: >>>-> #define toupper ((isupper(c)) ? _tolower(c) : (c)) >>>Gee, I guess MSC 3.00 is broken, then. Maybe they'll fix it in 4.0 >>Its all spelled out. > >It sure is, and if MicroSoft wants to be standard-conforming, >they're going to have to fix this bug. Just because they >document it doesn't make it right. They already have it fixed, as WAS POINTED OUT IN THE ORIGINAL ARTICLE!!! ark@alice wasn't paying attention, and chopped out the part of the article that said that it was fixed in MSC 4.0. And I quote: < ddl@husc6.UUCP (Dan Lanciani) writes: <... <> Not quite. This is a no-no, but for a different reason. The macros <>toupper and tolower do not evaluate their arguments more than once. (At <>least on BSD and MSC 4.0 and other "compatible" systems.) In order to <>avoid multiple eveluation, these macros do NOT check that their arguments <>are suitable. < Well Dan this is straight out of my ctype.h: < <#define toupper ((isupper(c)) ? _tolower(c) : (c)) < < Upon closer evaluation I now see the argument is only evaluated 2 < times. But this was with MSC 3.00 so 4.0 may have change. <... PLEASE PLEASE PLEASE READ the article you are following up to!!