Thanks. I should have made it clear that workarounds were pretty obvious to us 
and not what I was looking for here.

My colleague is working on a preprocessor and thus does not really have control 
of how the source code is written.

Charles

-----Original Message-----
From: IBM Mainframe Discussion List [mailto:[email protected]] On Behalf 
Of David Price
Sent: Monday, September 01, 2014 10:18 PM
To: [email protected]
Subject: Re: IBM C compiler substituting for macros inside literals?

Charles,
it must be bug with the macro preprocessor used by USS's cc comand.
Even K&R's 1978 definition of C makes it clear that arguments inside "..." 
strings are not to be substituted.

An obvious workaround would be
#define V 5                                                            
#define STRINGZ(w,x,y,z) printf("%d %s %s %s %s\n", V, #w, #x, #y, #z) but such 
a clear bug makes you wonder how many programs out there it has affected.
Then again, maybe everyone is using c89, c99, c++ or xlc for any important USS 
C programs.

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to