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
GCC has a valuable flag -Wmissing-format-attribute which shows functions missing a format attribute. While Clang supports this flag, it currently doesn't do anything.
Code:
$ gcc -c -Wmissing-format-attribute test.ctest.c: In function 'safe_snprintf':test.c:18:9: warning: function 'safe_snprintf' might be a candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format] vsnprintf(outstring, length, format, args); ^~~~~~~~~
$ gcc --versiongcc (GCC) 8.4.1 20200928 (Red Hat 8.4.1-1)
GCC has a valuable flag
-Wmissing-format-attribute
which shows functions missing a format attribute. While Clang supports this flag, it currently doesn't do anything.Code:
GCC warning:
Clang supports the flag but finds no issue:
The text was updated successfully, but these errors were encountered: