I've again seen some code like this: sprintf(buf, "%s-%s", buf, to_add); and gcc doesn't complain, even though the declaration of sprintf is extern int sprintf (char *__restrict __s, __const char *__restrict __format, ...); Wouldn't it be possible for gcc to check the enforcement of restricted pointer, at least in the trivial cases like this one?
-- Summary: Warning about restricted pointers? Product: gcc Version: 4.3.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: ada AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: samuel dot thibault at ens-lyon dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35503