Skip to main content

IAR Embedded Workbench for RH850 3.20.x

__printf_args

In this section:
Syntax
#pragma __printf_args
Description

Use this pragma directive on a function with a printf-style format string. For any call to that function, the compiler verifies that the argument to each conversion specifier, for example %d, is syntactically correct.

You cannot use this pragma directive on functions that are members of an overload set with more than one member.

Example
#pragma __printf_args
int printf(char const *,...);

void PrintNumbers(unsigned short x)
{
  printf("%d", x);  /* Compiler checks that x is an integer */
}