Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
11.9 and function calls and returned pointers
#1
Could you please clarify to me if this violates 11.9:

Code:
int* f1(void) {
    return 0;  // 11.9 ?
}

And does this violate 11.9:

Code:
void f2(int* ptr);

void f3(void) {
    f2(0);
}

Do you consider returns and function calls to be "assignments" otherwise it seems to me that the Amplification says these are compliant?

The last example in the PDF does suggest that function calls should be considered to be "assignments" however there is no non-compliant example code that I can rely on.

Thank you
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)