home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / xc212os2.zip / BIN / options.cfg < prev    next >
Text File  |  1995-12-29  |  6KB  |  173 lines

  1. ^Compiler options
  2.  [+
  3.  !B2 ;Compiler options
  4.  !   ;This section describes basic compiler options.
  5.  [+
  6.  (CC:"BORLAND","SYMANTEC","Visual C++",!"WATCOM") ; Used C compiler
  7.  []+
  8.  %ERRLIM="100"                          ; Errors limit
  9.  -VERSIONKEY                            ; Check versions consistency
  10.  -DEF                                   ; Allow generation of new SYM files
  11.  
  12. >Memory usage
  13.  [+
  14.  !   ; This section describes memory usage by
  15.  !   ; compiler itself.
  16.  !
  17.  !B  ; Please tune the following equations
  18.  !B  ; according to the amount of the real
  19.  !B  ; (not virtual) memory in your computer.
  20.  !
  21.  [+
  22.  %COMPILERHEAP="8000000"                          ; Compiler heap limit
  23.  !   ; If your computer have less than 12Mb of
  24.  !   ; RAM, set to 4000000; if 16Mb or more, set
  25.  !   ; to 12000000; otherwise, set to 8000000.
  26.  [+
  27.  %COMPILERTHRES="4000000"                         ; Compiler threshold
  28.  
  29. >Source
  30.  !2 ; Modula-2
  31.  [+
  32.  -M2EXTENSIONS                          ; Enable language extensions
  33.  -M2ADDTYPES                            ; Add short and long whole types
  34.  -STORAGE                               ; Default memory management
  35.  ]+
  36.  !2 ; Oberon-2
  37.  [+
  38.  -O2EXTENSIONS                          ; Enable language extensions
  39.  -O2NUMEXT                              ; Enable scientific extensions
  40.  +O2ISOPRAGMA                           ; ISO Modula-2 pragmae
  41.  
  42. >^Runtime checks
  43.  !2B ; Run-time checks
  44.  !2
  45.  !   ; Both Modula and Oberon provide set of exceptions
  46.  !   ; which are generated in all abnormal situations, such
  47.  !   ; as violation of bounds by array index and numeric
  48.  !   ; overflow.
  49.  !
  50.  !   ; To implement this, compiler inserts special instructions,
  51.  !   ; called run-time checks, in generated code. These
  52.  !   ; checks sometimes significantly affect performance,
  53.  !   ; so developer might wish to eliminate them in program
  54.  !   ; that he or she considers free of errors.
  55.  !
  56.  !   ; Compiler has a lot of options that control presence
  57.  !   ; of run-time checks in generated code.
  58.  !
  59.  !B  ; It is strongly recommended to turn off run-time
  60.  !B  ; checks only in final release of well-tested code,
  61.  !B  ; and, if possible, only in speed-sensitive parts.
  62.  
  63. >>Overflow and ranges
  64.  !2 ; Overflow checks
  65.  [+
  66.  +IOVERFLOW                             ; Check integer overflow
  67.  +COVERFLOW                             ; Check cardinal overflow
  68.  +FOVERFLOW                             ; Check real overflow
  69.  ]+
  70.  !2 ; Range checks
  71.  [+
  72.  +CHECKINDEX                            ; Static array bounds checks
  73.  +CHECKDINDEX                           ; Dynamic array bounds checks
  74.  +CHECKRANGE                            ; Range checks for ranges and enums
  75.  +CHECKSET                              ; Range check in set operations
  76. >>Others
  77.  !2 ; Other checks
  78.  [+
  79.  +CHECKNIL                              ; NIL pointer dereference check
  80.  +CHECKPROC                             ; Formal procedure call check
  81.  +CHECKDIV                              ; Check for negative divisor (DIV and MOD)
  82.  +CHECKTYPE                             ; Dynamic type guards check (Oberon-2)
  83.  +ASSERT                                ; Enable ASSERT generation
  84.  
  85. >Runtime options
  86. [+
  87.  %STACKLIMIT="64000"                    ; Stack size
  88. [+
  89.  %HEAPLIMIT="4000000"                   ; Heap size
  90.  [+
  91.  %GCTHRESHOLD="0"                       ; Garbage collector threshold
  92.  ]+
  93. +GCAUTO                                 ; Enable implicit garbage collector calls
  94. -GENHISTORY                             ; Print call chain when exception occurs
  95.  
  96. >Code generation
  97.  [-
  98.  -SPACE                                 ; Favor code size over execution time
  99.  -ALIGNMENT                             ; Align RECORD fields
  100.  -PROCINLINE                            ; Allow procedure inlining
  101.  -NOPTRALIAS                            ; Assume no pointers aliasing
  102.  +GENPTRINIT                            ; Initialize Oberon-2 pointers to NIL
  103.  -GENDEBUG                              ; Generate full debug info
  104.  -LINENO                                ; Place line numbers in OBJ file
  105.  -GENFRAME                              ; Always generate procedure frame
  106.  
  107. ^Warnings
  108. [+
  109. !B2  ; Warnings
  110. !    ; During optimizations, compiler can find an
  111. !    ; inefficient or strange pieces of code in a
  112. !    ; syntactically correct program; sometimes such
  113. !    ; a thing indicates that there is an error in a program,
  114. !    ; so compiler warns you about it.
  115. !
  116. !    ; It is a good programming practice to have as little
  117. !    ; warnings in your program as possible.
  118. !2
  119. ]+
  120. [
  121. +WOFF300 ; Variable declared but never used
  122. +WOFF301 ; Parameter is never used
  123. +WOFF303 ; Procedure declared but never used
  124. +WOFF305 ; Constant declared but never used
  125. ]
  126.  
  127. >Optimizer
  128. [
  129. +WOFF304 ; Possible use before definition
  130. +WOFF302 ; Value was assigned but never used
  131. +WOFF313 ; Redundand code eliminated
  132. +WOFF901 ; Redundand code not eliminated
  133. +WOFF902 ; Constant condition eliminated
  134. +WOFF903 ; Function result not used
  135. +WOFF314 ; Compile time defined value
  136. ]
  137.  
  138. >Program structure
  139. [
  140. +WOFF310 ; Infinite loop
  141. +WOFF311 ; Unreachable code
  142. +WOFF312 ; Loop is executed exactly once
  143. +WOFF905 ; Loop not executed
  144. ]
  145.  
  146. >Project system
  147. [
  148. +WOFF320 ; Undeclared option
  149. +WOFF321 ; Option was already defined
  150. +WOFF322 ; Undeclared equation
  151. +WOFF323 ; Equation was already defined
  152. +WOFF390 ; Obsolete pragma setting
  153. ]
  154.  
  155. >Exceptions
  156. !   ; Sometimes, compiler finds that an exception will be
  157. !   ; raised in a particular program point.
  158. !
  159. !B  ; Almost always that means that there is an error
  160. !B  ; in a program, so it is strongly recommended
  161. !B  ; not to turn this warnings off.
  162. !2
  163. [
  164. +WOFF910 ; RealValueException
  165. +WOFF911 ; WholeValueException
  166. +WOFF912 ; WholeDivException
  167. +WOFF915 ; InvalidLocation (uninitialized variable)
  168. +WOFF914 ; RangeException
  169. +WOFF913 ; IndexException
  170. +WOFF315 ; NIL dereference
  171. ]
  172.  
  173.