#pragma-option(mbcs)

整理文档很辛苦,赏杯茶钱您下走!

免费阅读已结束,点击下载阅读编辑剩下 ...

阅读已结束,您可以下载文档离线阅读编辑

资源描述

The#pragmaoptionsdirectivespecifiescompileroptionsforyoursourceprogram.SyntaxNotesBydefault,pragmaoptionsgenerallyapplytotheentiresourceprogram.Somepragmasmustbespecifiedbeforeanyprogramsourcestatements.Forthedocumentationformoreinformationonpragmaoptions.Tospecifymorethanonecompileroptionwiththe#pragmaoptionsdirective,separatetheoptionsusingablankspace.Forexample:#pragmaoptionslanglvl=stdc89halt=sspill=1024sourceMost#pragmaoptionsdirectivesmustcomebeforeanystatementsinyoursourceprogram;onlycomments,blanklines,andother#pragmaspecificationscanprecedethem.Forexample,thefirstfewlinesofyourprogramcanbeacommentfollowedbythe#pragmaoptionsdirective:/*Thefollowingisanexampleofa#pragmaoptionsdirective:*/#pragmaoptionslanglvl=stdc89halt=sspill=1024source/*Therestofthesourcefollows...*/Optionsspecifiedbeforeanycodeinyoursourceprogramapplytoyourentireprogramsourcecode.Youcanuseother#pragmadirectivesthroughoutyourprogramtoturnanoptiononforaselectedblockofsourcecode.Forexample,youcanrequestthatpartsofyoursourcecodebeincludedinyourcompilerlisting:#pragmaoptionssource/*Sourcecodebetweenthesourceandnosource#pragmaoptionsisincludedinthecompilerlisting*/#pragmaoptionsnosourceThesettingsinthetablebelowarevalidoptionsfor#pragmaoptions.Formoreinformation,refertothepagesoftheequivalentcompileroption.LanguageApplicationValidsettingsfor#pragmaoptionsoption_keywordCompileroptionequivalentDescriptionalign=option-qalignSpecifieswhataggregatealignmentrulesthecompilerusesforfilecompilation.[no]ansialias-qaliasSpecifieswhethertype-basedaliasingistobeusedduringoptimization.assert=option-qaliasInstructsthecompilertoapplyaliasingassertionstoyourcompilationunit.[no]attrattr=full-qattrProducesanattributelistingcontainingallnames.chars=option-qcharsSeealso#pragmacharsInstructsthecompilertotreatallvariablesoftypecharaseithersignedorunsigned.[no]check-qcheckGeneratescodewhichperformscertaintypesofrun-timechecking.[no]compact-qcompactWhenusedwithoptimization,reducescodesizewherepossible,attheexpenseofexecutionspeed.[no]dbcs-qmbcs,dbcsStringliteralsandcommentscancontainmultibytecharacters.[no]dbxextra-qdbxextraGeneratessymboltableinformationforunreferencedvariables.[no]digraph-qdigraphAllowsspecialdigraphandkeywordoperators.[no]dollar-qdollarAllowsthe$symboltobeusedinthenamesofidentifiers.enum=option-qenumSeealso#pragmaenumSpecifiestheamountofstorageoccupiedbytheenumerations.flag=option-qflagSpecifiestheminimumseveritylevelofdiagnosticmessagestobereported.Severitylevelscanalsobespecifiedwith:#pragmaoptionsflag=i=#pragmareport(level,I)#pragmaoptionsflag=w=#pragmareport(level,W)#pragmaoptionsflag=e,s,u=#pragmareport(level,E)float=[no]option-qfloatSpecifiesvariousfloatingpointoptionstospeeduporimprovetheaccuracyoffloatingpointoperations.[no]flttrap=option-qflttrapGeneratesextrainstructionstodetectandtrapfloatingpointexceptions.[no]fullpath-qfullpathSpecifiesthepathinformationstoredforfilesfordbxstabstrings.halt-qhaltStopscompilerwhenerrorsofthespecifiedseveritydetected.[no]idirfirst-qidirfirstSpecifiessearchorderforuserincludefiles.[no]ignerrno-qignerrnoAllowsthecompilertoperformoptimizationsthatassumeerrnoisnotmodifiedbysystemcalls.[no]ignprag-qignpragInstructsthecompilertoignorecertainpragmastatements.[no]info=option-qinfoSeealso#pragmainfoProducesinformationalmessages.initauto=value-qinitautoInitializesautomaticstoragetoaspecifiedhexadecimalbytevalue.isolated_call=names-qisolated_callSeealso#pragmaisolated_callSpecifiesfunctionsinthesourcefilethathavenosideeffects.langlvl-qlanglvlSpecifiesdifferentlanguagelevels.Thisdirectivecandynamicallyalterpreprocessorbehavior.Asaresult,compilingwiththe-Ecompileroptionmayproduceresultsdifferentfromthoseproducedwhennotcompilingwiththe-Eoption.[no]libansi-qlibansiAssumesthatallfunctionswiththenameofanANSIClibraryfunctionareinfactthesystemfunctions.[no]list-qlistProducesacompilerlistingthatincludesanobjectlisting.[no]longlong-qlonglongAllowslonglongtypesinyourprogram.[no]macpstr-qmacpstrConvertsPascalstringliteralsintonull-terminatedstringswherethefirstbytecontainsthelengthofthestring.[no]maxmem=number-qmaxmemInstructsthecompilertohaltcompilationwhenaspecifiednumberoferrorsofspecifiedorgreaterseverityisreached.[no]mbcs-qmbcs,dbcsStringliteralsandcommentscancontainmultibytecharacters.[no]optimizeoptimize=number-O,optimizeSpecifiestheoptimizationleveltoapplytoasectionofprogramcode.Thecompilerwillacceptthefollowingvaluesfornumber:0-setslevel0optimization2-setslevel2optimization3-setslevel3optimizationIfnovalueisspecifiedfornumber,thecompilerassumeslevel2optimization.priority=number-qprioritySeealso#pragmaprioritySpecifiestheprioritylevelfortheinitializationofstaticconstructors[no]proto-qprotoIfthisoptionisset,thecompilerassumesthatallfunctionsareprototyped.[no]ro-qroSpecifiesthestoragetypeforstringliterals.[no]roconst-qroconstSpecifiesthestoragelocationforconstantvalues.[no]showinc-qshowincIfusedwith-qsource,allincludefilesareincludedinthesourcelisting.[no]source-qsourceProducesasourcelisting.spill=number-qspi

1 / 8
下载文档,编辑使用

©2015-2020 m.777doc.com 三七文档.

备案号:鲁ICP备2024069028号-1 客服联系 QQ:2149211541

×
保存成功