Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: removed diagnostic required from the last compliant example

...

Code Block
bgColor#ccccff
langc
/* in another source file */
 
long f(long x) {
  return x < 0 ? -x : x;
}

/* f prototype in scope in this source file */

long f(long x); 

int g(long x) {
  return f(x);  // diagnostic required* returns -x if x<0 or else returns x */
}

 

Noncompliant Code Example (POSIX)

...