On Tue, 22 Jan 2019 at 11:08, Andreas Schwab <sch...@suse.de> wrote: > > In file included from ../../gcc/d/d-system.h:23, > from ../../gcc/d/dmd/root/dsystem.h:24, > from ../../gcc/d/dmd/mtype.c:11: > ../../gcc/d/dmd/mtype.c: In member function 'Identifier* > Type::getTypeInfoIdent()': > ../../gcc/d/dmd/mtype.c:2329:33: error: comparison of integer expressions of > different signedness: 'int' and 'size_t' {aka 'long unsigned int'} > [-Werror=sign-compare] > 2329 | assert(0 < length && length < namelen); // don't overflow the > buffer > | ~~~~~~~^~~~~~~~~ > ../../gcc/system.h:742:14: note: in definition of macro 'gcc_assert' > 742 | ((void)(!(EXPR) ? fancy_abort (__FILE__, __LINE__, __FUNCTION__), > 0 : 0)) > | ^~~~ > ../../gcc/d/dmd/mtype.c:2329:5: note: in expansion of macro 'assert' > 2329 | assert(0 < length && length < namelen); // don't overflow the > buffer > | ^~~~~~ >
Sorry that slipped through. Fix has gone in upstream and I'll commit it now. -- Iain --- diff --git a/gcc/d/dmd/MERGE b/gcc/d/dmd/MERGE index e8ab8df4f7b..c1c6cc145c4 100644 --- a/gcc/d/dmd/MERGE +++ b/gcc/d/dmd/MERGE @@ -1,4 +1,4 @@ -180465274b72a2ff218449f6793af0fbaabbcaa3 +e21c07e84bd9668e1c0fc1f45e514c5fd76988e7 The first line of this file holds the git revision number of the last merge done from the dlang/dmd repository. diff --git a/gcc/d/dmd/mtype.c b/gcc/d/dmd/mtype.c index 09161a313ee..2a23cab74fd 100644 --- a/gcc/d/dmd/mtype.c +++ b/gcc/d/dmd/mtype.c @@ -2326,7 +2326,7 @@ Identifier *Type::getTypeInfoIdent() int length = sprintf(name, "_D%lluTypeInfo_%s6__initZ", (unsigned long long) 9 + len, buf.data); //printf("%p, deco = %s, name = %s\n", this, deco, name); - assert(0 < length && length < namelen); // don't overflow the buffer + assert(0 < length && (size_t)length < namelen); // don't overflow the buffer Identifier *id = Identifier::idPool(name, length);