...
Code Block | ||||
---|---|---|---|---|
| ||||
/* In another source file */ #include <string.h> void copy(char *dst, const char *src) { if (!strcpy(dst, src)) { /* Report error */ } } /* In this source file --, no copy prototype in scope */ void copy(); void g(const char *s) { char buf[20]; copy(buf, s, sizeof buf); /* Violation */ /* ... */ } |
...