View previous topic :: View next topic
|
Author |
Message |
drowelf Warnings : 1 New User
Joined: 03 Mar 2006 Posts: 47 Location: Simpsonville, SC
|
|
|
|
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 |
|
|
sergeyken
Senior Member
Joined: 29 Apr 2008 Posts: 2141 Location: USA
|
|
|
|
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 |
|
|
drowelf Warnings : 1 New User
Joined: 03 Mar 2006 Posts: 47 Location: Simpsonville, SC
|
|
|
|
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 |
|
|
sergeyken
Senior Member
Joined: 29 Apr 2008 Posts: 2141 Location: USA
|
|
|
|
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 |
|
|
|