S
SAHIL MAHLA
Could you explain the following statements:
ques 2.9:
"Structures are often returned from functions in a location pointed to by an extra, compiler-supplied ``hidden'' argument to the function"
and then in ques 2.18:
Since structure-valued functions are usually implemented by adding a hidden return pointer (see question 2.9), the generated code for main() tries to accept three arguments, although only two are passed (in this case, by the C start-up code).
Is there a need of adding an extra argument to the function returning the pointer to structure?
Thanks in advance
-Sahil
ques 2.9:
"Structures are often returned from functions in a location pointed to by an extra, compiler-supplied ``hidden'' argument to the function"
and then in ques 2.18:
Since structure-valued functions are usually implemented by adding a hidden return pointer (see question 2.9), the generated code for main() tries to accept three arguments, although only two are passed (in this case, by the C start-up code).
Is there a need of adding an extra argument to the function returning the pointer to structure?
Thanks in advance
-Sahil