bootstrappable: Multi-line strings.

This commit is contained in:
Jan Nieuwenhuizen 2017-07-24 13:36:51 +02:00
parent bd04408eff
commit 0be9207e56
5 changed files with 9 additions and 8 deletions

View File

@ -2006,8 +2006,7 @@ PUB_FUNC void tcc_print_stats(TCCState *s, unsigned total_time)
total_time = 1;
if (total_bytes < 1)
total_bytes = 1;
fprintf(stderr, "* %d idents, %d lines, %d bytes\n"
"* %0.3f s, %u lines/s, %0.1f MB/s\n",
fprintf(stderr, "* %d idents, %d lines, %d bytes\n* %0.3f s, %u lines/s, %0.1f MB/s\n",
tok_ident - TOK_IDENT, total_lines, total_bytes,
(double)total_time/1000,
(unsigned)total_lines*1000/total_time,

2
tcc.c
View File

@ -185,7 +185,7 @@ static void print_search_dirs(TCCState *s)
print_dirs("libraries", s->library_paths, s->nb_library_paths);
#ifndef TCC_TARGET_PE
print_dirs("crt", s->crt_paths, s->nb_crt_paths);
printf("libtcc1:\n %s/"TCC_LIBTCC1"\n", s->tcc_lib_path);
printf("libtcc1:\n %s/libtcc1.a\n", s->tcc_lib_path);
printf("elfinterp:\n %s\n", DEFAULT_ELFINTERP(s));
#endif
}

View File

@ -6323,8 +6323,7 @@ static void decl_initializer(CType *type, Section *sec, unsigned long c,
if ((first && tok != TOK_LSTR && tok != TOK_STR) ||
tok == '{') {
if (tok != '{')
tcc_error("character array initializer must be a literal,"
" optionally enclosed in braces");
tcc_error("character array initializer must be a literal, optionally enclosed in braces");
skip('{');
no_oblock = 0;
}

View File

@ -3303,8 +3303,8 @@ static int paste_tokens(int t1, CValue *v1, int t2, CValue *v2)
break;
if (is_space(tok))
continue;
tcc_warning("pasting \"%.*s\" and \"%s\" does not give a valid"
" preprocessing token", n, cstr.data, (char*)cstr.data + n);
tcc_warning("pasting \"%.*s\" and \"%s\" does not give a valid preprocessing token",
n, cstr.data, (char*)cstr.data + n);
ret = 0;
break;
}

View File

@ -494,13 +494,16 @@ ST_FUNC void tcc_tool_cross(TCCState *s, char **argv, int target)
int prefix = tcc_basename(a0) - a0;
snprintf(program, sizeof program,
"%.*s%s"
#if !defined (TCC_TARGET_PE) && !defined (_WIN32)
"%.*s%s-tcc"
#else
#ifdef TCC_TARGET_PE
"-win32"
#endif
"-tcc"
#ifdef _WIN32
".exe"
#endif
#endif
, prefix, a0, target == 64 ? "x86_64" : "i386");