118 Chapter 4. GCC Command Optionsto marking things hidden when the default is public is to make the default hidden and markthings public. This is the norm with DLL’s on Windows and with -fvisibility=hidden and__attribute__ ((visibility("default"))) instead of __declspec(dllexport) youget almost identical semantics with identical syntax. This is a great boon to those working withcross-platform projects.For those adding visibility support to existing code, you may find #pragma GCC visibilityof use. This works by you enclosing the declarations you wish to set visibility for with (for ex-ample) #pragma GCC visibility push(hidden) and #pragma GCC visibility pop.These can be nested up to sixteen times. Bear in mind that symbol visibility should be viewedas part of the API interface contract and thus all new code should always specify visibility whenit is not the default ie; declarations only for use within the local DSO should always be markedexplicitly as hidden as so to avoid PLT indirection overheads - making this abundantly clearalso aids readability and self-documentation of the code. Note that due to ISO C++ specificationrequirements, operator new and operator delete must always be of default visibility.An overview of these techniques, their benefits and how to use them is athttp://www.nedprod.com/programs/gccvisibility.html.4.19. Environment Variables Affecting GCCThis section describes several environment variables that affect how GCC operates. Some of themwork by specifying directories or prefixes to use when searching for various kinds of files. Some areused to specify other aspects of the compilation environment.Note that you can also specify places to search using options such as -B, -I and -L (Section 4.14 Op-tions for Directory Search). These take precedence over places specified using environment variables,which in turn take precedence over those specified by the configuration of GCC. .LANGLC_CTYPELC_MESSAGESLC_ALLThese environment variables control the way that GCC uses localization information that allowGCC to work with different national conventions. GCC inspects the locale categories LC_CTYPEand LC_MESSAGES if it has been configured to do so. These locale categories can be set to anyvalue supported by your installation. A typical value is en_GB.UTF-8 for English in the UnitedKingdom encoded in UTF-8.The LC_CTYPE environment variable specifies character classification. GCC uses it to determinethe character boundaries in a string; this is needed for some multibyte encodings that containquote and escape characters that would otherwise be interpreted as a string end or escape.The LC_MESSAGES environment variable specifies the language to use in diagnostic messages.If the LC_ALL environment variable is set, it overrides the value of LC_CTYPE andLC_MESSAGES; otherwise, LC_CTYPE and LC_MESSAGES default to the value of the LANGenvironment variable. If none of these variables are set, GCC defaults to traditional C Englishbehavior.TMPDIRIf TMPDIR is set, it specifies the directory to use for temporary files. GCC uses temporary filesto hold the output of one stage of compilation which is to be used as input to the next stage: forexample, the output of the preprocessor, which is the input to the compiler proper.