tinycc-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Tinycc-devel] Help! Does anyone have a stringify/stringizing patch? (ca


From: David A. Wheeler
Subject: [Tinycc-devel] Help! Does anyone have a stringify/stringizing patch? (case_4)
Date: Thu, 03 May 2007 18:37:13 -0400 (EDT)

Does anyone have a patch for tcc that fixes stringifying/stringizing, e.g., the 
"#" operator? grischka's 2005-09-29 patch case_4 changes tcc's stringifying 
code, but it merely trades one bug for another.  I'm hoping that someone out 
there has already REALLY solved this bug, and we just need to integrate the 
patch in.  It's defined in C99 sectoin 6.10.3.2, if anyone cares.

Here's a test case.  Given this C program:
#include <stdio.h>
#define S(a) #a
int main(void)
{
    // unresolved issue, tcc does either .1 or .2, but not both
    printf("case_4.1: \"long long\"  -> \"%s\"\n", S(long  long));
    printf("case_4.2: \"%s\" -> \"%s\"\n", "push%L0", S(push%L0));
}



Correct output (gcc does this):
==============================
case_4.1: "long long"  -> "long long"
case_4.2: "push%L0" -> "push%L0"


tcc's output (notice the extra whitespace in 4.2):
==============================
case_4.1: "long long"  -> "long long"
case_4.2: "push%L0" -> "push % L0"


--- David A. Wheeler




reply via email to

[Prev in Thread] Current Thread [Next in Thread]