warn_hiddenlocals. NXP CodeWarrior Development Studio
Pubblicità
Pubblicità
Chapter 31 Pragmas for Diagnostic Messages
Controls the recognition of conflicts involving case-sensitive filenames within system includes.
Syntax
#pragma warn_filenamecaps_system on | off | reset
Remarks
If you enable this pragma along with warn_filenamecaps
, the compiler issues a warning message when an
#include
directive capitalizes a filename within a system include differently from the way the filename appears on a disk. It also detects use of "8.3" DOS filenames in Windows® systems when a long filename is available. This pragma helps avoid porting problems to operating systems with case-sensitive file names.
To check the spelling of system includes such as the following:
#include <file>
Use this pragma along with the warn_filenamecaps pragma.
By default, this pragma is off.
NOTE
Some SDKs (Software Developer Kits) use "colorful" capitalization, so this pragma may issue a lot of unwanted messages.
31.16 warn_hiddenlocals
Controls the recognition of a local variable that hides another local variable.
Syntax
#pragma warn_hiddenlocals on | off | reset
Remarks
When on
, the compiler issues a warning message when it encounters a local variable that
hides another local variable. An example appears in Listing 31-11 on page 489 .
Listing 31-11. Example of hidden local variables warning
#pragma warn_hiddenlocals on void func(int a)
{
CodeWarrior Development Studio for Advanced Packet Processing Build Tools Reference Manual, Rev.
10.2, 01/2016
Freescale Semiconductor, Inc.
489
Scarica
Pubblicità