comparison dmd/template.c @ 305:2b72433d5c8c trunk

[svn r326] Fixed a bunch of issues with printf's that MinGW32 did not support. Fixed problems with label collisions when using labels inside inline asm. LabelStatement is now easily reached given its Identifier, which should be useful elsewhere too. Enabled inline asm for building the lib/compiler/llvmdc runtime code, fixing branches out of asm makes this possible.
author lindquist
date Fri, 27 Jun 2008 22:04:35 +0200
parents 297690b5d4a5
children aaade6ded589
comparison
equal deleted inserted replaced
304:3ebc136702dd 305:2b72433d5c8c
3442 char *id; 3442 char *id;
3443 Objects *args; 3443 Objects *args;
3444 3444
3445 //printf("TemplateInstance::genIdent('%s')\n", tempdecl->ident->toChars()); 3445 //printf("TemplateInstance::genIdent('%s')\n", tempdecl->ident->toChars());
3446 id = tempdecl->ident->toChars(); 3446 id = tempdecl->ident->toChars();
3447 buf.printf("__T%zu%s", strlen(id), id); 3447 buf.printf("__T%"PRIuSIZE"%s", strlen(id), id);
3448 args = tiargs; 3448 args = tiargs;
3449 for (int i = 0; i < args->dim; i++) 3449 for (int i = 0; i < args->dim; i++)
3450 { Object *o = (Object *)args->data[i]; 3450 { Object *o = (Object *)args->data[i];
3451 Type *ta = isType(o); 3451 Type *ta = isType(o);
3452 Expression *ea = isExpression(o); 3452 Expression *ea = isExpression(o);
3509 if (d && !d->type->deco) 3509 if (d && !d->type->deco)
3510 error("forward reference of %s", d->toChars()); 3510 error("forward reference of %s", d->toChars());
3511 else 3511 else
3512 { 3512 {
3513 char *p = sa->mangle(); 3513 char *p = sa->mangle();
3514 buf.printf("%zu%s", strlen(p), p); 3514 buf.printf("%"PRIuSIZE"%s", strlen(p), p);
3515 } 3515 }
3516 } 3516 }
3517 else if (va) 3517 else if (va)
3518 { 3518 {
3519 assert(i + 1 == args->dim); // must be last one 3519 assert(i + 1 == args->dim); // must be last one