Synopsis: | Only standard output specifiers and standard flags shall be used in output format specifications. |
Language: | C |
Severity Level: | 2 |
Category: | Library |
Description: |
Justification The use of non-standard output specifiers or non-standard flags is not portable. Example printf("%#i", i); /* WRONG */ printf("%Lo", i); /* WRONG */ printf("%#u", i); /* WRONG */ printf("%Lx", i); /* WRONG */ printf("%LX", i); /* WRONG */ printf("%hf", f); /* WRONG */ printf("%he", f); /* WRONG */ printf("%hE", f); /* WRONG */ printf("%hg", d); /* WRONG */ printf("%hG", d); /* WRONG */ printf("%#c", c); /* WRONG */ printf("%#%"); /* WRONG */ printf("%#s", p); /* WRONG */ printf("%#n", p); /* WRONG */ printf("%#p", v); /* WRONG */ fprintf(stderr, "error occurred: %m\n”); /* WRONG */ |