delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1999/11/30/21:53:18

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT sourceware DOT cygnus DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT sourceware DOT cygnus DOT com>
List-Archive: <http://sourceware.cygnus.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sourceware DOT cygnus DOT com>
List-Help: <mailto:cygwin-help AT sourceware DOT cygnus DOT com>, <http://sourceware.cygnus.com/ml/#faqs>
Sender: cygwin-owner AT sourceware DOT cygnus DOT com
Delivered-To: mailing list cygwin AT sourceware DOT cygnus DOT com
From: N8TM AT aol DOT com
Message-ID: <0.68128eec.2575e728@aol.com>
Date: Tue, 30 Nov 1999 21:51:20 EST
Subject: Re: ANSI compliance problem
To: cygnus AT ncohafmuta DOT com, cygwin AT sourceware DOT cygnus DOT com
MIME-Version: 1.0
X-Mailer: Windows AOL sub 44

In a message dated 11/30/99 9:02:27 AM Pacific Standard Time, 
cygnus AT ncohafmuta DOT com writes:

> In ctype.h:
>  
>  #ifdef __GNUC__
>  # define toupper(c) \
>          ({ int __x = (c); islower(__x) ? (__x - 'a' + 'A') : __x;})
>  
>  this shouldn't be done with the {}s. I dont know how it should be fixed,
>  just that it shouldn't be done. :)
If you object to use of gcc extensions in ctype.h, you could look in 
textbooks such as Plauger's "Standard C Library" for more portable 
alternatives.  But, if you wished gcc to restrict itself to ansi compatible 
pre-processing, you could have told it so, e.g. with -ansi.  If you did that 
and got warning about non-ansi headers, you might have a case for a bug 
report, but it ought to be easy enough for you to qualify this #ifdef with 
__STRICT_ANSI__ as well as __GNUC__ if you believe that is needed.

Tim
tprince AT computer DOT org

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019