Charles

I compiled this on a 1.12 system under both batch and USS and results were as 
expected.  Preprocessor output under USS using a c89 -V gives:

STRINGZ(The, quick, brown, fox);                              
printf("%d %s %s %s %s\n", 5, "The", "quick", "brown", "fox");

You mention seeing the behaviour "only under USS with the cp command" - not 
sure if this is a typo or you did something else before the compile - if you 
confirm I'd be happy to compile using your options on a 1.12 system (if that's 
worth anything...)

Regards

Andy T.


On 1 Sep 2014, at 21:53, Charles Mills <[email protected]> wrote:

> An associate is seeing very strange (apparent) C compiler behavior. z/OS
> V2R1. I would be interested in feedback and comments.
> 
> Consider the following:
> 
> #define V 5                                                            
> #define STRINGZ(a,b,c,d) printf("%d %s %s %s %s\n", V, #a, #b, #c, #d)
> 
> Here is what the compiler is making of it:
> 
> printf("%fox %s %s %s %s\n", 5, "The", "quick", "brown", "fox");
> 
> That is, it is apparently substituting parameter d, "fox", for the d in the
> first printf() argument.
> 
> Neither the MS VS C compiler nor the gnu C compiler appear to behave this
> way.
> 
> I see the behavior only under USS with the cp command; not from an MVS batch
> compile (although I have not yet figured out all of the variables).
> 
> Charles 
> 
> ----------------------------------------------------------------------
> For IBM-MAIN subscribe / signoff / archive access instructions,
> send email to [email protected] with the message: INFO IBM-MAIN

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

Reply via email to