This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
A latent bug in cp-demangle?
- To: gcc at gcc dot gnu dot org
- Subject: A latent bug in cp-demangle?
- From: Branko Čibej <branko dot cibej at hermes dot si>
- Date: Mon, 05 Jun 2000 17:46:13 +0200
- Organization: HERMES SoftLab
Hi,
I noticed the following warnings while bootstrapping today:
gcc -c -DHAVE_CONFIG_H -g -O2 -I. -I../../../gcc/libiberty/../include -W -Wall -Wtraditional ../../../gcc/libiberty/cp-demangle.c
../../../gcc/libiberty/cp-demangle.c: In function `demangle_prefix':
../../../gcc/libiberty/cp-demangle.c:1045: warning: subscript has type `char'
../../../gcc/libiberty/cp-demangle.c: In function `demangle_unqualified_name':
../../../gcc/libiberty/cp-demangle.c:1106: warning: subscript has type `char'
../../../gcc/libiberty/cp-demangle.c: In function `demangle_number_literally':
../../../gcc/libiberty/cp-demangle.c:1210: warning: subscript has type `char'
../../../gcc/libiberty/cp-demangle.c: In function `demangle_type':
../../../gcc/libiberty/cp-demangle.c:1795: warning: subscript has type `char'
../../../gcc/libiberty/cp-demangle.c: In function `demangle_discriminator':
../../../gcc/libiberty/cp-demangle.c:2713: warning: subscript has type `char'
All of them are caused by a char being used in a call to isdigit
instead of an int. In my experience this kind of warning almost
always causes a bug on one platform or another. Should these
subscripts be fixed?
Brane
--
Branko Čibej <branko.cibej@hermes.si>
HERMES SoftLab, Litijska 51, 1000 Ljubljana, Slovenia
voice: (+386 1) 586 53 49 fax: (+386 1) 586 52 70