Question: 4 . 8 . But some existing optimizing compilers ( including gcc , which tends to be relatively conservative ) will optimize count _ positives
But some existing optimizing compilers including gcc which tends to be relatively conservative will optimize countpositives to something similar to
The code reads as follows:
Line : void count underscore positives open parenthesis list close parenthesis at indentation level
Line : open curly bracket at indentation level
Line : list p semi colon at indentation level
Line : register int r semi colon at indentation level
Line : r equals global underscore positives semi colon at indentation level
Line : for open parenthesis p equals semi colon p semi colon p equals p arrow operator next close parenthesis at indentation level
Line : if open parenthesis p arrow operator val greaterthan close parenthesis pre increment r semi colon at indentation level
Line : global underscore positives equals r semi colon at indentation level
Line : close curly bracket at indentation level
What problem or potential problem occurs with this compiled version of the program if threads A and B are executed concurrently?
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
