You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A side issue: as I briefly suggested in my original post, IMO the Checked-C-specific format string checks (currently in CheckVarargsInCheckedScope) should generate at least -Wformat warnings (or maybe even errors) in unchecked scopes too, if checked pointers or arrays are being used. (No new diagnostics would be generated in plain-C code that does not use checked pointers or arrays.) This would be consistent with the passing of arguments to non-variadic functions and would help catch problems sooner. In essence, we want to check a printf argument corresponding to a %s as if the declared parameter type were const char * : itype(_Nt_array_ptr), and so forth. I realize this is outside the scope of the original title of this issue. Do you prefer that I broaden the title or file a separate issue?
The text was updated successfully, but these errors were encountered:
@mattmccutchen-cci suggested the following in #1159:
A side issue: as I briefly suggested in my original post, IMO the Checked-C-specific format string checks (currently in CheckVarargsInCheckedScope) should generate at least -Wformat warnings (or maybe even errors) in unchecked scopes too, if checked pointers or arrays are being used. (No new diagnostics would be generated in plain-C code that does not use checked pointers or arrays.) This would be consistent with the passing of arguments to non-variadic functions and would help catch problems sooner. In essence, we want to check a printf argument corresponding to a %s as if the declared parameter type were const char * : itype(_Nt_array_ptr), and so forth. I realize this is outside the scope of the original title of this issue. Do you prefer that I broaden the title or file a separate issue?
The text was updated successfully, but these errors were encountered: