From my message here:
http://sourceforge.net/mailarchive/forum.php?thread_id=8127909&forum_id=9982
Pairs of string constants aren't concatenated, as per:
http://eli-project.sourceforge.net/c_html/c.html#s6.1.4
("Sequences of string literals are translated as single
strings.")
Boz suggested I start looking here:
For the first one (concatenating string constants),
take a look at
compile.c, ~line 3009. (Search for DoubleQuote), which
is where quoted strings are handled.
Logged In: YES
user_id=116787
From my digging, it looks like it might be easier to add it
into OnBoardC.c, near line 643. (i.e. make multiple string
constants into a single string token), since it looks like
the code to emit a string constant is generated before the
next token is processed, and so there's not a good place to
hook into in compile.c...
Any comments? Is compile.c a better place for the change,
philosophically?
Patch to implement Concatenation of String Constants.
Logged In: YES
user_id=116787
Okay, I've got something that looks like it will work, at
least for the simple case of:
Char* foo = "aaa" "bbb" "ccc";
I think I might try some more complicated tests next.
Logged In: YES
user_id=116787
After discussing it with people on the mailing list, I think
this patch is a little cleaner...
Logged In: YES
user_id=574706
Originator: NO
Steve, please take a look at this patch.
Logged In: YES
user_id=116787
Originator: YES
It was a while ago, but I seem to remember that there were some odd corner cases that this patch didn't handle. And I'm afraid I'm not going to be much use in figuring them out, since my Palm broke. :(
Good luck!
Logged In: YES
user_id=583634
Originator: NO
I've looked at both the patches, and there's a couple of changes I'd like to make before committing this fix. (Specifically with the way multiple nodes are chained together in the AST)
Reassigning to me, since Blake has said he won't be able to work on this anymore.
(Thanks for the initial work, Blake, it's 90% there, just needs a little tweak)