This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

A latent bug in cp-demangle?


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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]