July 24, 2015
4:34 p.m.
Paul_Koning@Dell.com wrote:
If I read Kees’s comments correctly, he's talking about mismatches between declaration and definition. That’s a different issue; the two should match.
Kees is not talking about this: int a (char *); int a (char const *v) {return *v;} He's talking about this: int b (char *); int b (char *const v) {return *v;} Although the first combination is invalid, the second one conforms to the C standard and this has been true since C89. Any compiler that warns about the second combination is merely complaining about style; it's not a correctness issue.