XDS-C User's Guide
00 00 00 0000000000000000000000 About XDS Welcome to XDS Conventions used in this manual Language descriptions Source code fragments Getting started Using the Modula-2 compiler Using the Oberon-2 compiler Error reporting Building a program Debugging a program Configuring the compiler System search paths Working configuration XDS memory usage Directory hierarchies XDS search paths Redirection file Regular expression Options Configuration file Filename extensions Customizing compiler messages XDS and your C compiler Building the run-time library Configuring XDS for seamless compilation Using the compiler Invoking the compiler Precedence of compiler options XDS compilers operation modes COMPILE mode MAKE mode PROJECT mode GEN mode BROWSE mode ALL submode BATCH submode OPTIONS submode EQUATIONS submode Files generated during compilation Modula-2 compiler Oberon-2 compiler Control file preprocessing Project files Make strategy Smart recompilation Template files Using equation values File name construction Iterators Examples Compiler options and equations Options Options reference __GEN_X86__ - code generation for 386/486/Pentium/PentiumPro __GEN_C__ - ANSI C code generation ASSERT - enable ASSERT generation BSCLOSURE - browse control option BSREDEFINE - browse control option CHANGESYM - permission to change a symbol file CHECKDINDEX - check of dynamic array bounds CHECKDIV - check for a positive divisor (DIV and MOD) CHECKINDEX - check of static array bounds CHECKNIL - NIL pointer dereference check CHECKPROC - check of a formal procedure call CHECKRANGE - range checks (range types and enumerations) CHECKSET - range check of set operations CHECKTYPE - dynamic type guards (Oberon-2 only) COMMENT - copy comments into a generated C code CONVHDRNAME - use file name in the '#include' directive CSTDLIB - definition of the C standard library DIFADR16 - SYSTEM.DIFADR returns 16-bits value FATFS - limit file names to 8.3 GCAUTO - enables implicit call of the garbage collector GENCDIV - generate C division operators GENCPP - generate C++ GENCONSTENUM - generate enumeration as constants GENCTYPES - generate C types GENDATE - insert a date in a C file GENDEBUG - generate code in the debug mode GENFULLFNAME - generate full name in '#lineno' directive GENHISTORY - enable postmortem history GENKRC - generate K&R C GENPROCLASS - generate a specification of a procedure class GENPROFILE - generate additional code for profiling GENSIZE - evaluate sizes of types GENTYPEDEF - generate typedef's for types INDEX16 - index is of 16 bits LINENO - generate line numbers LONGNAME - use long names in batch files M2 - force the Modula-2 compiler M2ADDTYPES - add SHORT and LONG types M2BASE16 - use 16-bits basic types in Modula-2 M2CMPSYM - compare symbol files in Modula-2 M2EXTENSIONS - enable Modula-2 extensions MAIN - mark an Oberon-2 main module MAKEDEF - generate definition MAKEFILE - generate makefile NOEXTERN - do not generate prototypes for external C functions NOHEADER - disable generation of a header file NOOPTIMIZE - disable a set of opimizations O2 - force the Oberon-2 compiler O2ADDKWD - enable additonal keywords in Oberon-2 O2EXTENSIONS - enable Oberon-2 extensions O2ISOPRAGMA - enable ISO Modula-2 pragmas in Oberon O2NUMEXT - enable Oberon-2 scientific extensions OVERWRITE - create a file, always overwrites the old one PROCINLINE - enable in-line procedure expansion STORAGE - enable the default memory management in Modula-2 TARGET16 - C 'int' type is of 16 bits VERBOSE - produce verbose messages VERSIONKEY - append version key to the module initialization WOFF - suppress warning messages XCOMMENTS - preserve exported comments Equations Equations reference ALIGNMENT - data alignment ATTENTION - attention character in template files BATEXT - recompilation batch file extension BATNAME - batch file name BATWIDTH - maximum line width in a batch file BSDEF - pseudo-definition file created by browser extension BSTYLE - browse style CODE - generated C code file extension COMPILERHEAP - heap limit of the compiler COMPILERTHRES - GC threshold of the compiler COPYRIGHT - copyright note DECOR - control of compiler messages DEF - Modula-2 definition module extension ENUMSIZE - default size of enumeration types ENV_HOST - host platform ENV_TARGET - target platform ERRFMT - error message format ERRLIM - maximum number of errors FILE - name of the file being compiled GCTHRESHOLD - garbage collector threshold GENIDLEN - length of an identifier in the generated C text GENINDENT - indentation GENWIDTH - line width in the generated C text HEADER - generated C header file extension HEAPLIMIT - generated program heap limit LINK - linker command line LOOKUP - lookup directive MKFEXT - makefile extension MKFNAME - makefile name MOD - Modula-2 implementation or main module extension MODULE - name of the module being compiled OBERON - Oberon-2 module extension OBJEXT - object file extension PRJ - project file name PRJEXT - project file extension PROJECT - project name SETSIZE - default size of small set types STACKLIMIT - generated program stack limit SYM - symbol file extension TABSTOP - tabulation alignment TEMPLATE - template name (for makefile) Error message format specification The system module COMPILER Compiler messages Lexical errors E001 E002 E003 E004 F005 E006 F010 E012 E171 E172 F173 F174 E175 Syntax errors E007 E008 E081 E082 E083 E085 E086 Semantic errors E020 E021 E022 E028 E023 E024 E025 E026 E027 E029 E030 E031 E032 E033 E034 E035 E036 E037 E038 E039 E040 E041 E043 E044 E046 E047 E048 E049 E050 E051 E052 E053 E054 E055 E057 E058 E059 E060 E061 E062 E064 E065 E067 E068 E069 E071 E072 E074 E075 E076 E078 E087 E088 E089 E090 E091 E092 E093 E094 E095 E096 E097 E098 E099 E100 E102 E107 E109 E110 E111 E112 E113 E114 E116 E118 E119 E120 E121 E122 E123 E124 E125 E126 E128 E129 E131 E132 E133 E134 E135 E136 E137 E139 E140 E141 E143 E144 E145 E146 E147 E148 E149 E150 E151 E152 E153 E154 E155 E156 E158 E159 E160 E161 E162 E163 E200 E201 E202 E203 E206 E208 E219 E220 E221 E281 E282 E283 Symbol files read/write errors F190 F191 F192 F193 F194 F195 Internal errors F103 F104 F105 F106 F142 F196 F197 Warnings W300 W301 W302 W303 W304 W305 W310 W311 W312 W314 W315 W316 W317 W318 Pragma warnings W320 W322 W321 W323 W390 Native XDS warnings W900 W901 W902 W903 W910 W911 W912 W913 W914 W915 XDS-C errors E1001 E1002 E1018 E1003 E1004 E1005 E1006 E1007 E1014 E1015 E1008 E1009 E1010 E1011 E1012 E1013 E1016 E1017 E1019 Checking your program for errors Overview The OSA environment Symbol files Starting OSA Analysed configuration Analysis phases and stages Procedure call graph output How to speedup OSA analysis Analysing part of a program Saving a partially analysed program to file Excluding program parts from subsequent phases Simplified analysis of procedures Turning off context-insensitive analysis Turning off analysis of variable usage OSA messages Message modes Variables Contexts Variable denotations OSA options GRAPH - enable procedure call graph output CLOSED - assume well closed configuration ALLOCATE - assume standard heap manager SHOW - print names of analysed procedures MSYM - only make symbol files FIELD_ALIAS - assume variant field aliasing CI - enable context-insensitive phase CV - enable value calculation phase OSA equations TOP - fake top-level module SAVE_MEM - memory limit CUT - data flow analysis stop stage number SAVE - data flow analysis save stage number READ - continue a prefiously saved analysis ONE - analyse given procedures context-insensitively EU - analysis mode of EU phase INIT - default value for variables COLLECTMIN - minimal amount of memory for garbage collection COLLECTMAX - maximum amount of memory for garbage collection MSGEXT - message file extension IRFEXT - intermediate file extension GRFEXT - call graph file extension XDS Modula-2 ISO Standard compliance Ordering of declarations New language's features Lexis Complex types Sets and packedsets Strings Value constructors Multi-dimensional open arrays Procedure type declarations Procedure constants Whole number division Type conversions NEW and DISPOSE Finalization Exceptions The system module EXCEPTIONS The system module M2EXCEPTION Termination Coroutines Protection Standard procedures Compatibility Expression compatibility Assignment compatibility Value parameter compatibility Variable parameter compatibility System parameter compatibility The Modula-2 module SYSTEM System types System functions System procedures Language extensions Lexical extensions Additional numeric types Type casting Assignment compatibility with BYTE Dynamic arrays Constant array constructors Set complement Read-only parameters Variable number of parameters Read-only export Renaming of imported modules NEW and DISPOSE for dynamic arrays HALT ASSERT Source code directives Inline options and equations Conditional compilation XDS Oberon-2 The Oberon environment Program structure Creating a definition Last changes to the language ASSERT Underscores in identifiers Source code directives Oakwood numeric extensions Complex numbers In-line exponentiation Using Modula-2 features Language extensions Comments String concatenation VAL function Read-only parameters Variable number of parameters Value constructors The Oberon-2 module SYSTEM Compatibility with BYTE Whole system types NEW and DISPOSE M2ADR Run-time support Memory management Postmortem history The oberonRTS module Types and variables Garbage collection Object finalization Meta-language facilities Module iterators Multilanguage programming Modula-2 and Oberon-2 Basic types Data structures Garbage collection Direct language specification Interfacing to C Foreign definition module External procedures specification Relaxation of compatibility rules Assignment compatibility Parameter compatibility Ignoring function result Mapping to C Layout of a generated code Identifiers Data types Basic types Special system types Modula-2 enumeration types Modula-2 set types Record types Pointer types Dynamic arrays Procedure declarations Parameters Open arrays Oberon-2 variable vecord parameters Sequence parameters Function results Procedure body Nested procedures Module initialization and finalization Oberon-2 object-oriented features Oberon-2 run-time data structures Options Describing platform Code generation Evaluating size of types Foreign language interface Code presentation Possible Problems Warnings from C compiler Ordering of record fields Name collisions in C text Using the Win32 API Obtaining API documentation Using the Win32 API in your programs Windows.def: merged versus reexporting Reducing the size of Windows.def Building GUI applications Declaring callbacks Using resources Automatic resource binding Header files Generic GUI application Limitations and restrictions