#pragmaoption(mbcs).doc_第1页
#pragmaoption(mbcs).doc_第2页
#pragmaoption(mbcs).doc_第3页
#pragmaoption(mbcs).doc_第4页
#pragmaoption(mbcs).doc_第5页
已阅读5页,还剩3页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

The #pragma options directive specifies compiler options for your source program. SyntaxNotesBy default, pragma options generally apply to the entire source program. Some pragmas must be specified before any program source statements. For the documentation for more information on pragma options. To specify more than one compiler option with the #pragma options directive, separate the options using a blank space. For example: #pragma options langlvl=stdc89 halt=s spill=1024 sourceMost #pragma options directives must come before any statements in your source program; only comments, blank lines, and other #pragma specifications can precede them. For example, the first few lines of your program can be a comment followed by the #pragma options directive: /* The following is an example of a #pragma options directive: */#pragma options langlvl=stdc89 halt=s spill=1024 source/* The rest of the source follows . */Options specified before any code in your source program apply to your entire program source code. You can use other #pragma directives throughout your program to turn an option on for a selected block of source code. For example, you can request that parts of your source code be included in your compiler listing: #pragma options source/* Source code between the source and nosource #pragma options is included in the compiler listing */#pragma options nosourceThe settings in the table below are valid options for #pragma options. For more information, refer to the pages of the equivalent compiler option. Language Application Valid settings for #pragma options option_keyword Compiler option equivalent Description align=option -qalign Specifies what aggregate alignment rules the compiler uses for file compilation. noansialias -qalias Specifies whether type-based aliasing is to be used during optimization. assert=option -qalias Instructs the compiler to apply aliasing assertions to your compilation unit. noattr attr=full -qattr Produces an attribute listing containing all names. chars=option -qchars See also #pragma chars Instructs the compiler to treat all variables of type char as either signed or unsigned. nocheck -qcheck Generates code which performs certain types of run-time checking. nocompact -qcompact When used with optimization, reduces code size where possible, at the expense of execution speed. nodbcs -qmbcs, dbcs String literals and comments can contain multibyte characters. nodbxextra -qdbxextra Generates symbol table information for unreferenced variables. nodigraph -qdigraph Allows special digraph and keyword operators. nodollar -qdollar Allows the $ symbol to be used in the names of identifiers. enum=option -qenum See also #pragma enum Specifies the amount of storage occupied by the enumerations. flag=option -qflag Specifies the minimum severity level of diagnostic messages to be reported. Severity levels can also be specified with: #pragma options flag=i = #pragma report (level,I) #pragma options flag=w = #pragma report (level,W) #pragma options flag=e,s,u = #pragma report (level,E) float=nooption -qfloat Specifies various floating point options to speed up or improve the accuracy of floating point operations. noflttrap=option -qflttrap Generates extra instructions to detect and trap floating point exceptions. nofullpath -qfullpath Specifies the path information stored for files for dbx stabstrings. halt -qhalt Stops compiler when errors of the specified severity detected. noidirfirst -qidirfirst Specifies search order for user include files. noignerrno -qignerrno Allows the compiler to perform optimizations that assume errno is not modified by system calls. noignprag -qignprag Instructs the compiler to ignore certain pragma statements. noinfo=option -qinfo See also #pragma info Produces informational messages. initauto=value -qinitauto Initializes automatic storage to a specified hexadecimal byte value. isolated_call=names -qisolated_call See also #pragma isolated_call Specifies functions in the source file that have no side effects. langlvl -qlanglvl Specifies different language levels. This directive can dynamically alter preprocessor behavior. As a result, compiling with the -E compiler option may produce results different from those produced when not compiling with the -E option. nolibansi -qlibansi Assumes that all functions with the name of an ANSI C library function are in fact the system functions. nolist -qlist Produces a compiler listing that includes an object listing. nolonglong -qlonglong Allows long long types in your program. nomacpstr -qmacpstr Converts Pascal string literals into null-terminated strings where the first byte contains the length of the string. nomaxmem=number -qmaxmem Instructs the compiler to halt compilation when a specified number of errors of specified or greater severity is reached. nombcs -qmbcs, dbcs String literals and comments can contain multibyte characters. nooptimize optimize=number -O, optimize Specifies the optimization level to apply to a section of program code. The compiler will accept the following values for number: 0 - sets level 0 optimization 2 - sets level 2 optimization 3 - sets level 3 optimization If no value is specified for number, the compiler assumes level 2 optimization. priority=number -qpriority See also #pragma priority Specifies the priority level for the initialization of static constructors noproto -qproto If this option is set, the compiler assumes that all functions are prototyped. noro -qro Specifies the storage type for string literals. noroconst -qroconst Specifies the storage location for constant values. noshowinc -qshowinc If used with -qsource, all include files are included in the source listing. nosource -qsource Produces a source listing. spill=number -qspill Specifies the size of the register allocation spill area. nosrcmsg -qsrcmsg Adds the corresponding source code lines to the diagnostic messages in the stderr file. nostdinc -qstdinc Specifies which files are included with #include and #include file_name directives. nostrict -qstrict Turns off aggressive op

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论