IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

XL C Trace Preprocessor Output


IBM Mainframe Forums -> All Other Mainframe Topics
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
drowelf
Warnings : 1

New User


Joined: 03 Mar 2006
Posts: 47
Location: Simpsonville, SC

PostPosted: Sat Jun 24, 2023 5:15 am
Reply with quote

Using XL C on z/OS V2R5. I've got a set of #ifdefs in a header file that are not giving me the results I expect. I know on other compilers I've used in the past that there were options to output all input statements showing the #ifdefs and how the logic was processed. I need the same thing for the XL C compiler, but can not seem to find the proper options. I tried PPONLY, but it only showed the output after preprocessing it does not show the #ifdefs, which I need to see how the logic is getting executed.
Back to top
View user's profile Send private message
sergeyken

Senior Member


Joined: 29 Apr 2008
Posts: 2000
Location: USA

PostPosted: Sat Jun 24, 2023 6:40 pm
Reply with quote

drowelf wrote:
are not giving me the results I expect.

With this sort of “problem description” you can hardly expect any useful hint.

Quote:
My car is not driving where I want to. What is the button I need to press?
Back to top
View user's profile Send private message
drowelf
Warnings : 1

New User


Joined: 03 Mar 2006
Posts: 47
Location: Simpsonville, SC

PostPosted: Sat Jun 24, 2023 7:06 pm
Reply with quote

drowelf wrote:
Using XL C on z/OS V2R5. I've got a set of #ifdefs in a header file that are not giving me the results I expect. I know on other compilers I've used in the past that there were options to output all input statements showing the #ifdefs and how the logic was processed. I need the same thing for the XL C compiler, but can not seem to find the proper options. I tried PPONLY, but it only showed the output after preprocessing it does not show the #ifdefs, which I need to see how the logic is getting executed.


Ok, well the basic Q is how can I trace the output I can't post the actual code due to confidentially, but I just want to know how I can get a trace of the preprocessor input/output along with the evaluation of the #ifdefs/#ifndefs in the header file.
Back to top
View user's profile Send private message
sergeyken

Senior Member


Joined: 29 Apr 2008
Posts: 2000
Location: USA

PostPosted: Sat Jun 24, 2023 8:06 pm
Reply with quote

When I had last used C++ (about 5 years ago) the result of preprocessor I was able to verify as part of compiler listing…

Regarding “confidentiality”: you can always remove or hide any confidential part of code from your presented samples.

As for myself, I always presented an abstract part of suspicious code; mainly consisting of standard language statements, while any statement like:
Secret_value = Number_of_missiles * Power_of_single_missile;
was replaced with
Total_Amount = Items_Number * Item_Volume;
Or even:
X = N * V;

I do not see any problem here.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> All Other Mainframe Topics

 


Similar Topics
Topic Forum Replies
No new posts Sortjoin and Search for a String and ... DFSORT/ICETOOL 1
No new posts How to get a stack trace on a looping... ABENDS & Debugging 5
No new posts Joinkeys - 5 output files DFSORT/ICETOOL 7
No new posts Build a record in output file and rep... DFSORT/ICETOOL 11
No new posts XDC SDSF output to temp dataset CLIST & REXX 4
Search our Forums:

Back to Top