messages.tex 61 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202
  1. \section{General compiler messages}
  2. This section gives the compiler messages which are not fatal, but which
  3. display useful information. The number of such messages can be
  4. controlled with the various verbosity level \var{-v} switches.
  5. \begin{description}
  6. \item [Compiler: arg1]
  7. When the \var{-vt} switch is used, this line tells you what compiler
  8. is used.
  9. \item [Compiler OS: arg1]
  10. When the \var{-vd} switch is used, this line tells you what the source
  11. operating system is.
  12. \item [Info: Target OS: arg1]
  13. When the \var{-vd} switch is used, this line tells you what the target
  14. operating system is.
  15. \item [Using executable path: arg1]
  16. When the \var{-vt} switch is used, this line tells you where the compiler
  17. looks for it's binaries.
  18. \item [Using unit path: arg1]
  19. When the \var{-vt} switch is used, this line tells you where the compiler
  20. looks for compiled units. You can set this path with the \var{-Fu}
  21. \item [Using include path: arg1]
  22. When the \var{-vt} switch is used, this line tells you where the compiler
  23. looks for it's include files (files used in \var{\{\$I xxx\}} statements).
  24. You can set this path with the \var{-I} option.
  25. \item [Using library path: arg1]
  26. When the \var{-vt} switch is used, this line tells you where the compiler
  27. looks for the libraries. You can set this path with the \var{-Fl} option.
  28. \item [Using object path: arg1]
  29. When the \var{-vt} switch is used, this line tells you where the compiler
  30. looks for object files you link in (files used in \var{\{\$L xxx\}} statements).
  31. You can set this path with the \var{-Fo} option.
  32. \item [Info: arg1 Lines compiled, arg2 sec]
  33. When the \var{-vi} switch is used, the compiler reports the number
  34. of lines compiled, and the time it took to compile them (real time,
  35. not program time).
  36. \item [Fatal: No memory left]
  37. The compiler doesn't have enough memory to compile your program. There are
  38. several remedies for this:
  39. \begin{itemize}
  40. \item If you're using the build option of the compiler, try compiling the
  41. different units manually.
  42. \item If you're compiling a huge program, split it up in units, and compile
  43. these separately.
  44. \item If the previous two don't work, recompile the compiler with a bigger
  45. heap (you can use the \var{-Ch} option for this, \seeo{Ch})
  46. \end{itemize}
  47. \end{description}
  48. \section{Scanner messages.}
  49. This section lists the messages that the scanner emits. The scanner takes
  50. care of the lexical structure of the pascal file, i.e. it tries to find
  51. reserved words, strings, etc. It also takes care of directives and
  52. conditional compiling handling.
  53. \begin{description}
  54. \item [Fatal: Unexpected end of file]
  55. this typically happens in one of the following cases :
  56. \begin{itemize}
  57. \item The source file ends before the final \var{end.} statement. This
  58. happens mostly when the \var{begin} and \var{end} statements aren't
  59. balanced;
  60. \item An include file ends in the middle of a statement.
  61. \item A comment wasn't closed.
  62. \end{itemize}
  63. \item [Fatal: String exceeds line]
  64. You forgot probably to include the closing ' in a string, so it occupies
  65. multiple lines.
  66. \item [Fatal: illegal character]
  67. An illegal character was encountered in the input file.
  68. \item [Fatal: Syntax error, arg1 expected but arg2 found]
  69. This indicates that the compiler expected a different token than
  70. the one you typed. It can occur almost everywhere where you make a
  71. mistake against the pascal language.
  72. \item [Start reading includefile arg1]
  73. When you provide the \var{-vt} switch, the compiler tells you
  74. when it starts reading an included file.
  75. \item [Warning: Comment level arg1 found]
  76. When the \var{-vw} switch is used, then the compiler warns you if
  77. it finds nested comments. Nested comments are not allowed in Turbo Pascal
  78. and can be a possible source of errors.
  79. \item [Note: directive (FAR) ignored]
  80. The \var{FAR} directive is a 16-bit construction which is recorgnised
  81. but ignored by the compiler, since it produces 32 bit code.
  82. \item [Note: Stack check is global under Linux]
  83. Stack checking with the \var{-Cs} switch is ignored under \linux, since
  84. \linux does this for you. Only displayed when \var{-vn} is used.
  85. \item [Note: Ignored compiler switch arg1]
  86. With \var{-vn} on, the compiler warns if it ignores a switch
  87. \item [Warning: Illegal compiler switch arg1]
  88. You included a compiler switch (i.e. \var{\{\$... \}}) which the compiler
  89. doesn't know.
  90. \item [Warning: This compiler switch has a global effect]
  91. When \var{-vw} is used, the compiler warns if a switch is global.
  92. \item [Error: Illegal char constant]
  93. This happens when you specify a character with its ASCII code, as in
  94. \var{\#96}, but the number is either illegal, or out of range. The range
  95. is 1-255.
  96. \item [Fatal: Can't open file arg1]
  97. \fpc cannot find the program or unit source file you specified on the
  98. command line.
  99. \item [Fatal: Can't open include file arg1]
  100. \fpc cannot find the source file you specified in a \var{\{\$include ..\}}
  101. statement.
  102. \item [Error: Too many argENDIFs or argELSEs]
  103. Your \var{\{\$IFDEF ..\}} and {\{\$ENDIF\}} statements aren't balanced.
  104. \item [Warning: Records fields can be aligned to 1,2,4 or 16 bytes only]
  105. You are specifying the \var{\{\$PACKRECORDS n\} } with an illegal value for
  106. \var{n}. Only 1,2,4 or 16 are valid in this case.
  107. \item [Warning: Enumerated can be saved in 1,2 or 4 bytes only]
  108. You are specifying the \var{\{\$PACKENUM n\}} with an illegal value for
  109. \var{n}. Only 1,2 or 4 are valid in this case.
  110. \item [Error: arg1 expected for arg2 defined in line arg3]
  111. Your conditional compilation statements are unbalanced.
  112. \item [Error: Syntax error while parsing a conditional compiling expression]
  113. There is an error in the expression following the \var{\{\$if ..\}} compiler
  114. directive.
  115. \item [Error: Evaluating a conditional compiling expression]
  116. There is an error in the expression following the \var{\{\$if ..\}} compiler
  117. directive.
  118. \item [Warning: Macro contents is cut after char 255 to evalute expression]
  119. The contents of macros canno be longer than 255 characters. This is a
  120. safety in the compiler, to prevent buffer overflows. This is shown as a
  121. warning, i.e. when the \var{-vw} switch is used.
  122. \item [Error: ENDIF without IF(N)DEF]
  123. Your \var{\{\$IFDEF ..\}} and {\{\$ENDIF\}} statements aren't balanced.
  124. \item [Fatal: User defined: arg1]
  125. A user defined fatal error occurred. see also the \progref
  126. \item [Error: User defined: arg1]
  127. A user defined error occurred. see also the \progref
  128. \item [Warning: User defined: arg1]
  129. A user defined warning occurred. see also the \progref
  130. \item [Note: User defined: arg1]
  131. A user defined note was encountered. see also the \progref
  132. \item [Hint: User defined: arg1]
  133. A user defined hint was encountered. see also the \progref
  134. \item [Info: User defined: arg1]
  135. User defined information was encountered. see also the \progref
  136. \item [Error: Keyword redefined as macro has no effect]
  137. You cannot redefine keywords with macros.
  138. \item [Fatal: Macro buffer overflow while reading or expanding a macro]
  139. Your macro or it's result was too long for the compiler.
  140. \item [Warning: Extension of macros exceeds a deep of 16.]
  141. When expanding a macro macros have been nested to a level of 16.
  142. The compiler will expand no further, since this may be a sign that
  143. recursion is used.
  144. \item [Error: compiler switches aren't allowed in (* ... *) styled comments]
  145. Compiler switches should always be between \var{\{ \}} comment delimiters.
  146. \item [Handling switch "arg1"]
  147. When you set debugging info on (\var{-vd}) the compiler tells you when it
  148. is evaluating conditional compile statements.
  149. \item [ENDIF arg1 found]
  150. When you turn on conditional messages(\var{-vc}), the compiler tells you
  151. where it encounters conditional statements.
  152. \item [IFDEF arg1 found, arg2]
  153. When you turn on conditional messages(\var{-vc}), the compiler tells you
  154. where it encounters conditional statements.
  155. \item [IFOPT arg1 found, arg2]
  156. When you turn on conditional messages(\var{-vc}), the compiler tells you
  157. where it encounters conditional statements.
  158. \item [IF arg1 found, arg2]
  159. When you turn on conditional messages(\var{-vc}), the compiler tells you
  160. where it encounters conditional statements.
  161. \item [IFNDEF arg1 found, arg2]
  162. When you turn on conditional messages(\var{-vc}), the compiler tells you
  163. where it encounters conditional statements.
  164. \item [ELSE arg1 found, arg2]
  165. When you turn on conditional messages(\var{-vc}), the compiler tells you
  166. where it encounters conditional statements.
  167. \item [Skipping until...]
  168. When you turn on conditional messages(\var{-vc}), the compiler tells you
  169. where it encounters conditional statements, and whether it is skipping or
  170. compiling parts.
  171. \item [Info: Press <return> to continue]
  172. When the \var{-vi} switch is used, the compiler stops compilation
  173. and waits for the \var{Enter} key to be pressed when it encounters
  174. a \var{\{\$STOP\}} directive.
  175. \item [Warning: Unsupported switch arg1]
  176. When warings are turned on (\var{-vw}) the compiler warns you about
  177. unsupported switches. This means that the switch is used in Delphi or
  178. Turbo Pascal, but not in \fpc
  179. \item [Warning: Illegal compiler directive arg1]
  180. When warings are turned on (\var{-vw}) the compiler warns you about
  181. unrecognised switches. For a list of recognised switches, \progref
  182. \item [Back in arg1]
  183. When you use (\var{-vt}) the compiler tells you when it has finished
  184. reading an include file.
  185. \item [Warning: Unsupported application type: arg1]
  186. You get this warning, ff you specify an unknown application type
  187. with the directive \var{\{\$APPTYPE\}}
  188. \item [Warning: APPTYPE isn't support by the target OS]
  189. The \var{\{\$APPTYPE\}} directive is supported by win32 applications only.
  190. \item [Warning: Unsupported assembler style specified arg1]
  191. When you specify an assembler mode with the \var{\{\$ASMMODE xxx\}}
  192. the compiler didn't recognize the mode you specified.
  193. \item [Warning: ASM reader switch is not possible inside asm statement, arg1 will be effective only for next]
  194. It is not possible to switch from one assembler reader to another
  195. inside an assmebler block. The new reader will be used for next
  196. assembler statement only.
  197. \item [Error: Wrong switch toggle, use ON/OFF or +/-]
  198. You need to use ON or OFF or a + or - to toggle the switch
  199. \item [Error: Resource files are not supported for this target]
  200. The target you are compiling for doesn't support Resource files. The
  201. only target which can use resource files is Win32
  202. \end{description}
  203. \section{Parser messages}
  204. This section lists all parser messages. The parser takes care of the
  205. semantics of you language, i.e. it determines if your pascal constructs
  206. are correct.
  207. \begin{description}
  208. \item [Error: Parser - Syntax Error]
  209. An error against the Turbo Pascal language was encountered. This happens
  210. typically when an illegal character is found in the sources file.
  211. \item [Warning: Procedure type FAR ignored]
  212. This is a warning. \var{FAR} is a construct for 8 or 16 bit programs. Since
  213. the compile generates 32 bit programs, it ignores this directive.
  214. \item [Warning: Procedure type NEAR ignored]
  215. This is a warning. \var{NEAR} is a construct for 8 or 16 bit programs. Since
  216. the compile generates 32 bit programs, it ignores this directive.
  217. \item [Warning: Procedure type REGISTER ignored]
  218. This is a warning. \var{REGISTER} is ignored by FPC programs for now.
  219. This is introduced first for Delphi compatibility.
  220. \item [Error: No DLL File specified]
  221. No longer in use.
  222. \item [Error: Duplicate exported function name arg1]
  223. Exported function names inside a specific DLL must all be different
  224. \item [Error: Duplicate exported function index arg1]
  225. Exported function names inside a specific DLL must all be different
  226. \item [Error: Invalid index for exported function]
  227. DLL function index must be in the range \var{1..\$FFFF}
  228. \item [Error: Constructor name must be INIT]
  229. You are declaring a constructor with a name which isn't \var{init}, and the
  230. \var{-Ss} switch is in effect. See the \var{-Ss} switch (\seeo{Ss}).
  231. \item [Error: Destructor name must be DONE]
  232. You are declaring a constructor with a name which isn't \var{done}, and the
  233. \var{-Ss} switch is in effect. See the \var{-Ss} switch (\seeo{Ss}).
  234. \item [Error: Illegal open parameter]
  235. You are trying to use the wrong type for an open parameter.
  236. \item [Error: Procedure type INLINE not supported]
  237. You tried to compile a program with C++ style inlining, and forgot to
  238. specify the \var{-Si} option (\seeo{Si}). The compiler doesn't support C++
  239. styled inlining by default.
  240. \item [Warning: Private methods shouldn't be VIRTUAL]
  241. You declared a method in the private part of a object (class) as
  242. \var{virtual}. This is not allowed. Private methods cannot be overridden
  243. anyway.
  244. \item [Warning: Constructor should be public]
  245. Constructors must be in the 'public' part of an object (class) declaration.
  246. \item [Warning: Destructor should be public]
  247. Destructors must be in the 'public' part of an object (class) declaration.
  248. \item [Note: Class should have one destructor only]
  249. You can declare only one destructor for a class.
  250. \item [Error: Local class definitions are not allowed]
  251. Classes must be defined globally. They cannot be defined inside a
  252. procedure or function
  253. \item [Fatal: Anonym class definitions are not allowed]
  254. An invalid object (class) declaration was encountered, i.e. an
  255. object or class without methods that isn't derived from another object or
  256. class. For example:
  257. \begin{verbatim}
  258. Type o = object
  259. a : longint;
  260. end;
  261. \end{verbatim}
  262. will trigger this error.
  263. \item [Error: The object arg1 has no VMT]
  264. \item [Error: Illegal parameter list]
  265. You are calling a function with parameters that are of a different type than
  266. the declared parameters of the function.
  267. \item [Error: Wrong parameter type specified for arg no. arg1]
  268. There is an error in the parameter list of the function or procedure.
  269. The compiler cannot determine the error more accurate than this.
  270. \item [Error: Wrong amount of parameters specified]
  271. There is an error in the parameter list of the function or procedure,
  272. the number of parameters is not correct.
  273. \item [Error: overloaded identifier arg1 isn't a function]
  274. The compiler encountered a symbol with the same name as an overloaded
  275. function, but it isn't a function it can overload.
  276. \item [Error: overloaded functions have the same parameter list]
  277. You're declaring overloaded functions, but with the same parameter list.
  278. Overloaded function must have at least 1 different parameter in their
  279. declaration.
  280. \item [Error: function header doesn't match the forward declaration arg1]
  281. You declared a function with same parameters but
  282. different result type or function specifiers.
  283. \item [Error: function header arg1 doesn't match forward : var name changes arg2 => arg3]
  284. You declared the function in the \var{interface} part, or with the
  285. \var{forward} directive, but define it with a different parameter list.
  286. \item [Note: Values in enumeration types have to be ascending]
  287. \fpc allows enumeration constructions as in C. Given the following
  288. declaration two declarations:
  289. \begin{verbatim}
  290. type a = (A_A,A_B,A_E:=6,A_UAS:=200);
  291. type a = (A_A,A_B,A_E:=6,A_UAS:=4);
  292. \end{verbatim}
  293. The second declaration would produce an error. \var{A\_UAS} needs to have a
  294. value higher than \var{A\_E}, i.e. at least 7.
  295. \item [Note: Interface and implementation names are different arg1 => arg2]
  296. This note warns you if the implementation and interface names of a
  297. functions are different, but they have the same mangled name. This
  298. is important when using overloaded functions (but should produce no error).
  299. \item [Error: With can not be used for variables in a different segment]
  300. With stores a variable locally on the stack,
  301. but this is not possible if the variable belongs to another segment.
  302. \item [Error: function nesting > 31]
  303. You can nest function definitions only 31 times.
  304. \item [Error: range check error while evaluating constants]
  305. The constants are out of their allowed range.
  306. \item [Warning: range check error while evaluating constants]
  307. The constants are out of their allowed range.
  308. \item [Error: duplicate case label]
  309. You are specifying the same label 2 times in a \var{case} statement.
  310. \item [Error: Upper bound of case range is less than lower bound]
  311. The upper bound of a \var{case} label is less than the lower bound and this
  312. is useless
  313. \item [Error: typed constants of classes are not allowed]
  314. You cannot declare a constant of type class or object.
  315. \item [Error: functions variables of overloaded functions are not allowed]
  316. You are trying to assign an overloaded function to a procedural variable.
  317. This isn't allowed.
  318. \item [Error: string length must be a value from 1 to 255]
  319. The length of a string in Pascal is limited to 255 characters. You are
  320. trying to declare a string with length lower than 1 or greater than 255
  321. (This is not true for \var{Longstrings} and \var{AnsiStrings}.
  322. \item [Warning: use extended syntax of NEW and DISPOSE for instances of objects]
  323. If you have a pointer \var{a} to a class type, then the statement
  324. \var{new(a)} will not initialize the class (i.e. the constructor isn't
  325. called), although space will be allocated. you should issue the
  326. \var{new(a,init)} statement. This will allocate space, and call the
  327. constructor of the class.
  328. \item [Warning: use of NEW or DISPOSE for untyped pointers is meaningless]
  329. \item [Error: use of NEW or DISPOSE is not possible for untyped pointers]
  330. You cannot use \var{new(p)} or \var{dispose(p)} if \var{p} is an untyped pointer
  331. because no size is associated to an untyped pointer.
  332. Accepted for compatibility in \var{tp} and \var{delphi} modes.
  333. \item [Error: class identifier expected]
  334. This happens when the compiler scans a procedure declaration that contains
  335. a dot,
  336. i.e., a object or class method, but the type in front of the dot is not
  337. a known type.
  338. \item [Error: type identifier not allowed here]
  339. You cannot use a type inside an expression.
  340. \item [Error: method identifier expected]
  341. This identifier is not a method.
  342. This happens when the compiler scans a procedure declaration that contains
  343. a dot, i.e., a object or class method, but the procedure name is not a
  344. procedure of this type.
  345. \item [Error: function header doesn't match any method of this class]
  346. This identifier is not a method.
  347. This happens when the compiler scans a procedure declaration that contains
  348. a dot, i.e., a object or class method, but the procedure name is not a
  349. procedure of this type.
  350. \item [procedure/function arg1]
  351. When using the \var{-vp} switch, the compiler tells you when it starts
  352. processing a procedure or function implementation.
  353. \item [Error: Illegal floating point constant]
  354. The compiler expects a floating point expression, and gets something else.
  355. \item [Error: FAIL can be used in constructors only]
  356. You are using the \var{FAIL} instruction outside a constructor method.
  357. \item [Error: Destructors can't have parameters]
  358. You are declaring a destructor with a parameter list. Destructor methods
  359. cannot have parameters.
  360. \item [Error: Only class methods can be referred with class references]
  361. This error occurs in a situation like the following:
  362. \begin{verbatim}
  363. Type :
  364. Tclass = Class of Tobject;
  365. Var C : TClass;
  366. begin
  367. ...
  368. C.free
  369. \end{verbatim}
  370. \var{Free} is not a class method and hence cannot be called with a class
  371. reference.
  372. \item [Error: Only class methods can be accessed in class methods]
  373. This is related to the previous error. You cannot call a method of an object
  374. from a inside a class method. The following code would produce this error:
  375. \begin{verbatim}
  376. class procedure tobject.x;
  377. begin
  378. free
  379. \end{verbatim}
  380. Because free is a normal method of a class it cannot be called from a class
  381. method.
  382. \item [Error: Constant and CASE types do not match]
  383. One of the labels is not of the same type as the case variable.
  384. \item [Error: The symbol can't be exported from a library]
  385. You can only export procedures and functions when you write a library. You
  386. cannot export variables or constants.
  387. \item [Warning: An inherited method is hidden by arg1]
  388. A method that is declared \var{virtual} in a parent class, should be
  389. overridden in the descendent class with the \var{override} directive. If you
  390. don't specify the \var{override} directive, you will hide the parent method;
  391. you will not override it.
  392. \item [Error: There is no method in an ancestor class to be overridden: arg1]
  393. You try to \var{override} a virtual method of a parent class that doesn't
  394. exist.
  395. \item [Error: No member is provided to access property]
  396. You specified no \var{read} directive for a property.
  397. \item [Warning: Stored prorperty directive is not yet implemented]
  398. The \var{stored} directive is not yet implemented
  399. \item [Error: Illegal symbol for property access]
  400. There is an error in the \var{read} or \var{write} directives for an array
  401. property. When you declare an array property, you can only access it with
  402. procedures and functions. The following code woud cause such an error.
  403. \begin{verbatim}
  404. tmyobject = class
  405. i : integer;
  406. property x [i : integer]: integer read I write i;
  407. \end{verbatim}
  408. \item [Error: Cannot access a protected field of an object here]
  409. Fields that are declared in a \var{protected} section of an object or class
  410. declaration cannot be accessed outside the module wher the object is
  411. defined, or outside descendent object methods.
  412. \item [Error: Cannot access a private field of an object here]
  413. Fields that are declared in a \var{private} section of an object or class
  414. declaration cannot be accessed outside the module where the class is
  415. defined.
  416. \item [Warning: overloaded method of virtual method should be virtual: arg1]
  417. If you declare overloaded methods in a class, then they should either all be
  418. virtual, or none. You shouldn't mix them.
  419. \item [Warning: overloaded method of non-virtual method should be non-virtual: arg1]
  420. If you declare overloaded methods in a class, then they should either all be
  421. virtual, or none. You shouldn't mix them.
  422. \item [Error: overloaded methods which are virtual must have the same return type: arg1]
  423. If you declare virtual overloaded methods in a class definition, they must
  424. have the same return type.
  425. \item [Error: EXPORT declared functions can't be nested]
  426. You cannot declare a function or procedure within a function or procedure
  427. that was declared as an export procedure.
  428. \item [Error: methods can't be EXPORTed]
  429. You cannot declare a procedure that is a method for an object as
  430. \var{export}ed. That is, your methods cannot be called from a C program.
  431. \item [Error: call by var parameters have to match exactly]
  432. When calling a function declared with \var{var} parameters, the variables in
  433. the function call must be of exactly the same type. There is no automatic
  434. type conversion.
  435. \item [Error: Class isn't a parent class of the current class]
  436. When calling inherited methods, you are trying to call a method of a strange
  437. class. You can only call an inherited method of a parent class.
  438. \item [Error: SELF is only allowed in methods]
  439. You are trying to use the \var{self} parameter outside an object's method.
  440. Only methods get passed the \var{self} parameters.
  441. \item [Error: methods can be only in other methods called direct with type identifier of the class]
  442. A construction like \var{sometype.somemethod} is only allowed in a method.
  443. \item [Error: Illegal use of ':']
  444. You are using the format \var{:} (colon) 2 times on an expression that
  445. is not a real expression.
  446. \item [Error: range check error in set constructor or duplicate set element]
  447. The declaration of a set contains an error. Either one of the elements is
  448. outside the range of the set type, either two of the elements are in fact
  449. the same.
  450. \item [Error: Pointer to object expected]
  451. You specified an illegal type in a \var{New} statement.
  452. The extended synax of \var{New} needs an object as a parameter.
  453. \item [Error: Expression must be constructor call]
  454. When using the extended syntax of \var{new}, you must specify the constructor
  455. method of the object you are trying to create. The procedure you specified
  456. is not a constructor.
  457. \item [Error: Expression must be destructor call]
  458. When using the extended syntax of \var{dispose}, you must specify the
  459. destructor method of the object you are trying to dispose of.
  460. The procedure you specified is not a destructor.
  461. \item [Error: Illegal order of record elements]
  462. When declaring a constant record, you specified the fields in the wrong
  463. order.
  464. \item [Error: Expression type must be class or record type]
  465. A \var{with} statement needs an argument that is of the type \var{record}
  466. or \var{class}. You are using \var{with} on an expression that is not of
  467. this type.
  468. \item [Error: Procedures can't return a value]
  469. In \fpc, you can specify a return value for a function when using
  470. the \var{exit} statement. This error occurs when you try to do this with a
  471. procedure. Procedures cannot return a value.
  472. \item [Error: constructors and destructors must be methods]
  473. You're declaring a procedure as destructor or constructor, when the
  474. procedure isn't a class method.
  475. \item [Error: Operator is not overloaded]
  476. You're trying to use an overloaded operator when it isn't overloaded for
  477. this type.
  478. \item [Error: Re-raise isn't possible there]
  479. You are trying to raise an exception where it isn't allowed. You can only
  480. raise exceptions in an \var{except} block.
  481. \item [Error: The extended syntax of new or dispose isn't allowed for a class]
  482. You cannot generate an instance of a class with the extended syntax of
  483. \var{new}. The constructor must be used for that. For the same reason, you
  484. cannot call \var{Dispose} to de-allocate an instance of a class, the
  485. destructor must be used for that.
  486. \item [Error: Assembler incompatible with function return type]
  487. You're trying to implement a \var{assembler} function, but the return type
  488. of the function doesn't allow that.
  489. \item [Error: Procedure overloading is switched off]
  490. When using the \var{-So} switch, procedure overloading is switched off.
  491. Turbo Pascal does not support function overloading.
  492. \item [Error: It is not possible to overload this operator (overload = instead)]
  493. You are trying to overload an operator which cannot be overloaded.
  494. The following operators can be overloaded :
  495. \begin{verbatim}
  496. +, -, *, /, =, >, <, <=, >=, is, as, in, **, :=
  497. \end{verbatim}
  498. \item [Error: Comparative operator must return a boolean value]
  499. When overloading the \var{=} operator, the function must return a boolean
  500. value.
  501. \item [Error: Only virtual methods can be abstract]
  502. You are declaring a method as abstract, when it isn't declared to be
  503. virtual.
  504. \item [Fatal: Use of unsupported feature!]
  505. You're trying to force the compiler into doing something it cannot do yet.
  506. \item [Error: The mix of CLASSES and OBJECTS isn't allowed]
  507. You cannot derive \var{objects} and \var{classes} intertwined . That is,
  508. a class cannot have an object as parent and vice versa.
  509. \item [Warning: Unknown procedure directive had to be ignored: arg1]
  510. The procedure direcive you secified is unknown. Recognised procedure
  511. directives are \var{cdecl}, \var{stdcall}, \var{popstack}, \var{pascal}
  512. \var{register}, \var{export}.
  513. \item [Error: absolute can only be associated to ONE variable]
  514. You cannot specify more than one variable before the \var{absolute} directive.
  515. Thus, the following construct will provide this error:
  516. \begin{verbatim}
  517. Var Z : Longint;
  518. X,Y : Longint absolute Z;
  519. \end{verbatim}
  520. \item [ absolute can only be associated a var or const ]
  521. The address of a \var{absolute} directive can only point to a variable or
  522. constant. Therefore, the following code will produce this error:
  523. \begin{verbatim}
  524. Procedure X;
  525. var p : longint absolute x;
  526. \end{verbatim}
  527. \item [Error: absolute can only be associated a var or const]
  528. The address of a \var{absolute} directive can only point to a variable or
  529. constant. Therefore, the following code will produce this error:
  530. \begin{verbatim}
  531. Procedure X;
  532. var p : longint absolute x;
  533. \end{verbatim}
  534. \item [Error: Only ONE variable can be initialized]
  535. You cannot specify more than one variable with a initial value
  536. in Delphi syntax.
  537. \item [Error: Abstract methods shouldn't have any definition (with function body)]
  538. Abstract methods can only be declared, you cannot implement them. They
  539. should be overridden by a descendant class.
  540. \item [Error: This overloaded function can't be local (must be exported)]
  541. You are defining a overloaded function in the implementation part of a unit,
  542. but there is no corresponding declaration in the interface part of the unit.
  543. \item [Warning: Virtual methods are used without a constructor in arg1]
  544. If you declare objects or classes that contain virtual methods, you need
  545. to have a constructor and destructor to initialize them. The compiler
  546. encountered an object or class with virtual methods that doesn't have
  547. a constructor/destructor pair.
  548. \item [Macro defined: arg1]
  549. When \var{-vm} is used, the compiler tells you when it defines macros.
  550. \item [Macro undefined: arg1]
  551. When \var{-vm} is used, the compiler tells you when it undefines macros.
  552. \item [Macro arg1 set to arg2]
  553. When \var{-vm} is used, the compiler tells you what values macros get.
  554. \item [Info: Compiling arg1]
  555. When you turn on information messages (\var{-vi}), the compiler tells you
  556. what units it is recompiling.
  557. \item [Compiling arg1 for the second time]
  558. When you request debug messages (\var{-vd}) the compiler tells you what
  559. units it recompiles for the second time.
  560. \item [Error: Array properties aren't allowed at this point]
  561. You cannot use array properties at that point.a
  562. \item [Error: No property found to override]
  563. You want to overrride a property of a parent class, when there is, in fact,
  564. no such property in the parent class.
  565. \item [Error: Only one default property is allowed, found inherited default property in class arg1]
  566. You specified a property as \var{Default}, but a parent class already has a
  567. default property, and a class can have only one default property.
  568. \item [Error: The default property must be an array property]
  569. Only array properties of classes can be made \var{default} properties.
  570. \item [Error: Virtual constructors are only supported in class object model]
  571. You cannot have virtual constructors in objects. You can only have them
  572. in classes.
  573. \item [Error: No default property available]
  574. You try to access a default property of a class, but this class (or one of
  575. it's ancestors) doesn't have a default property.
  576. \item [Error: The class can't have a published section, use the {argM+} switch]
  577. If you want a \var{published} section in a class definition, you must
  578. use the \var{\{\$M+\}} switch, whch turns on generation of type
  579. information.
  580. \item [Error: Forward declaration of class arg1 must be resolved here to use the class as ancestor]
  581. To be able to use an object as an ancestor object, it must be defined
  582. first. This error occurs in the following situation:
  583. \begin{verbatim}
  584. Type ParentClas = Class;
  585. ChildClass = Class(ParentClass)
  586. ...
  587. end;
  588. \end{verbatim}
  589. Where \var{ParentClass} is declared but not defined.
  590. \item [Error: Local operators not supported]
  591. You cannot overload locally, i.e. inside procedures or function
  592. definitions.
  593. \item [Error: Procedure directive arg1 not allowed in interface section]
  594. This procedure directive is not allowed in the \var{interface} section of
  595. a unit. You can only use it in the \var{implementation} section.
  596. \item [Error: Procedure directive arg1 not allowed in implementation section]
  597. This procedure directive is not defined in the \var{implementation} section of
  598. a unit. You can only use it in the \var{interface} section.
  599. \item [Error: Procedure directive arg1 not allowed in procvar declaration]
  600. This procedure directive cannot be part of a procedural of function
  601. type declaration.
  602. \item [Error: Function is already declared Public/Forward arg1]
  603. You will get this error if a function is defined as \var{forward} twice.
  604. Or it is once in the \var{interface} section, and once as a \var{forward}
  605. declaration in the \var{implmentation} section.
  606. \item [Error: Can't use both EXPORT and EXTERNAL]
  607. These two procedure directives are mutually exclusive
  608. \item [Error: NAME keyword expected]
  609. The definition of an external variable needs a \var{name} clause.
  610. \item [Warning: arg1 not yet supported inside inline procedure/function]
  611. Inline procedures don't support this declaration.
  612. \item [Warning: Inlining disabled]
  613. Inlining of procedures is disabled.
  614. \item [Info: Writing Browser log arg1]
  615. When information messages are on, the compiler warns you when it
  616. writes the browser log (generated with the \var{\{\$Y+ \}} switch).
  617. \item [Hint: may be pointer dereference is missing]
  618. The compiler thinks that a pointer may need a dereference.
  619. \item [Fatal: Selected assembler reader not supported]
  620. The selected assembler reader (with \var{\{\$ASMMODE xxx\}} is not
  621. supported. The compiler can be compiled with or without support for a
  622. particular assembler reader.
  623. \item [Error: Procedure directive arg1 has conflicts with other directives]
  624. You specified a procedure directive that conflicts with other directives.
  625. for instance \var{cdecl} and \var{pascal} are mutually exclusive.
  626. \item [Error: Calling convention doesn't match forward]
  627. This error happens when you declare a function or procedure with
  628. e.g. \var{cdecl;} but omit this directive in the implementation, or vice
  629. versa. The calling convention is part of the function declaration, and
  630. must be repeated in the function definition.
  631. \item [Error: Register calling (fastcall) not supported]
  632. The \var{register} calling convention, i.e., arguments are passed in
  633. registers instead of on the stack is not supported. Arguments are always
  634. passed on the stack.
  635. \item [Error: Property can't have a default value]
  636. Set properties or indexed properties cannot have a default value.
  637. \item [Error: The default value of a property must be constant]
  638. The value of a \var{default} declared property must be knwon at compile
  639. time. The value you specified is only known at run time. This happens
  640. .e.g. if you specify a variable name as a default value.
  641. \item [Error: Symbol can't be published, can be only a class]
  642. Only class type variables can be in a \var{published} section of a class
  643. if they are not declared as a property.
  644. \item [Error: That kind of property can't be published]
  645. Properties in a \var{published} section cannot be array properties.
  646. they must be moved to public sections. Properties in a \var{published}
  647. section must be an ordinal type, a real type, strings or sets.
  648. \item [Warning: Empty import name specified]
  649. Both index and name for the import are 0 or empty
  650. \item [Warning: Empty import name specified]
  651. Some targets need a name for the imported procedure or a cdecl specifier
  652. \item [Error: Function internal name changed after use of function]
  653. \item [Error: Division by zero]
  654. There is a divsion by zero encounted
  655. \item [Error: Invalid floating point operation]
  656. An operation on two real type values produced an overflow or a division
  657. by zero.
  658. \item [Error: Upper bound of range is less than lower bound]
  659. The upper bound of a \var{case} label is less than the lower bound and this
  660. is not possible
  661. \item [Error: string length is larger than array of char length]
  662. The size of the constant string is larger than the size you specified in
  663. the array[x..y] of char definition
  664. \item [Error: Illegal expression after message directive]
  665. \fpc supports only integer or string values as message constants
  666. \item [Error: Message handlers can take only one call by ref. parameter]
  667. A method declared with the \var{message}-directive as message handler
  668. can take only one parameter which must be declared as call by reference
  669. Parameters are declared as call by reference using the \var{var}-directive
  670. \item [Error: Duplicate message label: arg1]
  671. A label for a message is used twice in one object/class
  672. \item [Error: Self can be only an explicit parameter in message handlers]
  673. The self parameter can be passed only explicit if it is a method which
  674. is declared as message method handler
  675. \item [Error: Threadvars can be only static or global]
  676. Threadvars must be static or global, you can't declare a thread
  677. local to a procedure. Local variables are always local to a thread,
  678. because every thread has it's own stack and local variables
  679. are stored on the stack
  680. \item [Fatal: Direct assembler not supported for binary output format]
  681. You can't use direct assembler when using a binary writer, choose an
  682. other outputformat or use an other assembler reader
  683. \item [Warning: Don't load OBJPAS unit manual, use {argmode objfpc} or {argmode delphi} instead]
  684. You're trying to load the ObjPas unit manual from a uses clause. This is
  685. not a good idea to do, you can better use the \var{\{\$mode objfpc\}} or
  686. \var{\{\$mode delphi\}}
  687. directives which load the unit automaticly
  688. \item [Error: OVERRIDE can't be used in objects]
  689. Override isn't support for objects, use VIRTUAL instead to override
  690. a method of an anchestor object
  691. \item [Error: Data types which requires initialization/finalization can't be used in variant records]
  692. Some data type (e.g. \var{ansistring}) needs initialization/finalization
  693. code which is implicitly generated by the compiler. Such data types
  694. can't be used in the variant part of a record.
  695. \end{description}
  696. \section{Type checking errors}
  697. This section lists all errors that can occur when type checking is
  698. performed.
  699. \begin{description}
  700. \item [Error: Type mismatch]
  701. This can happen in many cases:
  702. \begin{itemize}
  703. \item The variable you're assigning to is of a different type than the
  704. expression in the assignment.
  705. \item You are calling a function or procedure with parameters that are
  706. incompatible with the parameters in the function or procedure definition.
  707. \end{itemize}
  708. \item [Error: Incompatible types: got "arg1" expected "arg2"]
  709. There is no conversion possible between the two types
  710. Another possiblity is that they are declared in different
  711. declarations:
  712. \begin{verbatim}
  713. Var
  714. A1 : Array[1..10] Of Integer;
  715. A2 : Array[1..10] Of Integer;
  716. Begin
  717. A1:=A2; { This statement gives also this error, it
  718. is due the strict type checking of pascal }
  719. End.
  720. \end{verbatim}
  721. \item [Error: Type mismatch between arg1 and arg2]
  722. The types are not equal
  723. \item [Error: Integer expression expected]
  724. The compiler expects an expression of type integer, but gets a different
  725. type.
  726. \item [Error: Ordinal expression expected]
  727. The expression must be of ordinal type, i.e., maximum a \var{Longint}.
  728. This happens, for instance, when you specify a second argument
  729. to \var{Inc} or \var{Dec} that doesn't evaluate to an ordinal value.
  730. \item [Error: Type identifier expected]
  731. The identifier is not a type, or you forgot to supply a type identifier.
  732. \item [Error: Variable identifier expected]
  733. This happens when you pass a constant to a \var{Inc} var or \var{Dec}
  734. procedure. You can only pass variables as arguments to these functions.
  735. \item [Error: pointer type expected]
  736. The variable or expression isn't of the type \var{pointer}. This
  737. happens when you pass a variable that isn't a pointer to \var{New}
  738. or \var{Dispose}.
  739. \item [Error: class type expected]
  740. The variable of expression isn't of the type \var{class}. This happens
  741. typically when
  742. \begin{enumerate}
  743. \item The parent class in a class declaration isn't a class.
  744. \item An exception handler (\var{On}) contains a type identifier that
  745. isn't a class.
  746. \end{enumerate}
  747. \item [Error: Variable or type indentifier expected]
  748. The argument to the \var{High} or \var{Low} function is not a variable
  749. nor a type identifier.
  750. \item [Error: Can't evaluate constant expression]
  751. No longer in use.
  752. \item [Error: Set elements are not compatible]
  753. You are trying to make an operation on two sets, when the set element types
  754. are not the same. The base type of a set must be the same when taking the
  755. union
  756. \item [Error: Operation not implemented for sets]
  757. several binary operations are not defined for sets
  758. like div mod ** (also >= <= for now)
  759. \item [Warning: Automatic type conversion from floating type to COMP which is an integer type]
  760. An implicit type conversion from a real type to a \var{comp} is
  761. encountered. Since \var{Comp} is a 64 bit integer type, this may indicate
  762. an error.
  763. \item [Hint: use DIV instead to get an integer result]
  764. When hints are on, then an integer division with the '/' operator will
  765. procuce this message, because the result will then be of type real
  766. \item [Error: string types doesn't match, because of argV+ mode]
  767. When compiling in \var{\{\$V+\}} mode, the string you pass as a parameter
  768. should be of the exact same type as the declared parameter of the procedure.
  769. \item [Error: succ or pred on enums with assignments not possible]
  770. When you declared an enumeration type which has assignments in it, as in C,
  771. like in the following:
  772. \begin{verbatim}
  773. Tenum = (a,b,e:=5);
  774. \end{verbatim}
  775. you cannot use the \var{Succ} or \var{Pred} functions on them.
  776. \item [Error: Can't read or write variables of this type]
  777. You are trying to \var{read} or \var{write} a variable from or to a
  778. file of type text, which doesn't support that. Only integer types,
  779. booleans, reals, pchars and strings can be read from/written to a text file.
  780. \item [Error: Type conflict between set elements]
  781. There is at least one set element which is of the wrong type, i.e. not of
  782. the set type.
  783. \item [Warning: lo/hi(dword/qword) returns the upper/lower word/dword]
  784. \fpc supports an overloaded version of \var{lo/hi} for \var{longint/dword/int64/qword}
  785. which returns the lower/upper word/dword of the argument. TP always uses
  786. a 16 bit \var{lo/hi} which returns always bits 0..7 for \var{lo} and the
  787. bits 8..15 for \var{hi}. If you want the TP behavior you have
  788. to type cast the argument to \var{word/integer}
  789. \item [Error: Integer or real expression expected]
  790. The first argument to \var{str} must a real or integer type.
  791. \item [Error: Wrong type in array constructor]
  792. You are trying to use a type in an array constructor which is not
  793. allowed.
  794. \item [Error: Incompatible type for arg no. arg1: Got arg2, expected arg3]
  795. You are trying to pass an invalid type for the specified parameter.
  796. \item [Error: Method (variable) and Procedure (variable) are not compatible]
  797. You can't assign a method to a procedure variable or a procedure to a
  798. method pointer.
  799. \item [Error: Illegal constant passed to internal math function]
  800. The constant argument passed to a ln or sqrt function is out of
  801. the definition range of these functions.
  802. \item [Error: Can't get the address of constants]
  803. It's not possible to get the address of a constant, because they
  804. aren't stored in memory, you can try making it a typed constant.
  805. \end{description}
  806. \section{Symbol handling}
  807. This section lists all the messages that concern the handling of symbols.
  808. This means all things that have to do with procedure and variable names.
  809. \begin{description}
  810. \item [Error: Identifier not found arg1]
  811. The compiler doesn't know this symbol. Usually happens when you misspel
  812. the name of a variable or procedure, or when you forgot to declare a
  813. variable.
  814. \item [Fatal: Internal Error in SymTableStack()]
  815. An internal error occurred in the compiler; If you encounter such an error,
  816. please contact the developers and try to provide an exact description of
  817. the circumstances in which the error occurs.
  818. \item [Error: Duplicate identifier arg1]
  819. The identifier was already declared in the current scope.
  820. \item [Hint: Identifier already defined in arg1 at line arg2]
  821. The identifier was already declared in a previous scope.
  822. \item [Error: Unknown identifier arg1]
  823. The identifier encountered hasn't been declared, or is used outside the
  824. scope where it's defined.
  825. \item [Error: Forward declaration not solved arg1]
  826. This can happen in two cases:
  827. \begin{itemize}
  828. \item This happens when you declare a function (in the \var{interface} part, or
  829. with a \var{forward} directive, but do not implement it.
  830. \item You reference a type which isn't declared in the current \var{type}
  831. block.
  832. \end{itemize}
  833. \item [Fatal: Identifier type already defined as type]
  834. You are trying to redefine a type.
  835. \item [Error: Error in type definition]
  836. There is an error in your definition of a new array type:
  837. \item One of the range delimiters in an array declaration is erroneous.
  838. For example, \var{Array [1..1.25]} will trigger this error.
  839. \item [Error: Type identifier not defined]
  840. The type identifier has not been defined yet.
  841. \item [Error: Forward type not resolved arg1]
  842. The compiler encountered an unknown type.
  843. \item [Error: Only static variables can be used in static methods or outside methods]
  844. A static method of an object can only access static variables.
  845. \item [Error: Invalid call to tvarsym.mangledname()]
  846. An internal error occurred in the compiler; If you encounter such an error,
  847. please contact the developers and try to provide an exact description of
  848. the circumstances in which the error occurs.
  849. \item [Fatal: record or class type expected]
  850. The variable or expression isn't of the type \var{record} or \var{class}.
  851. \item [Error: Instances of classes or objects with an abstract method are not allowed]
  852. You are trying to generate an instance of a class which has an abstract
  853. method that wasn't overridden.
  854. \item [Warning: Label not defined arg1]
  855. A label was declared, but not defined.
  856. \item [Error: Illegal label declaration]
  857. \item [Error: GOTO and LABEL are not supported (use switch -Sg)]
  858. You must compile a program which has \var{label}s and \var{goto} statements
  859. with the \var{-Sg} switch. By default, \var{label} and \var{goto} aren't
  860. supported.
  861. \item [Error: Label not found]
  862. A \var{goto label} was encountered, but the label isn't declared.
  863. \item [Error: identifier isn't a label]
  864. The identifier specified after the \var{goto} isn't of type label.
  865. \item [Error: label already defined]
  866. You are defining a label twice. You can define a label only once.
  867. \item [Error: illegal type declaration of set elements]
  868. The declaration of a set contains an invalid type definition.
  869. \item [Error: Forward class definition not resolved arg1]
  870. You declared a class, but you didn't implement it.
  871. \item [Hint: Parameter not used arg1]
  872. This is a warning. The identifier was declared (locally or globally) but
  873. wasn't used (locally or globally).
  874. \item [Note: Local variable not used arg1]
  875. You have declared, but not used a variable in a procedure or function
  876. implementation.
  877. \item [Error: Set type expected]
  878. The variable or expression isn't of type \var{set}. This happens in an
  879. \var{in} statement.
  880. \item [Warning: Function result does not seem to be set]
  881. You can get this warning if the compiler thinks that a function return
  882. value is not set. This will not be displayed for assembler procedures,
  883. or procedures that contain assembler blocks.
  884. \item [Error: Unknown record field identifier arg1]
  885. The field doesn't exist in the record definition.
  886. \item [Warning: Local variable arg1 does not seem to be initialized]
  887. \item [Warning: Variable arg1 does not seem to be initialized]
  888. These messages are displayed if the compiler thinks that a variable will
  889. be used (i.e. appears in the right-hand-side of an expression) when it
  890. wasn't initialized first (i.e. appeared in the left-hand side of an
  891. assigment)
  892. \item [Error: identifier idents no member arg1]
  893. When using the extended syntax of \var{new}, you must specify the constructor
  894. method of the class you are trying to create. The procedure you specified
  895. does not exist.
  896. \item [Found declaration: arg1]
  897. You get this when you use the \var{-vb} switch. In case an overloaded
  898. procedure is not found, then all candidate overloaded procedures are
  899. listed, with their parameter lists.
  900. \end{description}
  901. \section{Code generator messages}
  902. This section lists all messages that can be displayed if the code
  903. generator encounters an error condition.
  904. \begin{description}
  905. \item [Error: BREAK not allowed]
  906. You're trying to use \var{break} outside a loop construction.
  907. \item [Error: CONTINUE not allowed]
  908. You're trying to use \var{continue} outside a loop construction.
  909. \item [Error: Expression too complicated - FPU stack overflow]
  910. Your expression is too long for the compiler. You should try dividing the
  911. construct over multiple assignments.
  912. \item [Error: Illegal expression]
  913. This can occur under many circumstances. Mostly when trying to evaluate
  914. constant expressions.
  915. \item [Error: Invalid integer expression]
  916. You made an expression which isn't an integer, and the compiler expects the
  917. result to be an integer.
  918. \item [Error: Illegal qualifier]
  919. One of the following is happening :
  920. \begin{itemize}
  921. \item You're trying to access a field of a variable that is not a record.
  922. \item You're indexing a variable that is not an array.
  923. \item You're dereferencing a variable that is not a pointer.
  924. \end{itemize}
  925. \item [Error: High range limit < low range limit]
  926. You are declaring a subrange, and the lower limit is higher than the high
  927. limit of the range.
  928. \item [Error: Illegal counter variable]
  929. The type of a \var{for} loop variable must be an ordinal type.
  930. Loop variables cannot be reals or strings.
  931. \item [Error: Can't determine which overloaded function to call]
  932. You're calling overloaded functions with a parameter that doesn't correspond
  933. to any of the declared function parameter lists. e.g. when you have declared
  934. a function with parameters \var{word} and \var{longint}, and then you call
  935. it with a parameter which is of type \var{integer}.
  936. \item [Error: Parameter list size exceeds 65535 bytes]
  937. The I386 processor limits the parameter list to 65535 bytes (the \var{RET}
  938. instruction causes this)
  939. \item [Error: Illegal type conversion]
  940. When doing a type-cast, you must take care that the sizes of the variable and
  941. the destination type are the same.
  942. \item [Conversion between ordinals and pointers is not portable across platforms]
  943. If you typecast a pointer to a longint, this code will not compile
  944. on a machine using 64bit for pointer storage.
  945. \item [Error: File types must be var parameters]
  946. You cannot specify files as value parameters, i.e. they must always be
  947. declared \var{var} parameters.
  948. \item [Error: The use of a far pointer isn't allowed there]
  949. Free Pascal doesn't support far pointers, so you cannot take the address of
  950. an expression which has a far reference as a result. The \var{mem} construct
  951. has a far reference as a result, so the following code will produce this
  952. error:
  953. \begin{verbatim}
  954. var p : pointer;
  955. ...
  956. p:=@mem[a000:000];
  957. \end{verbatim}
  958. \item [Error: illegal call by reference parameters]
  959. You are trying to pass a constant or an expression to a procedure that
  960. requires a \var{var} parameter. Only variables can be passed as a \var{var}
  961. parameter.
  962. \item [Error: EXPORT declared functions can't be called]
  963. No longer in use.
  964. \item [Warning: Possible illegal call of constructor or destructor (doesn't match to this context)]
  965. No longer in use.
  966. \item [Note: Inefficient code]
  967. You construction seems dubious to the compiler.
  968. \item [Warning: unreachable code]
  969. You specified a loop which will never be executed. Example:
  970. \begin{verbatim}
  971. while false do
  972. begin
  973. {.. code ...}
  974. end;
  975. \end{verbatim}
  976. \item [Error: procedure call with stackframe ESP/SP]
  977. The compiler encountered a procedure or function call inside a
  978. procedure that uses a \var{ESP/SP} stackframe. Normally, when a call is
  979. done the procedure needs a \var{EBP} stackframe.
  980. \item [Error: Abstract methods can't be called directly]
  981. You cannot call an abstract method directy, instead you must call a
  982. overriding child method, because an abstract method isn't implemented.
  983. \item [Fatal: Internal Error in getfloatreg(), allocation failure]
  984. An internal error occurred in the compiler; If you encounter such an error,
  985. please contact the developers and try to provide an exact description of
  986. the circumstances in which the error occurs.
  987. \item [Fatal: Unknown float type]
  988. The compiler cannot determine the kind of float that occurs in an expression.
  989. \item [Fatal: SecondVecn() base defined twice]
  990. An internal error occurred in the compiler; If you encounter such an error,
  991. please contact the developers and try to provide an exact description of
  992. the circumstances in which the error occurs.
  993. \item [Fatal: Extended cg68k not supported]
  994. The var{extended} type is not supported on the m68k platform.
  995. \item [Fatal: 32-bit unsigned not supported in MC68000 mode]
  996. The cardinal is not supported on the m68k platform.
  997. \item [Fatal: Internal Error in secondinline()]
  998. An internal error occurred in the compiler; If you encounter such an error,
  999. please contact the developers and try to provide an exact description of
  1000. the circumstances in which the error occurs.
  1001. \item [Register arg1 weight arg2 arg3]
  1002. Debugging message. Shown when the compiler considers a variable for
  1003. keeping in the registers.
  1004. \item [Error: Stack limit excedeed in local routine]
  1005. Your code requires a too big stack. Some operating systems pose limits
  1006. on the stack size. You should use less variables or try ro put large
  1007. variables on the heap.
  1008. \item [Stack frame is omitted]
  1009. Some procedure/functions do not need a complete stack-frame, so it is omitted.
  1010. This message will be displayed when the {-vd} switch is used.
  1011. \item [Error: Object or class methods can't be inline.]
  1012. You cannot have inlined object methods.
  1013. \item [Error: Procvar calls can't be inline.]
  1014. A procedure with a procedural variable call cannot be inlined.
  1015. \item [Error: No code for inline procedure stored]
  1016. The compiler couldn't store code for the inline procedure.
  1017. \item [Error: Element zero of an ansi/wide- or longstring can't be accessed, use (set)length instead]
  1018. You should use \var{setlength} to set the length of an ansi/wide/longstring
  1019. and \var{length} to get the length of such kinf of string
  1020. \item [Error: Include and exclude not implemented in this case]
  1021. \var{include} and \var{exclude} are only partially
  1022. implemented for \var{i386} processors
  1023. and not at all for \var{m68k} processors.
  1024. \item [Error: Constructors or destructors can not be called inside a 'with' clause]
  1025. Inside a \var{With} clause you cannot call a constructor or destructor for the
  1026. object you have in the \var{with} clause.
  1027. \item [Error: Cannot call message handler method directly]
  1028. A message method handler method can't be called directly if it contains an
  1029. explicit self argument
  1030. \end{description}
  1031. \section{Unit loading messages.}
  1032. This section lists all messages that can occur when the compiler is
  1033. loading a unit from disk into memory. Many of these mesages are
  1034. informational messages.
  1035. \begin{description}
  1036. \item [Unitsearch: arg1]
  1037. When you use the \var{-vt}, the compiler tells you where it tries to find
  1038. unit files.
  1039. \item [PPU Loading arg1]
  1040. When the \var{-vt} switch is used, the compiler tells you
  1041. what units it loads.
  1042. \item [PPU Name: arg1]
  1043. When you use the \var{-vu} flag, the unit name is shown.
  1044. \item [PPU Flags: arg1]
  1045. When you use the \var{-vu} flag, the unit flags are shown.
  1046. \item [PPU Crc: arg1]
  1047. When you use the \var{-vu} flag, the unit CRC check is shown.
  1048. \item [PPU Time: arg1]
  1049. When you use the \var{-vu} flag, the unit time is shown.
  1050. \item [PPU File too short]
  1051. When you use the \var{-vu} flag, the unit time is shown.
  1052. \item [PPU Invalid Header (no PPU at the begin)]
  1053. A unit file contains as the first three bytes the ascii codes of \var{PPU}
  1054. \item [PPU Invalid Version arg1]
  1055. This unit file was compiled with a different version of the compiler, and
  1056. cannot be read.
  1057. \item [PPU is compiled for an other processor]
  1058. This unit file was compiled for a different processor type, and
  1059. cannot be read
  1060. \item [PPU is compiled for an other target]
  1061. This unit file was compiled for a different processor type, and
  1062. cannot be read
  1063. \item [PPU Source: arg1]
  1064. When you use the \var{-vu} flag, the unit CRC check is shown.
  1065. \item [Writing arg1]
  1066. When you specify the \var{-vu} switch, the compiler will tell you where it
  1067. writes the unit file.
  1068. \item [Fatal: Can't Write PPU-File]
  1069. An err
  1070. \item [Fatal: reading PPU-File]
  1071. Unexpected end of file
  1072. \item [Fatal: unexpected end of PPU-File]
  1073. This means that the unit file was corrupted, and contains invalid
  1074. information. Recompilation will be necessary.
  1075. \item [Fatal: Invalid PPU-File entry: arg1]
  1076. The unit the compiler is trying to read is corrupted, or generated with a
  1077. newer version of the compiler.
  1078. \item [Fatal: PPU Dbx count problem]
  1079. There is an inconsistency in the debugging information of the unit.
  1080. \item [Error: Illegal unit name: arg1]
  1081. The name of the unit doesn't match the file name.
  1082. \item [Fatal: Too much units]
  1083. \fpc has a limit of 1024 units in a program. You can change this behavior
  1084. by changing the \var{maxunits} constant in the \file{files.pas} file of the
  1085. compiler, and recompiling the compiler.
  1086. \item [Fatal: Circular unit reference between arg1 and arg2]
  1087. Two units are using each other in the interface part. This is only allowed
  1088. in the \var{implementation} part. At least one unit must contain the other one
  1089. in the \var{implementation} section.
  1090. \item [Fatal: Can't compile unit arg1, no sources available]
  1091. A unit was found that needs to be recompiled, but no sources are
  1092. available.
  1093. \item [Warning: Compiling the system unit requires the -Us switch]
  1094. When recompiling the system unit (it needs special treatment), the
  1095. \var{-Us} must be specified.
  1096. \item [Fatal: There were arg1 errors compiling module, stopping]
  1097. When the compiler encounters a fatal error or too many errors in a module
  1098. then it stops with this message.
  1099. \item [Load from arg1 (arg2) unit arg3]
  1100. When you use the \var{-vu} flag, which unit is loaded from which unit is
  1101. shown.
  1102. \item [Recompiling arg1, checksum changed for arg2]
  1103. \item [Recompiling arg1, source found only]
  1104. When you use the \var{-vu} flag, these messages tell you why the current
  1105. unit is recompiled.
  1106. \item [Recompiling unit, static lib is older than ppufile]
  1107. When you use the \var{-vu} flag, the compiler warns if the static library
  1108. of the unit are older than the unit file itself.
  1109. \item [Recompiling unit, shared lib is older than ppufile]
  1110. When you use the \var{-vu} flag, the compiler warns if the shared library
  1111. of the unit are older than the unit file itself.
  1112. \item [Recompiling unit, obj and asm are older than ppufile]
  1113. When you use the \var{-vu} flag, the compiler warns if the assembler of
  1114. object file of the unit are older than the unit file itself.
  1115. \item [Recompiling unit, obj is older than asm]
  1116. When you use the \var{-vu} flag, the compiler warns if the assembler
  1117. file of the unit is older than the object file of the unit.
  1118. \item [Parsing interface of arg1]
  1119. When you use the \var{-vu} flag, the compiler warns that it starts
  1120. parsing the interface part of the unit
  1121. \item [Parsing implementation of arg1]
  1122. When you use the \var{-vu} flag, the compiler warns that it starts
  1123. parsing the implementation part of the unit
  1124. \item [Second load for unit arg1]
  1125. When you use the \var{-vu} flag, the compiler warns that it starts
  1126. recompiling a unit for the second time. This can happend with interdepend
  1127. units.
  1128. \item [PPU Check file arg1 time arg2]
  1129. When you use the \var{-vu} flag, the compiler show the filename and
  1130. date and time of the file which a recompile depends on
  1131. \end{description}
  1132. \section{Command-line handling errors}
  1133. This section lists errors that occur when the compiler is processing the
  1134. command line or handling the configuration files.
  1135. \begin{description}
  1136. \item [Warning: Only one source file supported]
  1137. You can specify only one source file on the command line. The first
  1138. one will be compiled, others will be ignored. This may indicate that
  1139. you forgot a \var{'-'} sign.
  1140. \item [Warning: DEF file can be created only for OS/2]
  1141. This option can only be specified when you're compiling for OS/2
  1142. \item [Error: nested response files are not supported]
  1143. you cannot nest response files with the \var{@file} command-line option.
  1144. \item [Fatal: No source file name in command line]
  1145. The compiler expects a source file name on the command line.
  1146. \item [Error: Illegal parameter: arg1]
  1147. You specified an unknown option.
  1148. \item [Hint: -? writes help pages]
  1149. When an unknown option is given, this message is diplayed.
  1150. \item [Fatal: Too many config files nested]
  1151. You can only nest up to 16 config files.
  1152. \item [Fatal: Unable to open file arg1]
  1153. The option file cannot be found.
  1154. \item [Note: Reading further options from arg1]
  1155. Displayed when you have notes turned on, and the compiler switches
  1156. to another options file.
  1157. \item [Warning: Target is already set to: arg1]
  1158. Displayed if more than one \var{-T} option is specified.
  1159. \item [Warning: Shared libs not supported on DOS platform, reverting to static]
  1160. If you specify \var{-CD} for the \dos platform, this message is displayed.
  1161. The compiler supports only static libraries under \dos
  1162. \item [Fatal: too many IF(N)DEFs]
  1163. the \var{\#IF(N)DEF} statements in the options file are not balanced with
  1164. the \var{\#ENDIF} statements.
  1165. \item [Fatal: too many ENDIFs]
  1166. the \var{\#IF(N)DEF} statements in the options file are not balanced with
  1167. the \var{\#ENDIF} statements.
  1168. \item [Fatal: open conditional at the end of the file]
  1169. the \var{\#IF(N)DEF} statements in the options file are not balanced with
  1170. the \var{\#ENDIF} statements.
  1171. \item [Warning: Debug information generation is not supported by this executable]
  1172. It is possible to have a compiler executable that doesn't support
  1173. the generation of debugging info. If you use such an executable with the
  1174. \var{-g} switch, this warning will be displayed.
  1175. \item [Hint: Try recompiling with -dGDB]
  1176. It is possible to have a compiler executable that doesn't support
  1177. the generation of debugging info. If you use such an executable with the
  1178. \var{-g} switch, this warning will be displayed.
  1179. \item [Error: You are using the obsolete switch arg1]
  1180. this warns you when you use a switch that is not needed/supported anymore.
  1181. It is recommended that you remove the switch to overcome problems in the
  1182. future, when the switch meaning may change.
  1183. \item [Error: You are using the obsolete switch arg1, please use arg2]
  1184. this warns you when you use a switch that is not supported anymore. You
  1185. must now use the second switch instead.
  1186. It is recommended that you change the switch to overcome problems in the
  1187. future, when the switch meaning may change.
  1188. \item [Note: Switching assembler to default source writing assembler]
  1189. this notifies you that the assembler has been changed because you used the
  1190. -a switch which can't be used with a binary assembler writer.
  1191. \end{description}