Atmel CAVR-4 Manual De Usuario
![Atmel](https://files.manualsbrain.com/attachments/0369829915bda09f9c2e00fb805a7753579683b5/common/fit/150/50/8d2bf08978ec3e5bc63f4343ac5e91ce8d0e40045619fa520d910d64af8f/brand_logo.png)
CAVR-4
Part 2. Compiler reference
Pragma directives
219
#pragma diag_warning
#pragma diag_warning=tag,tag,...
Changes the severity level to
warning
for the specified diagnostics. For example:
#pragma diag_warning=Pe826
See the chapter Diagnostics for more information about diagnostic messages.
#pragma include_alias
#pragma include_alias "orig_header" "subst_header"
#pragma include_alias <orig_header> <subst_header>
The
#pragma
include_alias
directive makes it possible to provide an alias for a
header file. This is useful for substituting one header file with another, and for
specifying an absolute path to a relative file.
specifying an absolute path to a relative file.
The parameter
subst_header
is used for specifying an alias for
orig_header
. This
pragma directive must appear before the corresponding
#include
directives and
subst_header
must match its corresponding
#include
directive exactly.
Example
#pragma include_alias <stdio.h> <C:\MyHeaders\stdio.h>
#include <stdio.h>
This example will substitute the relative file
stdio.h
with a counterpart located
according to the specified path.
#pragma inline
#pragma inline[=forced]
The
#pragma
inline
directive advises the compiler that the function whose
declaration follows immediately after the directive should be inlined—that is, expanded
into the body of the calling function. Whether the inlining actually takes place is subject
to the compiler’s heuristics.
into the body of the calling function. Whether the inlining actually takes place is subject
to the compiler’s heuristics.
This is similar to the C++ keyword
inline
, but has the advantage of being available in
C code.
Specifying
#pragma inline=forced
disables the compiler’s heuristics and forces the
inlining. If the inlining fails for some reason, for example if it cannot be used with the
function type in question (like
function type in question (like
printf
), an error message is emitted.