delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1997/11/19/10:42:50

From: rhg AT cps DOT com (Richard H. Gumpertz)
Subject: b18 ctype.h isXXX and -Wall -pedantic
19 Nov 1997 10:42:50 -0800 :
Message-ID: <34732839.2E89.cygnus.gnu-win32@cps.com>
Mime-Version: 1.0
To: gnu-win32 AT cygnus DOT com

When I use isdigit (and similar isXXX macros) from b18 ctype.h and
compile with -Wall -pedantic, I get spurious warnings for each use
of the macro:
	"warning: subscript has type `char'"

An appropriate fix would probably be to replace
	(_ctype_+1)[c]
in each of the macros with either
	(_ctype_+1)[(int)(c)]
or
	_ctype_[1+(int)(c)]
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".

- Raw text -


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