🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #4381

Re: SAS/C++ 6.56 bugs

#4381
From: Ian Cargill
Date: Sun, 19 Nov 1995 09:37
20 lines
1463 bytes
In article <nBvEx*ahe@yaps.rhein.de>
           arno@yaps.rhein.de "Arno Eigenwillig" writes:

>> 2. the #defines in ctype.h e.g. toupper() cause problems since the term is 
>> used more than once, a problem with *s++ terms.
>
>Of the ANSI functions, only tolower() and toupper() are concerned.
>The workaround is to #undef them or parenthesize the function names.
>I wonder, though, what the ANSI-C experts think of this. (Hence
>x-posting and f'up2.)

The standard requires ALL macro replacements for library functions, except 
getc and putc, to evaluate each of their arguments exactly once.  
If the tolower() and toupper() macros don't handle *s++, then they are 
broken (with respect to the ISO standard, at least.)

-- 
============================================================================
 Ian Cargill  CEng MIEE  | Find out about the Association of C and C++ Users
 Soliton Software Ltd.   |    info@accu.org  OR  http://www.accu.org/accu
Technical Details
Message-ID: <816773878snz@soliton.demon.co.uk>
Path: arc1-ca.pugleaf.net!mail2news.demon.co.uk!soliton.demon.co.uk
References: <48iptn$b1q@macondo.dmu.ac.uk> <nBvEx*ahe@yaps.rhein.de>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!mail2news.demon.co.uk!soliton.demon.co.uk
From: Ian Cargill <ian@soliton.demon.co.uk>
Newsgroups: comp.std.c
Subject: Re: SAS/C++ 6.56 bugs
Date: Sun, 19 Nov 95 09:37:58 GMT
Organization: Soliton Software Ltd.
Distribution: world
Message-ID: <816773878snz@soliton.demon.co.uk>
References: <48iptn$b1q@macondo.dmu.ac.uk> <nBvEx*ahe@yaps.rhein.de>
Reply-To: ian@soliton.demon.co.uk
X-NNTP-Posting-Host: soliton.demon.co.uk
X-Newsreader: Demon Internet Simple News v1.30