bugTiny C Compiler - Bugs: bug #10858, String concatenation in...

 
 

bug #10858: String concatenation in preprocessor broken

Submitted by:  None
Submitted on:  Mon 01 Nov 2004 09:13:12 AM UTC  
 
Category: NoneSeverity: 3 - Normal
Item Group: NoneStatus: Fixed
Privacy: PublicAssigned to: None
Open/Closed: Closed

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Fri 19 Oct 2012 01:37:23 PM UTC, comment #2:

The disappearance of the z is due to the #define z at the beginning of the file. Gcc output the same thing as tcc. Hence closing this bug.

Thomas Preud'homme <robotux>
Project Member
Fri 14 Aug 2009 02:48:01 AM UTC, comment #1:

I am having a similar problem in 0.9.25.

For the record the preprocessed output of the original submission (using tcc-0.9.25) is shown below. Note that the ultimate expansion of "PROTO" has dropped the "z", but I think that is the only error.

$ tcc -E bug.c
# 10 "bug.c"
void foo_gazonk_bar(void) {
};

int main(int argc, char **argv) {

foo_gazonkz_bar();

return 0;
}

Paul H. Hargrove <phargrov>
Mon 01 Nov 2004 09:13:12 AM UTC, original submission:

The following code fails in tcc 0.9.21:

#define x foo
#define y bar
#define z

#define CC4(a,b,c,d) a##b##c##d

#define PROTO(a,b) \
void CC4(foo_, a, b, _bar)(void)

PROTO(gazonk, z) {
};

int main(int argc, char **argv) {

CC4(foo_, gazonk, z, _bar)();

return 0;
}

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by robotux (Posted a comment)
  • -unavailable- added by phargrov (Posted a comment)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Fri 19 Oct 2012 01:37:23 PM UTCrobotuxStatusNone=>Fixed
      Open/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup1