aboutsummaryrefslogtreecommitdiff
path: root/tccpp.c
diff options
context:
space:
mode:
authorgrischka <grischka>2013-02-14 06:53:07 +0100
committergrischka <grischka>2013-02-14 06:53:07 +0100
commit944627c479f01d919f10f9d9dd807cca43bf7aba (patch)
treea1ff856b8160b50a1d8fab477def8d5f29dafbe5 /tccpp.c
parente298f608385d51911184281f1cdb09addc560c59 (diff)
downloadtinycc-944627c479f01d919f10f9d9dd807cca43bf7aba.tar.gz
tinycc-944627c479f01d919f10f9d9dd807cca43bf7aba.tar.bz2
configure: cleanup
- add quotes: eval opt=\"$opt\" - use $source_path/conftest.c for OOT build - add fn_makelink() for OOT build - do not check lddir etc. on Windows/MSYS - formatting config-print.c - rename to conftest.c (for consistency) - change option e to b - change output from that from "yes" to "no" - remove inttypes.h dependency - simpify version output Makefile: - improve GCC warning flag checks tcc.h: - add back default CONFIG_LDDIR - add default CONFIG_TCCDIR also (just for fun) tccpp.c: - fix Christian's last warning tccpp.c: In function ‘macro_subst’: tccpp.c:2803:12: warning: ‘*((void *)&cval+4)’ is used uninitialized in this function [-Wuninitialized] That the change fixes the warning doesn't make sense but anyway. libtcc.c: - tcc_error/warning: print correct source filename/line for token :paste: (also inline :asm:) lddir and multiarch logic still needs fixing.
Diffstat (limited to 'tccpp.c')
-rw-r--r--tccpp.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/tccpp.c b/tccpp.c
index ac01d83..f1c9679 100644
--- a/tccpp.c
+++ b/tccpp.c
@@ -2800,13 +2800,13 @@ static inline int *macro_twosharps(const int *macro_str)
{
const int *ptr;
int t;
- CValue cval;
TokenString macro_str1;
CString cstr;
int n, start_of_nosubsts;
/* we search the first '##' */
for(ptr = macro_str;;) {
+ CValue cval;
TOK_GET(&t, &ptr, &cval);
if (t == TOK_TWOSHARPS)
break;
@@ -2835,10 +2835,9 @@ static inline int *macro_twosharps(const int *macro_str)
/* given 'a##b', remove nosubsts preceding 'b' */
while (t == TOK_NOSUBST)
t = *++ptr;
-
if (t && t != TOK_TWOSHARPS) {
+ CValue cval;
TOK_GET(&t, &ptr, &cval);
-
/* We concatenate the two tokens */
cstr_new(&cstr);
cstr_cat(&cstr, get_tok_str(tok, &tokc));
@@ -2846,7 +2845,7 @@ static inline int *macro_twosharps(const int *macro_str)
cstr_cat(&cstr, get_tok_str(t, &cval));
cstr_ccat(&cstr, '\0');
- tcc_open_bf(tcc_state, "<paste>", cstr.size);
+ tcc_open_bf(tcc_state, ":paste:", cstr.size);
memcpy(file->buffer, cstr.data, cstr.size);
for (;;) {
next_nomacro1();