Unrecognized format specifier

A format specifier was used that is not in the part of the standard set of specifiers recognized by the Intel® compiler.

This set includes some extensions that are not part of the ANSI standard. The Intel compiler recognizes format specifiers of the form

"%[flags] [width] [.precision] [size] type"

where flags is one or more characters from the set "0-+ #", width and precision are non-negative decimal integers or an asterisk, size is one of "h", "l", "ll", "I", "I32", "I64", or "w" and type is a single character from the set "aAcCdeEfFgGinopsSuxX%". Not all combinations of size and type are legal. For example, "w" (which means "wide character") should only be used with type "c" (character) or "s" (string).

Another syntax that can trigger this kind of error is the POSIX* extension that refers to specific parameter numbers. For example, "%1$d" uses the first argument to provide the value being formatter as an integer, regardless of where this format specifier appears in the format string. This construct is not supported on Windows* OS.

ID

Observation

Description

1

Format mismatch

Place where the format string was used

Example

          
#include <stdio.h>

extern int x,y;

int main(int argc, char **argv)
{
    printf("%d %z", x, y); // %z is an unrecognized format specifier
    printf("%2$d %1$d, x, y); // unusable on Windows
    // example above is equivalent to printf("%d %d", y, x);
}
        

Copyright © 2010, Intel Corporation. All rights reserved.