aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorseyko <seyko2@gmail.com>2015-05-12 15:24:41 +0300
committerseyko <seyko2@gmail.com>2015-05-12 15:24:41 +0300
commitc52e1a9af516364442c399d98d9e729a288070e3 (patch)
tree87ace5e7f6962b44da982126a96f3ee247ea6f1d
parent121e95d1152b9bf645840ab6928808d1e50e0dc6 (diff)
downloadtinycc-c52e1a9af516364442c399d98d9e729a288070e3.tar.gz
tinycc-c52e1a9af516364442c399d98d9e729a288070e3.tar.bz2
SYMBOL_NAME_LABEL(X) X##:
In the linux kernel sources: #ifdef __STDC__ #define SYMBOL_NAME_LABEL(X) X##: #else #define SYMBOL_NAME_LABEL(X) X/**/: #endif tcc is a STDC compiler and must handle 'X##:' case.
-rw-r--r--tccpp.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/tccpp.c b/tccpp.c
index 1c03feb..c71edf3 100644
--- a/tccpp.c
+++ b/tccpp.c
@@ -3086,7 +3086,9 @@ static inline int *macro_twosharps(const int *ptr0)
/* given 'a##b', remove nosubsts preceding 'b' */
while ((t1 = *++ptr) == TOK_NOSUBST)
;
- if (t1 && t1 != TOK_TWOSHARPS) {
+ if (t1 && t1 != TOK_TWOSHARPS
+ && t1 != ':') /* 'a##:' don't build a new token */
+ {
TOK_GET(&t1, &ptr, &cv1);
if (t != TOK_PLCHLDR || t1 != TOK_PLCHLDR) {
paste_tokens(t, &cval, t1, &cv1);