diff options
author | Andreas Rumpf <andreas@andi> | 2008-06-22 16:14:11 +0200 |
---|---|---|
committer | Andreas Rumpf <andreas@andi> | 2008-06-22 16:14:11 +0200 |
commit | 405b86068e6a3d39970b9129ceec0a9108464b28 (patch) | |
tree | c0449946f54baae6ea88baf453157ddd7faa8f86 /data | |
download | Nim-405b86068e6a3d39970b9129ceec0a9108464b28.tar.gz |
Initial import
Diffstat (limited to 'data')
-rwxr-xr-x | data/advopt.txt | 43 | ||||
-rwxr-xr-x | data/ast.yml | 258 | ||||
-rwxr-xr-x | data/basicopt.txt | 29 | ||||
-rwxr-xr-x | data/ccomps.txt | 1692 | ||||
-rwxr-xr-x | data/changes.txt | 22 | ||||
-rwxr-xr-x | data/keywords.txt | 19 | ||||
-rwxr-xr-x | data/magic.yml | 176 | ||||
-rwxr-xr-x | data/messages.yml | 282 | ||||
-rwxr-xr-x | data/pas_keyw.yml | 26 | ||||
-rwxr-xr-x | data/readme.txt | 5 |
10 files changed, 2552 insertions, 0 deletions
diff --git a/data/advopt.txt b/data/advopt.txt new file mode 100755 index 000000000..626a000e4 --- /dev/null +++ b/data/advopt.txt @@ -0,0 +1,43 @@ +Advanced commands:: + pas convert a Pascal file to Nimrod standard syntax + pretty pretty print the inputfile + gen_depend generate a DOT file containing the + module dependency graph + list_def list all defined conditionals and exit + rst2html converts a reStructuredText file to HTML + check checks the project for syntax and semantic + parse parses a single file (for debugging Nimrod) + scan tokenizes a single file (for debugging Nimrod) + debugtrans for debugging the transformation pass +Advanced options: + -w, --warnings:on|off warnings ON|OFF + --warning[X]:on|off specific warning X ON|OFF + --hints:on|off hints ON|OFF + --hint[X]:on|off specific hint X ON|OFF + --cc:C_COMPILER set the C/C++ compiler to use + --lib:PATH set the system library path + -c, --compile_only compile only; do not assemble or link + --no_linking compile but do not link + --gen_script generate a compile script (in the 'rod_gen' + subdirectory named 'compile_$project$scriptext') + --os:SYMBOL set the target operating system (cross-compilation) + --cpu:SYMBOL set the target processor (cross-compilation) + --debuginfo enables debug information + -t, --passc:OPTION pass an option to the C compiler + -l, --passl:OPTION pass an option to the linker + --gen_mapping generate a mapping file containing + (Nimrod, mangled) identifier pairs + --merge_output generate only one C output file + --line_dir:on|off generation of #line directive ON|OFF + --checkpoints:on|off turn on|off checkpoints; for debugging Nimrod + --skip_cfg do not read the general configuration file + --skip_proj_cfg do not read the project's configuration file + --import:MODULE_FILE import the given module implicitly for each module + --maxerr:NUMBER stop compilation after NUMBER errors; broken! + --ast_cache:on|off caching of ASTs ON|OFF (default: OFF) + --c_file_cache:on|off caching of generated C files ON|OFF (default: OFF) + --index:FILE use FILE to generate a documenation index file + --putenv:key=value set an environment variable + --list_cmd list the commands used to execute external programs + -v, --verbose show what Nimrod is doing + --version show detailed version information diff --git a/data/ast.yml b/data/ast.yml new file mode 100755 index 000000000..ee688909d --- /dev/null +++ b/data/ast.yml @@ -0,0 +1,258 @@ +# +# +# The Nimrod Compiler +# (c) Copyright 2008 Andreas Rumpf +# +# See the file "copying.txt", included in this +# distribution, for details about the copyright. +# + +{ +'SymFlag': [ # already 32 flags! + 'sfGeneric', # whether an operator, proc or type is generic + 'sfForward', # symbol is forward directed + 'sfImportc', # symbol is external; imported + 'sfExportc', # symbol is exported (under a specified name) + 'sfVolatile', # variable is volatile + 'sfUsed', # read access of sym (for warnings) or simply used + 'sfWrite', # write access of variable (for hints) + 'sfRegister', # variable should be placed in a register + 'sfPure', # object is "pure" that means it has no type-information + 'sfCodeGenerated', # wether we have already code generated for the proc + 'sfPrivate', # symbol should be made private after module compilation + 'sfGlobal', # symbol is at global scope + 'sfResult', # variable is 'result' in proc + 'sfNoSideEffect', # proc has no side effects + 'sfMainModule', # module is the main module + 'sfSystemModule', # module is the system module + 'sfNoReturn', # proc never returns (an exit proc) + 'sfReturnsNew', # proc returns new allocated thing (allows optimizations) + 'sfInInterface', # symbol is in interface section declared + 'sfNoStatic', # symbol is used within an iterator (needed for codegen) + # so it cannot be 'static' in the C code + # this is called 'nostatic' in the pragma section + 'sfCompilerProc', # proc is a compiler proc, that is a C proc that is + # needed for the code generator + 'sfCppMethod', # proc is a C++ method + 'sfDiscriminant', # field is a discriminant in a record/object + 'sfDeprecated', # symbol is deprecated + 'sfInClosure', # variable is accessed by a closure + 'sfIsCopy', # symbol is a copy; needed for proper name mangling + 'sfStar', # symbol has * visibility + 'sfMinus' # symbol has - visibility +], + +'TypeFlag': [ + 'tfIsDistinct', # better use this flag to make it easier for accessing + # typeKind in the code generators + 'tfGeneric', # type is a generic one + 'tfExternal', # type is external + 'tfImported', # type is imported from C + 'tfInfoGenerated', # whether we have generated type information for this type + 'tfSemChecked', # used to mark types that's semantic has been checked; + # used to prevend endless loops during semantic checking + 'tfHasOutParams', # for a proc or iterator p: + # it indicates that p has out or in out parameters: this + # is used to speed up semantic checking a bit + 'tfEnumHasWholes', # enum cannot be mapped into a range + 'tfVarargs', # procedure has C styled varargs + 'tfAssignable' # can the type be assigned to? +], + +'TypeKind': [ # order is important! + # Don't forget to change hti.nim if you make a change here + 'tyNone', 'tyBool', 'tyChar', + 'tyEmptySet', 'tyArrayConstr', 'tyNil', 'tyRecordConstr', + 'tyGeneric', + 'tyGenericInst', # instantiated generic type + 'tyGenericParam', + 'tyEnum', 'tyAnyEnum', + 'tyArray', + 'tyRecord', + 'tyObject', + 'tyTuple', + 'tySet', + 'tyRange', + 'tyPtr', 'tyRef', + 'tyVar', + 'tySequence', + 'tyProc', + 'tyPointer', 'tyOpenArray', + 'tyString', 'tyCString', 'tyForward', + # numerical types: + 'tyInt', 'tyInt8', 'tyInt16', 'tyInt32', 'tyInt64', # signed integers + 'tyFloat', 'tyFloat32', 'tyFloat64', 'tyFloat128' +], + +'NodeKind': [ # these are pure nodes + # order is extremely important, because ranges are used to check whether + # a node belongs to a certain class + 'nkNone', # unknown node kind: indicates an error + + # Expressions: + # Atoms: + 'nkEmpty', # the node is empty + 'nkIdent', # node is an identifier + 'nkSym', # node is a symbol + 'nkType', # node is used for its typ field + + 'nkCharLit', # a character literal '' + 'nkRCharLit', # a raw character literal r'' + + 'nkIntLit', # an integer literal + 'nkInt8Lit', + 'nkInt16Lit', + 'nkInt32Lit', + 'nkInt64Lit', + 'nkFloatLit', # a floating point literal + 'nkFloat32Lit', + 'nkFloat64Lit', + 'nkStrLit', # a string literal "" + 'nkRStrLit', # a raw string literal r"" + 'nkTripleStrLit', # a triple string literal """ + 'nkNilLit', # the nil literal + # end of atoms + 'nkDotCall', # used to temporarily flag a nkCall node; this is used + # for transforming ``s.len`` to ``len(s)`` + 'nkCommand', # a call like ``p 2 4`` without parenthesis + 'nkCall', # a call like p(x, y) or an operation like +(a, b) + 'nkGenericCall', # a call with given type parameters + 'nkExplicitTypeListCall', # a call with given explicit typelist + 'nkExprEqExpr', # a named parameter with equals: ''expr = expr'' + 'nkExprColonExpr', # a named parameter with colon: ''expr: expr'' + 'nkIdentDefs', # a definition like `a, b: typeDesc = expr` + # either typeDesc or expr may be nil; used in + # formal parameters, var statements, etc. + 'nkInfix', # a call like (a + b) + 'nkPrefix', # a call like !a + 'nkPostfix', # something like a! (also used for visibility) + 'nkPar', # syntactic () + 'nkCurly', # syntactic {} + 'nkBracket', # syntactic [] + 'nkBracketExpr', # an expression like a[i..j, k] + 'nkPragmaExpr', # an expression like a{.pragmas.} + 'nkRange', # an expression like i..j + 'nkDotExpr', # a.b + 'nkCheckedFieldExpr', # a.b, but b is a field that needs to be checked + 'nkDerefExpr', # a^ + 'nkIfExpr', # if as an expression + 'nkElifExpr', + 'nkElseExpr', + 'nkLambda', # lambda expression + 'nkAccQuoted', # `a` as a node + 'nkHeaderQuoted', # `a(x: int)` as a node + + 'nkSetConstr', # a set constructor {} + 'nkConstSetConstr', # a set constructor with only constant expressions + 'nkArrayConstr', # an array constructor [] + 'nkConstArrayConstr', # an array constructor with only constant expressions + 'nkRecordConstr', # a record constructor [] + 'nkConstRecordConstr', # a record constructor with only constant expressions + 'nkTableConstr', # a table constructor {expr: expr} + 'nkConstTableConstr', # a table constructor with only constant expressions + 'nkQualified', # describes a.b for qualified identifiers + 'nkHiddenStdConv', # an implicit standard type conversion + 'nkHiddenSubConv', # an implicit type conversion from a subtype + # to a supertype + 'nkHiddenCallConv', # an implicit type conversion via a type converter + 'nkConv', # a type conversion + 'nkCast', # a type cast + 'nkAddr', # a addr expression + # end of expressions + + 'nkAsgn', # a = b + 'nkDefaultTypeParam', # `ident = typeDesc` in generic parameters + 'nkGenericParams', # generic parameters + 'nkFormalParams', # formal parameters + 'nkOfInherit', # inherited from symbol + + 'nkModule', # the syntax tree of a module + 'nkProcDef', # a proc + 'nkConverterDef', # a converter + 'nkMacroDef', # a macro + 'nkTemplateDef', # a template + 'nkIteratorDef', # an iterator + + 'nkOfBranch', # used inside case statements for (cond, action)-pairs + 'nkElifBranch', # used in if statements + 'nkExceptBranch', # an except section + 'nkElse', # an else part + 'nkMacroStmt', # a macro statement + 'nkAsmStmt', # an assembler block + 'nkPragma', # a pragma statement + 'nkIfStmt', # an if statement + 'nkWhenStmt', # a when statement + 'nkForStmt', # a for statement + 'nkWhileStmt', # a while statement + 'nkCaseStmt', # a case statement + 'nkVarSection', # a var section + 'nkConstSection', # a const section + 'nkConstDef', # a const definition + 'nkTypeSection', # a type section (consists of type definitions) + 'nkTypeDef', # a type definition + 'nkYieldStmt', # the yield statement as a tree + 'nkTryStmt', # a try statement + 'nkFinally', # a finally section + 'nkRaiseStmt', # a raise statement + 'nkReturnStmt', # a return statement + 'nkBreakStmt', # a break statement + 'nkContinueStmt', # a continue statement + 'nkBlockStmt', # a block statement + 'nkGotoStmt', # used by the transformation pass; first son is a sym + # node containing a label + 'nkDiscardStmt', # a discard statement + 'nkStmtList', # a list of statements + 'nkImportStmt', # an import statement + 'nkFromStmt', # a from * import statement + 'nkImportAs', # an `import xyx as abc` section + 'nkIncludeStmt', # an include statement + 'nkAccessStmt', # used internally for iterators + 'nkCommentStmt', # a comment statement + 'nkStmtListExpr', # a statement list followed by an expr; this is used + # to allow powerful multi-line templates + 'nkBlockExpr', # a statement block ending in an expr; this is used + # to allowe powerful multi-line templates that open a + # temporary scope + 'nkVm', # indicates a virtual instruction; integer field is + # used for the concrete opcode + + # types as syntactic trees: + 'nkTypeOfExpr', + 'nkRecordTy', + 'nkObjectTy', + 'nkRecList', # list of record/object parts + 'nkRecCase', # case section of record/object + 'nkRecWhen', # when section of record/object + 'nkRefTy', + 'nkPtrTy', + 'nkVarTy', + 'nkProcTy', + 'nkEnumTy', + 'nkEnumFieldDef' # `ident = expr` in an enumeration +], + +'SymKind': [ + # the different symbols (start with the prefix sk); + # order is important for the documentation generator! + 'skUnknownSym', # unknown symbol: used for parsing assembler blocks + 'skConditional', # symbol for the preprocessor (may become obsolete) + 'skDynLib', # symbol represents a dynamic library; this is used + # internally; it does not exist in Nimrod code + 'skParam', # a parameter + 'skTypeParam', # a type parameter; example: proc x[T]() <- `T` + 'skTemp', # a temporary variable (introduced by compiler) + 'skType', # a type + 'skConst', # a constant + 'skVar', # a variable + 'skProc', # a proc + 'skIterator', # an iterator + 'skConverter', # a type converter + 'skMacro', # a macro + 'skTemplate', # a template + 'skField', # a field in a record or object + 'skEnumField', # an identifier in an enum + 'skForVar', # a for loop variable + 'skModule', # module identifier + 'skLabel' # a label (for block statement) +] +} diff --git a/data/basicopt.txt b/data/basicopt.txt new file mode 100755 index 000000000..a6f6ffee5 --- /dev/null +++ b/data/basicopt.txt @@ -0,0 +1,29 @@ +Usage:: + nimrod command [options] inputfile [arguments] +Command:: + compile compile project with default code generator (C) + compile_to_c compile project with C code generator + compile_to_cpp compile project with C++ code generator + doc generate the documentation for inputfile; + with --run switch opens it with $BROWSER +Arguments: + arguments are passed to the program being run (if --run option is selected) +Options: + -p, --path:PATH add path to search paths + -o, --out:FILE set the output filename + -d, --define:SYMBOL define a conditional symbol + -u, --undef:SYMBOL undefine a conditional symbol + -b, --force_build force rebuilding of all modules + --stack_trace:on|off code generation for stack trace ON|OFF + --line_trace:on|off code generation for line trace ON|OFF + --debugger:on|off turn Embedded Nimrod Debugger ON|OFF + -x, --checks:on|off code generation for all runtime checks ON|OFF + --range_checks:on|off code generation for range checks ON|OFF + --bound_checks:on|off code generation for bound checks ON|OFF + --overflow_checks:on|off code generation for over-/underflow checks ON|OFF + -a, --assertions:on|off code generation for assertions ON|OFF + --opt:none|speed|size optimize not at all or for speed|size + --app:console|gui|lib generate a console|GUI application or a shared lib + -r, --run run the compiled program with given arguments + --advanced show advanced command line switches + -h, --help show this help diff --git a/data/ccomps.txt b/data/ccomps.txt new file mode 100755 index 000000000..0dcad7c08 --- /dev/null +++ b/data/ccomps.txt @@ -0,0 +1,1692 @@ +# This file lists the C compilers' command line options + +# ------------ Open Watcom --------------------------------------------- + +Open Watcom C/C++32 Compile and Link Utility Version 1.1 +Portions Copyright (c) 1988-2002 Sybase, Inc. All Rights Reserved. +Source code is available under the Sybase Open Watcom Public License. +See http://www.openwatcom.org/ for details. +Usage: wcl386 [options] file(s) +Options: ( /option is also accepted ) +-c compile only, no link +-cc treat source files as C code +-cc++ treat source files as C++ code +-y ignore the WCL386 environment variable + [Processor options] +-3r 386 register calling conventions -5r Pentium register calling conv. +-3s 386 stack calling conventions -5s Pentium stack calling conventions +-4r 486 register calling conventions -6r Pentium Pro register call conven. +-4s 486 stack calling conventions -6s Pentium Pro stack call conven. + [Floating-point processor options] +-fpc calls to floating-point library -fp2 generate 287 floating-point code +-fpd enable Pentium FDIV check -fp3 generate 387 floating-point code +-fpi inline 80x87 with emulation -fp5 optimize f-p for Pentium +-fpi87 inline 80x87 -fp6 optimize f-p for Pentium Pro +-fpr use old floating-point conventions + [Compiler options] +-db generate browsing information -s remove stack overflow checks +-e=<n> set error limit number -sg generate calls to grow the stack +-ee call epilogue hook routine -st touch stack through SS first +-ef full paths in messages -v output func declarations to .def +-ei force enums to be type int -vcap VC++ compat: alloca in arg lists +-em minimum base type for enum is int -w=<n> set warning level number +-en emit routine names in the code -wcd=<n> disable warning message <n> +-ep[=<n>] call prologue hook routine -wce=<n> enable warning message <n> +-eq do not display error messages -we treat all warnings as errors +-et P5 profiling -wx (C++) set warning level to max +-ez generate PharLap EZ-OMF object -xr (C++) enable RTTI +-fh=<file> pre-compiled headers -z{a,e} disable/enable extensions +-fhq[=<file>] fh without warnings -zc place strings in CODE segment +-fhr (C++) only read PCH -zd{f,p} DS floats vs DS pegged to DGROUP +-fhw (C++) only write PCH -zdl load DS directly from DGROUP +-fhwe (C++) don't count PCH warnings -zf{f,p} FS floats vs FS pegged to seg +-fi=<file> force include of file -zg{f,p} GS floats vs GS pegged to seg +-fo=<file> set object file name -zg function prototype using base type +-fr=<file> set error file name -zk{0,0u,1,2,3,l} double-byte support +-ft (C++) check for 8.3 file names -zku=<codepage> UNICODE support +-fx (C++) no check for 8.3 file names -zl remove default library information +-g=<codegroup> set code group name -zld remove file dependency information +-hc codeview debug format -zm place functions in separate segments +-hd dwarf debug format -zmf (C++) zm with near calls allowed +-hw watcom debug format -zp{1,2,4,8,16} struct packing align. +-j change char default to signed -zpw warning when padding a struct +-m{f,s,m,c,l} memory model -zq operate quietly +-nc=<name> set CODE class name -zs check syntax only +-nd=<name> set data segment name -zt<n> set data threshold +-nm=<module_name> set module name -zu SS != DGROUP +-nt=<name> set text segment name -zv (C++) enable virt. fun. removal opt +-r save/restore segregs across calls -zw generate code for MS Windows +-ri promote function args/rets to int -zz remove @size from __stdcall func. + [Debugging options] +-d0 no debugging information -d2t (C++) d2 but without type names +-d1{+} line number debugging info. -d3 debug info with unref'd type names +-d2 full symbolic debugging info. -d3i (C++) d3 + inlines as COMDATs +-d2i (C++) d2 + inlines as COMDATs -d3s (C++) d3 + inlines as statics +-d2s (C++) d2 + inlines as statics + [Optimization options] +-oa relax alias checking -ol+ ol with loop unrolling +-ob branch prediction -om generate inline math functions +-oc disable call/ret optimization -on numerically unstable floating-point +-od disable optimizations -oo continue compile when low on memory +-oe[=num] expand functions inline -op improve floating-point consistency +-of[+] generate traceable stack frames-or re-order instructions to avoid stalls +-oh enable repeated optimizations -os optimize for space +-oi inline intrinsic functions -ot optimize for time +-oi+ (C++) oi with max inlining depth -ou ensure unique addresses for functions +-ok control flow entry/exit seq. -ox maximum optimization (-obmiler -s) +-ol perform loop optimizations + [C++ exception handling options] +-xd no exception handling -xs exception handling: balanced +-xds no exception handling: space -xss exception handling: space +-xdt no exception handling -xst exception handling: time + [Preprocessor options] +-d<name>[=text] define a macro -u<name> undefine macro name +-d+ extend syntax of -d option -p{c,l,w=<n>} preprocess source file +-fo=<filename> set object file name c -> preserve comments +-i=<directory> include directory l -> insert #line directives +-t=<n> (C++) # of spaces in tab stop w=<n> -> wrap output at column n +-tp=<name> (C) set #pragma on( <name> + [Linker options] +-bd build Dynamic link library -fm[=<map_file>] generate map file +-bm build Multi-thread application -k<stack_size> set stack size +-br build with dll run-time library -l=<system> link for the specified system +-bw build default Windowing app. -x make names case sensitive +-bt=<os> build target OS. @<directive_file> include file +-fd[=<directive_file>] directive file -"<linker directives>" +-fe=<executable> name executable file + +# ---------------------- Borland C++ 5.5 --------------------------------------------- +Borland C++ 5.5.1 for Win32 Copyright (c) 1993, 2000 Borland +Syntax is: BCC32 [ options ] file[s] * = default; -x- = turn switch x off + -3 * 80386 Instructions -4 80486 Instructions + -5 Pentium Instructions -6 Pentium Pro Instructions + -Ax Disable extensions -B Compile via assembly + -C Allow nested comments -Dxxx Define macro + -Exxx Alternate Assembler name -Hxxx Use pre-compiled headers + -Ixxx Include files directory -K Default char is unsigned + -Lxxx Libraries directory -M Generate link map + -N Check stack overflow -Ox Optimizations + -P Force C++ compile -R Produce browser info + -RT * Generate RTTI -S Produce assembly output + -Txxx Set assembler option -Uxxx Undefine macro + -Vx Virtual table control -X Suppress autodep. output + -aN Align on N bytes -b * Treat enums as integers + -c Compile only -d Merge duplicate strings + -exxx Executable file name -fxx Floating point options + -gN Stop after N warnings -iN Max. identifier length + -jN Stop after N errors -k * Standard stack frame + -lx Set linker option -nxxx Output file directory + -oxxx Object file name -p Pascal calls + -tWxxx Create Windows app -u * Underscores on externs + -v Source level debugging -wxxx Warning control + -xxxx Exception handling -y Produce line number info + -zxxx Set segment names + +Compiler options | Defines + +-D<name> Define name to the null string +-Dname=string Define "name" to "string" +-U<name> Undefine any previous definitions of name + +Compiler options | Code generation + +-an Align data on "n" boundaries, where 1=byte, 2=word (2 bytes), + 4=Double word (4 bytes), 8=Quad word (8 bytes), + 16=Paragraph (16 bytes) (Default: -a4) +-b Make enums always integer-sized (Default: -b makes enums integer size) +-CP Enable code paging (for MBCS) +-d Merge duplicate strings +-K Default character type unsigned (Default: -K- default character type signed) +-r Use register variables (Default) + +-rd Use register variables only when register keyword is employed +-WU Generates Unicode application + +Compiler options | Floating point + +-f- No floating point +-f Emulate floating point +-ff Fast floating point +-fp Correct Pentium fdiv flaw + +Compiler options | Compiler output + +-c Compile to .OBJ, no link +-e<filename> Specify executable file name +-lx Pass option x to linker +-M Create a Map file +-o<filename> Compile .OBJ to filename +-P Perform C++ compile regardless of source extension +-P<ext> Perform C++ compile, set output to extension to .ext +-Q Extended compiler error information(Default = OFF) + +-tW Target is a Windows application +-tWC Target is a console application +-tWD Generate a .DLL executable +-tWM Generate a 32-bit multi-threaded target +-tWR Target uses the dynamic RTL +-tWV Target uses the VCL +-X Disable compiler autodependency output (Default: -X- use + compiler autodependency output) +-u Generate underscores (Default) + +Compiler options | Source + +-C Turn nested comments on (Default: -C- turn nested comments off) +-in Make significant identifier length to be "n" (Default = 250) +-AT Use Borland C++ keywords (also -A-) +-A Use only ANSI keywords +-AU Use only UNIX V keywords +-AK Use only Kernighan and Ritchie keywords +-VF MFC compatibility +-VI- Use old Borland search algorithm to locate header files (look + first in current working directory) + +Compiler options | Debugging + +-k Turn on standard stack frame (Default) +-vi Control expansion of inline functions +-y Line numbers on +-v Turn on source debugging +-R Include browser information in generated .OBJ files + +Compiler options | Precompiled headers + +-H Generate and use precompiled headers (Default) +-Hu Use but do not generate precompiled headers +-Hc Cache precompiled header +-He Enable precompiled headers with external type files (Default) +-Hs Enable smart cached precompiled headers (Default) +-H=filename Set the name of the file for precompiled headers +-H\"xxx\" Stop precompiling after header file xxxx + +-Hh=xxx Stop precompiling after header file xxx + +Compiler options | Processor + +-3 Generate 80386 instructions. (Default) +-4 Generate 80486 instructions +-5 Generate Pentium instructions +-6 Generate Pentium Pro instructions + +Compiler options | Calling convention + +-p Use Pascal calling convention +-pc Use C calling convention (Default: -pc, -p-) +-pr Use fastcall calling convention for passing + parameters in registers +-ps Use stdcall calling convention + +Compiler options | Assembler-code options + +-B Compile to .ASM (-S), then assemble to .OBJ +-E<filename> Specify assembler +-S Compile to assembler +-Tx Specify assembler option x + +C++ options | C++ compatibility + +-VC Calling convention mangling compatibility +-Vd for loop variable scoping +-Ve Zero-length empty base classes +-Vl Use old-style Borland C++ structure layout (for compatibility + with older versions of BCC32.EXE) +-Vmd Use the smallest possible representation for member pointers +-Vmm Support multiple inheritance for member pointers +-Vmp Honor declared precision of member pointers + +-Vms Support single inheritance for member pointers +-Vmv Place no restrictions on where member pointers can point (Default) +-Vx Zero-length empty class member functions +-xdg Use global destructor count (for compatibility with + older versions of BCC32.EXE) + +C++ options | Virtual tables + +-V Use smart C++ virtual tables (Default) +-V0 External C++ virtual tables +-V1 Public C++ virtual tables + +C++ options | Templates + +-Ja Expand all template members (including unused members) +-Jgd Generate definitions for all template instances and merge duplicates (Default) +-Jgx Generate external references for all template instances + +C++ options | Exception handling + +-x Enable exception handling (Default) +-xp Enable exception location information +-xd Enable destructor cleanup (Default) +-xf Enable fast exception prologs +-xs Enable slow exception epilogues +-RT Enable runtime type information (Default) + +Optimization options + +-G, -G- Optimize for size/speed; use – O1 and –O2 instead +-O Optimize jumps +-O1 Generate smallest possible code +-O2 Generate fastest possible code +-Oc Eliminate duplicate expressions within basic blocks and functions +-Od Disable all optimizations + +-Oi Expand common intrinsic functions +-OS Pentium instruction scheduling +-Og Optimize for speed; use –O2 instead + +-Os, -Ot Optimize for speed/size; use –O2 and –O1 instead +-Ov Enable loop induction variable and strength reduction +-Ox Optimize for speed; use –O2 instead + +Warning message options + +-q Suppress compiler identification banner (Default = OFF) +-w Display warnings on +-wxxx Enable xxx warning message +-w-xxx Disable xxx warning message +-gn Warnings: stop after n messages (Default = 100) +-gb Stop batch compilation after first file with warnings (Default = OFF) +-jn Errors: stop after n messages (Default = 25) +-jb Stop batch compilation after first file with errors (Default = OFF) + +Message options | Portability + +-w-rpt -w-8069 Nonportable pointer conversion (Default ON) +-w-cpt -w-8011 Nonportable pointer comparison (Default ON) +-w-rng -w-8068 Constant out of range in comparison (Default ON) +-wcln -w8009 Constant is long +-wsig -w8071 Conversion may lose significant digits + +-wucp -w8079 Mixing pointers to different 'char' types + +Message options | ANSI violations + +-w-voi -w-8081 Void functions may not return a value (Default ON) +-w-ret -w-8067 Both return and return of a value used (Default ON) +-w-sus -w-8075 Suspicious pointer conversion (Default ON) +-wstu -w8073 Undefined structure 'structure' +-w-dup -w-8017 Redefinition of 'macro' is not identical (Default ON) + +-w-big -w-8007 Hexadecimal value contains more than three digits (Default ON) +-wbbf -w8005 Bit fields must be signed or unsigned int +-w-ext -w-8020 'identifier' is declared as both external and static (Default ON) +-w-dpu -w-8015 Declare type 'type' prior to use in prototype (Default ON) +-w-zdi -w-8082 Division by zero (Default ON) + +-w-bei -w-8006 Initializing 'identifier' with 'identifier' (Default ON) +-wpin -w8061 Initialization is only partially bracketed +-wnak -w8036 Non-ANSI Keyword Used: '<keyword>' (Note: Use of this option is a requirement for ANSI conformance) + +Message options | Obsolete C++ + +-w-obi -w-8052 Base initialization without a class name is now obsolete (Default ON) +-w-ofp -w-8054 Style of function definition is now obsolete (Default ON) +-w-pre -w-8063 Overloaded prefix operator 'operator' used as a postfix operator (Default ON) + +Message options | Potential C++ errors + +-w-nci -w-8038 The constant member 'identifier' is not initialized (Default ON) +-w-ncl -w-8039 Constructor initializer list ignored (Default ON) +-w-nin -w-8042 Initializer for object 'identifier' ignored (Default ON) +-w-eas -w-8018 Assigning ‘type’ to ‘enum’ (Default ON) +-w-hid -w-8022 'function1' hides virtual function 'function2' (Default ON) + +-wncf -w-8037 Non-constant function ‘ident’ called for const object +-w-ibc -w-8024 Base class 'class1' is also a base class of 'class2' (Default ON) +-w-dsz -w-8016 Array size for 'delete' ignored (Default ON) +-w-nst -w-8048 Use qualified name to access nested type 'type' (Default ON) +-whch -w-8021 Handler for 'type1' Hidden by Previous Handler for 'type2' + +-w-mpc -w-8033 Conversion to type fails for members of virtual base class base (Default ON) +-w-mpd -w-8034 Maximum precision used for member pointer type <type> (Default ON) +-w-ntd -w-8049 Use '> >' for nested templates instead of '>>' (Default ON) +-w-thr -w-8078 Throw expression violates exception specification (Default ON) + +-w-tai -w-8076 Template instance 'instance' is already instantiated (Default ON) +-w-tes -w-8077 Explicitly specializing an explicitly specialized class member makes no sense (Default ON) +-w-nvf -w-8051 Non-volatile function ‘function’ called for volatile object (Default ON) + +Message options | Inefficient C++ coding + +-w-inl -w-8026, -w-8027 Functions containing ... are not expanded inline (Default ON) +-w-lin -w-8028 Temporary used to initialize 'identifier' (Default ON) +-w-lvc -w-8029, -w-8030, -w-8031, -w-8032 Temporary used for parameter (Default ON) + +Message options | Potential errors + +-w-ali -w-8086 Incorrect use of #pragma alias “aliasName” = “substitutename” (Default ON) +-w-cod -w-8093 Incorrect use of #pragma codeseg (Default ON) +-w-pcm -w-8094 Incorrect use of #pragma comment (Default ON) +-w-mes -w-8095 Incorrect use of #pragma message (Default ON) +-w-mcs -w-8096 Incorrect use of #pragma code_seg (Default ON) +-w-pia -w-8060 Possibly incorrect assignment (Default ON) + +-wdef -w8013 Possible use of 'identifier' before definition +-wnod -w8045 No declaration for function 'function' +-w-pro -w-8064, -w-8065 Call to function with no prototype (Default ON) +-w-rvl -w-8070 Function should return a value (Default ON) +-wamb -w8000 Ambiguous operators need parentheses + +-wprc -w8084 Suggest parentheses to clarify precedence (Default OFF) +-w-ccc -w-8008 Condition is always true OR Condition is always false (Default ON) +-w-com -w-8010 Continuation character \ found in // comment (Default ON) +-w-csu -w-8012 Comparing signed and unsigned values (Default ON) +-w-nfd -w-8040 Function body ignored (Default ON) +-w-ngu -w-8041 Negating unsigned value (Default ON) + +-w-nma -w-8043 Macro definition ignored (Default ON) +-w-nmu -w-8044 #undef directive ignored (Default ON) +-w-nop -w-8046 Pragma option pop with no matching option push (Default ON) +-w-npp -w-8083 Pragma pack pop with no matching pack push (Default ON) +-w-nsf -w-8047 Declaration of static function 'function(...)' ignored (Default ON) +-w-osh -w-8055 Possible overflow in shift operation (Default ON) + +-w-ovf -w-8056 Integer arithmetic overflow (Default ON) +-w-dig -w-8014 Declaration ignored (Default ON) +-w-pck -w-8059 Structure packing size has changed (Default ON) +-w-spa -w-8072 Suspicious pointer arithmetic (Default ON) +-w-ifr -w-8085 Function 'function' redefined as non-inline (Default ON) +-w-stl -w-8087 ‘operator==’ must be publicly visible to be contained by a ‘name’ (Default OFF) + +-w-stl -w-8089 ‘operator<’ must be publicly visible to be contained by a ‘name’ (Default OFF) +-w-stl -w-8090 ‘operator<’ must be publicly visible to be used by a ‘name’ (Default OFF) +-w-stl -w-8091,-w-8092 ‘type’ argument ‘argument’ passed to ‘function’ is a ‘type’ iterator. + ‘type’ iterator required (Default OFF) + +Message options | Inefficient coding + +-w-aus -w-8004 'identifier' is assigned a value that is never used (Default ON) +-w-par -w-8057 Parameter 'parameter' is never used (Default ON) +-wuse -w8080 'identifier' declared but never used +-wstv -w8074 Structure passed by value +-w-rch -w-8066 Unreachable code (Default ON) + +-w-eff -w-8019 Code has no effect (Default ON) + +Message options | General + +-wasm -w8003 Unknown assembler instruction +-w-ill -w-8025 Ill-formed pragma (Default ON) +-w-ias -w-8023 Array variable 'identifier' is near (Default ON) +-wamp -w8001 Superfluous & with function +-w-obs -w-8053 'ident' is obsolete (Default ON) +-w-pch -w-8058 Cannot create precompiled header: ‘header‘ (Default ON) + +-w-msg -w-8035 User-defined warnings +-w-asc -w-8002 Restarting compile using assembly (Default ON) +-w-nto -w-8050 No type OBJ file present. Disabling external types option. (Default ON) +-w-pow -w-8062 Previous options and warnings not restored (Default ON) +-w-onr -w-8097 Not all options can be restored at this time (Default ON) + +# --------------------------- LCC --------------------------------------------- +Option Meaning +-A All warnings will be active. +-ansic Disallow the language extensions of lcc-win32. +-D Define the symbol following the D. Example:-DNODEBUG The symbol + NODEBUG is defined. Note: NO space between the D and the symbol +-check Check the given source for errors. No object file is generated. +-E Generate an intermediate file with the output of the preprocessor. + The output file name will be deduced from the input file name, i.e., + for a compilation of foo.c you will obtain foo.i. +-E+ Like the -E option, but instead of generating a #line xxx directive, + the preprocessor generates a # xxx directive. +-EP Like the -E option, but no #line directives will be generated. +-errout= Append the warning/error messages to the indicated file. + Example -errout=Myexe.err. This will append to Myexe.err all + warnings and error messages. +-eN Set the maximum error count to N. Example:-e25. +-fno-inline The inline directive is ignored. +-Fo<file name> This forces the name of the output file. +-g2 Generate the debugging information. +-g3 Arrange for function stack tracing. If a trap occurs, the function + stack will be displayed. +-g4 Arrange for function stack and line number tracing. +-g5 Arrange for function stack, line number, and return call stack + corruption tracing. +-I Add a path to the path included, i.e. to the path the compiler follows + to find the header files. Example:-Ic:\project\headers. Note NO space + between the I and the following path. +-libcdll Use declarations for lcclibc.dll.Files compiled with this option + should use the -dynamic option of the linker lcclnk. +-M Print in standard output the names of all files that the preprocessor + has opened when processing the given input file. No object file is + generated. +-M1 Print in standard output each include file recursively, indicating + where it is called from, and when it is closed. +-nw No warnings will be emitted. Errors will be still printed. +-O Optimize the output. This activates the peephole optimizer. +-o <file>Use as the name of the output file the given name. Identical to the + Fo flag above. +-p6 Enable Pentium III instructions +-profile Inject code into the generated program to measure execution time. + This option is incompatible with debug level higher than 2. +-S Generate an assembly file. The output file name will be deduced from + the input file: for a compilation of foo.c you will obtain foo.asm. +-s n Set the switch density to n that must be a value between 0.0 and 1.0. + Example: -s 0.1 +-shadows Warn when a local variable shadows a global one. +-U Undefine the symbol following the U. +-unused Warns about unused assignments and suppresses the dead code. +-v Show compiler version and compilation date +-z Generate a file with the intermediate language of lcc. The name of the + generated file will have a .lil extension. +-Zp[1,2,4,8,16] Set the default alignment in structures to one, two, four, etc. + If you set it to one, this actually means no alignment at all. +------------------------------------------------------------------------- +Command line options are case sensitive. Use either "-" or "/" to +introduce an option in the command line. + +Lcclnk command line options. Options are introduced with the character '-' or t +he character '/'. +-o <filename> + Sets the name of the output file to file name. Insert a space between the o and the + name of the file. +-errout <filename> + Write all warnings/error messages to the indicated file name. +-subsystem <subsystem> + Indicate the type of output file. Console or windows application +-stack-commit <number> + With this option, you can commit more pages than one (4096 bytes). +-stack-reserve <number> + The default stack size is 1MB. This changes this limit. +-dynamic + Use lcclibc.dll as default library and link to it dynamically instead of linking + to libc.lib. +-dll + This option indicates to the linker that a .dll should be created instead of + an .exe. +-map <filename> + Indicates the name of the map file.This option is incompatible with the -s option. +-nolibc + Do not include the standard C library. +-s Strips all symbolic and debugging information from the executable. +-version nn.nn + Adds the version number to the executable. +-errout=<filename> + Write all warnings or errors to the file name indicated.Note that no spaces + should separate the name from the equals sign. +-nounderscores + When creating a DLL for Visual Basic for instance, it is better to export names + without underscores from a DLL. +-entry <fnname> + Option fo setting the DLL entry point to the given function +-version + Print the version name + + +-------------------------- GCC ------------------------------------------------------ +Switches: + -include <file> Include the contents of <file> before other files + -imacros <file> Accept definition of macros in <file> + -iprefix <path> Specify <path> as a prefix for next two options + -iwithprefix <dir> Add <dir> to the end of the system include path + -iwithprefixbefore <dir> Add <dir> to the end of the main include path + -isystem <dir> Add <dir> to the start of the system include path + -idirafter <dir> Add <dir> to the end of the system include path + -I <dir> Add <dir> to the end of the main include path + -I- Fine-grained include path control; see info docs + -nostdinc Do not search system include directories + (dirs specified with -isystem will still be used) + -nostdinc++ Do not search system include directories for C++ + -o <file> Put output into <file> + -pedantic Issue all warnings demanded by strict ISO C + -pedantic-errors Issue -pedantic warnings as errors instead + -trigraphs Support ISO C trigraphs + -lang-c Assume that the input sources are in C + -lang-c89 Assume that the input sources are in C89 + -lang-c++ Assume that the input sources are in C++ + -lang-objc Assume that the input sources are in ObjectiveC + -lang-objc++ Assume that the input sources are in ObjectiveC++ + -lang-asm Assume that the input sources are in assembler + -std=<std name> Specify the conformance standard; one of: + gnu89, gnu99, c89, c99, iso9899:1990, + iso9899:199409, iso9899:1999 + -+ Allow parsing of C++ style features + -w Inhibit warning messages + -Wtrigraphs Warn if trigraphs are encountered + -Wno-trigraphs Do not warn about trigraphs + -Wcomment{s} Warn if one comment starts inside another + -Wno-comment{s} Do not warn about comments + -Wtraditional Warn about features not present in traditional C + -Wno-traditional Do not warn about traditional C + -Wundef Warn if an undefined macro is used by #if + -Wno-undef Do not warn about testing undefined macros + -Wimport Warn about the use of the #import directive + -Wno-import Do not warn about the use of #import + -Werror Treat all warnings as errors + -Wno-error Do not treat warnings as errors + -Wsystem-headers Do not suppress warnings from system headers + -Wno-system-headers Suppress warnings from system headers + -Wall Enable all preprocessor warnings + -M Generate make dependencies + -MM As -M, but ignore system header files + -MD Generate make dependencies and compile + -MMD As -MD, but ignore system header files + -MF <file> Write dependency output to the given file + -MG Treat missing header file as generated files + -MP Generate phony targets for all headers + -MQ <target> Add a MAKE-quoted target + -MT <target> Add an unquoted target + -D<macro> Define a <macro> with string '1' as its value + -D<macro>=<val> Define a <macro> with <val> as its value + -A<question>=<answer> Assert the <answer> to <question> + -A-<question>=<answer> Disable the <answer> to <question> + -U<macro> Undefine <macro> + -v Display the version number + -H Print the name of header files as they are used + -C Do not discard comments + -dM Display a list of macro definitions active at end + -dD Preserve macro definitions in output + -dN As -dD except that only the names are preserved + -dI Include #include directives in the output + -fpreprocessed Treat the input file as already preprocessed + -ftabstop=<number> Distance between tab stops for column reporting + -P Do not generate #line directives + -$ Do not allow '$' in identifiers + -remap Remap file names when including files + --version Display version information + -h or --help Display this information + -ffixed-<register> Mark <register> as being unavailable to the compiler + -fcall-used-<register> Mark <register> as being corrupted by function calls + -fcall-saved-<register> Mark <register> as being preserved across functions + -finline-limit=<number> Limits the size of inlined functions to <number> + -fmessage-length=<number> Limits diagnostics messages lengths to <number> characters per line. + 0 suppresses line-wrapping + -fdiagnostics-show-location=[once | every-line] Indicates how often source location information + should be emitted, as prefix, at the beginning of diagnostics + when line-wrapping + -ftrapv Trap for signed overflow in addition / subtraction / multiplication + -fmem-report Report on permanent memory allocation at end of run + -ftime-report Report time taken by each compiler pass at end of run + -fsingle-precision-constant Convert floating point constant to single precision constant + -fbounds-check Generate code to check bounds before dereferencing pointers and arrays + -fbounded-pointers Compile pointers as triples: value, base & end + -funsafe-math-optimizations Allow math optimizations that may violate IEEE or ANSI standards + -ftrapping-math Floating-point operations can trap + -fmath-errno Set errno after built-in math functions + -fguess-branch-probability Enables guessing of branch probabilities + -fpeephole2 Enables an rtl peephole pass run before sched2 + -fident Process #ident directives + -fleading-underscore External symbols have a leading underscore + -fssa-dce Enable aggressive SSA dead code elimination + -fssa-ccp Enable SSA conditional constant propagation + -fssa Enable SSA optimizations + -finstrument-functions Instrument function entry/exit with profiling calls + -fdump-unnumbered Suppress output of instruction numbers and line number notes in debugging dumps + -fmerge-all-constants Attempt to merge identical constants and constant variables + -fmerge-constants Attempt to merge identical constants accross compilation units + -falign-functions Align the start of functions + -falign-labels Align all labels + -falign-jumps Align labels which are only reached by jumping + -falign-loops Align the start of loops + -fstrict-aliasing Assume strict aliasing rules apply + -fargument-noalias-global Assume arguments do not alias each other or globals + -fargument-noalias Assume arguments may alias globals but not each other + -fargument-alias Specify that arguments may alias each other & globals + -fstack-check Insert stack checking code into the program + -fpack-struct Pack structure members together without holes + -foptimize-register-move Do the full regmove optimization pass + -fregmove Enables a register move optimization + -fgnu-linker Output GNU ld formatted global initializers + -fverbose-asm Add extra commentry to assembler output + -fdata-sections place data items into their own section + -ffunction-sections place each function into its own section + -finhibit-size-directive Do not generate .size directives + -fcommon Do not put uninitialized globals in the common section + -fcprop-registers Do the register copy-propagation optimization pass + -frename-registers Do the register renaming optimization pass + -freorder-blocks Reorder basic blocks to improve code placement + -fbranch-probabilities Use profiling information for branch probabilities + -ftest-coverage Create data files needed by gcov + -fprofile-arcs Insert arc based program profiling code + -fnon-call-exceptions Support synchronous non-call exceptions + -fasynchronous-unwind-tables Generate unwind tables exact at each instruction boundary + -funwind-tables Just generate unwind tables for exception handling + -fexceptions Enable exception handling + -fpic Generate position independent code, if possible + -fbranch-count-reg Replace add,compare,branch with branch on count reg + -fsched-spec-load-dangerous Allow speculative motion of more loads + -fsched-spec-load Allow speculative motion of some loads + -fsched-spec Allow speculative motion of non-loads + -fsched-interblock Enable scheduling across basic blocks + -fschedule-insns2 Reschedule instructions after register allocation + -fschedule-insns Reschedule instructions before register allocation + -fpretend-float Pretend that host and target use the same FP format + -fdelete-null-pointer-checks Delete useless null pointer checks + -frerun-loop-opt Run the loop optimizer twice + -frerun-cse-after-loop Run CSE pass after loop optimizations + -fgcse-sm Perform store motion after global subexpression elimination + -fgcse-lm Perform enhanced load motion during global subexpression elimination + -fgcse Perform the global common subexpression elimination + -fdelayed-branch Attempt to fill delay slots of branch instructions + -freg-struct-return Return 'short' aggregates in registers + -fpcc-struct-return Return 'short' aggregates in memory, not registers + -fcaller-saves Enable saving registers around function calls + -fshared-data Mark data as shared rather than private + -fsyntax-only Check for syntax errors, then stop + -fkeep-static-consts Emit static const variables even if they are not used + -finline Pay attention to the 'inline' keyword + -fkeep-inline-functions Generate code for funcs even if they are fully inlined + -finline-functions Integrate simple functions into their callers + -ffunction-cse Allow function addresses to be held in registers + -fforce-addr Copy memory address constants into regs before using + -fforce-mem Copy memory operands into registers before using + -fpeephole Enable machine specific peephole optimizations + -fwritable-strings Store strings in writable data section + -freduce-all-givs Strength reduce all loop general induction variables + -fmove-all-movables Force all loop invariant computations out of loops + -fprefetch-loop-arrays Generate prefetch instructions, if available, for arrays in loops + -funroll-all-loops Perform loop unrolling for all loops + -funroll-loops Perform loop unrolling when iteration count is known + -fstrength-reduce Perform strength reduction optimizations + -fthread-jumps Perform jump threading optimizations + -fexpensive-optimizations Perform a number of minor, expensive optimizations + -fcse-skip-blocks When running CSE, follow conditional jumps + -fcse-follow-jumps When running CSE, follow jumps to their targets + -foptimize-sibling-calls Optimize sibling and tail recursive calls + -fomit-frame-pointer When possible do not generate stack frames + -fdefer-pop Defer popping functions args from stack until later + -fvolatile-static Consider all mem refs to static data to be volatile + -fvolatile-global Consider all mem refs to global data to be volatile + -fvolatile Consider all mem refs through pointers as volatile + -ffloat-store Do not store floats in registers + -feliminate-dwarf2-dups Perform DWARF2 duplicate elimination + -O[number] Set optimization level to [number] + -Os Optimize for space rather than speed + --param max-gcse-passes=<value> The maximum number of passes to make when doing GCSE + --param max-gcse-memory=<value> The maximum amount of memory to be allocated by GCSE + --param max-pending-list-length=<value> The maximum length of scheduling's pending operations list + --param max-delay-slot-live-search=<value> The maximum number of instructions to consider to find + accurate live register information + --param max-delay-slot-insn-search=<value> The maximum number of instructions to consider to fill a delay slot + --param max-inline-insns=<value> The maximum number of instructions in a function that + is eligible for inlining + -pedantic Issue warnings needed by strict compliance to ISO C + -pedantic-errors Like -pedantic except that errors are produced + -w Suppress warnings + -W Enable extra warnings + -Wmissing-noreturn Warn about functions which might be candidates for attribute noreturn + -Wdeprecated-declarations Warn about uses of __attribute__((deprecated)) declarations + -Wdisabled-optimization Warn when an optimization pass is disabled + -Wpadded Warn when padding is required to align struct members + -Wpacked Warn when the packed attribute has no effect on struct layout + -Winline Warn when an inlined function cannot be inlined + -Wuninitialized Warn about uninitialized automatic variables + -Wunreachable-code Warn about code that will never be executed + -Wcast-align Warn about pointer casts which increase alignment + -Waggregate-return Warn about returning structures, unions or arrays + -Wswitch Warn about enumerated switches missing a specific case + -Wshadow Warn when one local variable shadows another + -Werror Treat all warnings as errors + -Wsystem-headers Do not suppress warnings from system headers + -Wunused-value Warn when an expression value is unused + -Wunused-variable Warn when a variable is unused + -Wunused-parameter Warn when a function parameter is unused + -Wunused-label Warn when a label is unused + -Wunused-function Warn when a function is unused + -Wunused Enable unused warnings + -Wlarger-than-<number> Warn if an object is larger than <number> bytes + -p Enable function profiling + -o <file> Place output into <file> + -G <number> Put global and static data smaller than <number> + bytes into a special section (on some targets) + -gcoff Generate COFF format debug info + -gstabs+ Generate extended STABS format debug info + -gstabs Generate STABS format debug info + -ggdb Generate debugging info in default extended format + -g Generate debugging info in default format + -aux-info <file> Emit declaration info into <file> + -quiet Do not display functions compiled or elapsed time + -version Display the compiler's version + -d[letters] Enable dumps from specific passes of the compiler + -dumpbase <file> Base name to be used for dumps from specific passes + -fsched-verbose=<number> Set the verbosity level of the scheduler + --help Display this information + +Language specific options: + -ansi Compile just for ISO C89 + -fallow-single-precisio Do not promote floats to double if using -traditional + -std= Determine language standard + -funsigned-bitfields Make bit-fields by unsigned by default + -fsigned-char Make 'char' be signed by default + -funsigned-char Make 'char' be unsigned by default + -traditional Attempt to support traditional K&R style C + -fno-asm Do not recognize the 'asm' keyword + -fno-builtin Do not recognize any built in functions + -fhosted Assume normal C execution environment + -ffreestanding Assume that standard libraries & main might not exist + -fcond-mismatch Allow different types as args of ? operator + -fdollars-in-identifier Allow the use of $ inside identifiers + -fshort-double Use the same size for double as for float + -fshort-enums Use the smallest fitting integer to hold enums + -fshort-wchar Override the underlying type for wchar_t to `unsigned short' + -Wall Enable most warning messages + -Wbad-function-cast Warn about casting functions to incompatible types + -Wmissing-format-attrib Warn about functions which might be candidates for format attributes + -Wcast-qual Warn about casts which discard qualifiers + -Wchar-subscripts Warn about subscripts whose type is 'char' + -Wcomment Warn if nested comments are detected + -Wcomments Warn if nested comments are detected + -Wconversion Warn about possibly confusing type conversions + -Wformat Warn about printf/scanf/strftime/strfmon format anomalies + -Wno-format-y2k Don't warn about strftime formats yielding 2 digit years + -Wno-format-extra-args Don't warn about too many arguments to format functions + -Wformat-nonliteral Warn about non-string-literal format strings + -Wformat-security Warn about possible security problems with format functions + -Wimplicit-function-dec Warn about implicit function declarations + -Wimplicit-int Warn when a declaration does not specify a type + -Wimport Warn about the use of the #import directive + -Wno-long-long Do not warn about using 'long long' when -pedantic + -Wmain Warn about suspicious declarations of main + -Wmissing-braces Warn about possibly missing braces around initializers + -Wmissing-declarations Warn about global funcs without previous declarations + -Wmissing-prototypes Warn about global funcs without prototypes + -Wmultichar Warn about use of multicharacter literals + -Wnested-externs Warn about externs not at file scope level + -Wparentheses Warn about possible missing parentheses + -Wsequence-point Warn about possible violations of sequence point rules + -Wpointer-arith Warn about function pointer arithmetic + -Wredundant-decls Warn about multiple declarations of the same object + -Wsign-compare Warn about signed/unsigned comparisons + -Wfloat-equal Warn about testing equality of floating point numbers + -Wunknown-pragmas Warn about unrecognized pragmas + -Wstrict-prototypes Warn about non-prototyped function decls + -Wtraditional Warn about constructs whose meaning change in ISO C + -Wtrigraphs Warn when trigraphs are encountered + -Wwrite-strings Mark strings as 'const char *' + + Options for Ada: + -gnat Specify options to GNAT + -I Name of directory to search for sources + -nostdinc Don't use system library for sources + + Options for C++: + -fno-access-control Do not obey access control semantics + -falt-external-template Change when template instances are emitted + -fcheck-new Check the return value of new + -fconserve-space Reduce size of object files + -fno-const-strings Make string literals `char[]' instead of `const char[]' + -fdump-translation-unit Dump the entire translation unit to a file + -fno-default-inline Do not inline member functions by default + -fno-rtti Do not generate run time type descriptor information + -fno-enforce-eh-specs Do not generate code to check exception specifications + -fno-for-scope Scope of for-init-statement vars extends outside + -fno-gnu-keywords Do not recognize GNU defined keywords + -fhuge-objects Enable support for huge objects + -fno-implement-inlines Export functions even if they can be inlined + -fno-implicit-templates Only emit explicit template instatiations + -fno-implicit-inline-te Only emit explicit instatiations of inline templates + -fms-extensions Don't pedwarn about uses of Microsoft extensions + -foperator-names Recognize and/bitand/bitor/compl/not/or/xor + -fno-optional-diags Disable optional diagnostics + -fpermissive Downgrade conformance errors to warnings + -frepo Enable automatic template instantiation + -fstats Display statistics accumulated during compilation + -ftemplate-depth- Specify maximum template instantiation depth + -fuse-cxa-atexit Use __cxa_atexit to register destructors + -fvtable-gc Discard unused virtual functions + -fvtable-thunks Implement vtables using thunks + -fweak Emit common-like symbols as weak symbols + -fxref Emit cross referencing information + -Wreturn-type Warn about inconsistent return types + -Woverloaded-virtual Warn about overloaded virtual function names + -Wno-ctor-dtor-privacy Don't warn when all ctors/dtors are private + -Wnon-virtual-dtor Warn about non virtual destructors + -Wextern-inline Warn when a function is declared extern, then inline + -Wreorder Warn when the compiler reorders code + -Wsynth Warn when synthesis behavior differs from Cfront + -Wno-pmf-conversions Don't warn when type converting pointers to member functions + -Weffc++ Warn about violations of Effective C++ style rules + -Wsign-promo Warn when overload promotes from unsigned to signed + -Wold-style-cast Warn if a C style cast is used in a program + -Wno-non-template-frien Don't warn when non-templatized friend functions are declared within a template + -Wno-deprecated Don't announce deprecation of compiler features + + Options for Objective C: + -gen-decls Dump decls to a .decl file + -fgnu-runtime Generate code for GNU runtime environment + -fnext-runtime Generate code for NeXT runtime environment + -Wselector Warn if a selector has multiple methods + -Wno-protocol Do not warn if inherited methods are unimplemented + -print-objc-runtime-inf Generate C header of platform specific features + -fconstant-string-class Specify the name of the class for constant strings + +Target specific options: + -mms-bitfields Use MS bitfield layout + -mno-ms-bitfields Don't use MS bitfield layout + -mthreads Use Mingw-specific thread support + -mnop-fun-dllimport Ignore dllimport for functions + -mdll Generate code for a DLL + -mwindows Create GUI application + -mconsole Create console application + -mwin32 Set Windows defines + -mno-win32 Don't set Windows defines + -mcygwin Use the Cygwin interface + -mno-cygwin Use the Mingw32 interface + -mno-red-zone Do not use red-zone in the x86-64 code + -mred-zone Use red-zone in the x86-64 code + -m32 Generate 32bit i386 code + -m64 Generate 64bit x86-64 code + -m96bit-long-double sizeof(long double) is 12 + -m128bit-long-double sizeof(long double) is 16 + -mno-sse2 Do not support MMX, SSE and SSE2 built-in functions and code generation + -msse2 Support MMX, SSE and SSE2 built-in functions and code generation + -mno-sse Do not support MMX and SSE built-in functions and code generation + -msse Support MMX and SSE built-in functions and code generation + -mno-3dnow Do not support 3DNow! built-in functions + -m3dnow Support 3DNow! built-in functions + -mno-mmx Do not support MMX built-in functions + -mmmx Support MMX built-in functions + -mno-accumulate-outgoing- Do not use push instructions to save outgoing arguments + -maccumulate-outgoing-arg Use push instructions to save outgoing arguments + -mno-push-args Do not use push instructions to save outgoing arguments + -mpush-args Use push instructions to save outgoing arguments + -mno-inline-all-stringops Do not inline all known string operations + -minline-all-stringops Inline all known string operations + -mno-align-stringops Do not align destination of the string operations + -malign-stringops Align destination of the string operations + -mstack-arg-probe Enable stack probing + -momit-leaf-frame-pointer Omit the frame pointer in leaf functions + -mfancy-math-387 Generate sin, cos, sqrt for FPU + -mno-fancy-math-387 Do not generate sin, cos, sqrt for FPU + -mno-fp-ret-in-387 Do not return values of functions in FPU registers + -mfp-ret-in-387 Return values of functions in FPU registers + -mno-ieee-fp Do not use IEEE math for fp comparisons + -mieee-fp Use IEEE math for fp comparisons + -mno-svr3-shlib Uninitialized locals in .data + -msvr3-shlib Uninitialized locals in .bss + -mno-align-double Align doubles on word boundary + -malign-double Align some doubles on dword boundary + -mno-rtd Use normal calling convention + -mrtd Alternate calling convention + -mno-soft-float Use hardware fp + -msoft-float Do not use hardware fp + -mhard-float Use hardware fp + -mno-80387 Do not use hardware fp + -m80387 Use hardware fp + -masm= Use given assembler dialect + -mcmodel= Use given x86-64 code model + -mbranch-cost= Branches are this expensive (1-5, arbitrary units) + -mpreferred-stack-boundar Attempt to keep stack aligned to this power of 2 + -malign-functions= Function starts are aligned to this power of 2 + -malign-jumps= Jump targets are aligned to this power of 2 + -malign-loops= Loop code aligned to this power of 2 + -mregparm= Number of registers used to pass integer arguments + -march= Generate code for given CPU + -mfpmath= Generate floating point mathematics using given instruction set + -mcpu= Schedule code for given CPU + +There are undocumented target specific options as well. +Usage: .\..\lib\gcc-lib\mingw32\3.2\..\..\..\..\mingw32\bin\as.exe [option...] [asmfile...] +Options: + -a[sub-option...] turn on listings + Sub-options [default hls]: + c omit false conditionals + d omit debugging directives + h include high-level source + l include assembly + m include macro expansions + n omit forms processing + s include symbols + =FILE list to FILE (must be last sub-option) + -D produce assembler debugging messages + --defsym SYM=VAL define symbol SYM to given value + -f skip whitespace and comment preprocessing + --gstabs generate stabs debugging information + --gdwarf2 generate DWARF2 debugging information + --help show this message and exit + --target-help show target specific options + -I DIR add DIR to search list for .include directives + -J don't warn about signed overflow + -K warn when differences altered for long displacements + -L,--keep-locals keep local symbols (e.g. starting with `L') + -M,--mri assemble in MRI compatibility mode + --MD FILE write dependency information in FILE (default none) + -nocpp ignored + -o OBJFILE name the object-file output OBJFILE (default a.out) + -R fold data section into text section + --statistics print various measured statistics from execution + --strip-local-absolute strip local absolute symbols + --traditional-format Use same format as native assembler when possible + --version print assembler version number and exit + -W --no-warn suppress warnings + --warn don't suppress warnings + --fatal-warnings treat warnings as errors + --itbl INSTTBL extend instruction set to include instructions + matching the specifications defined in file INSTTBL + -w ignored + -X ignored + -Z generate object file even after errors + --listing-lhs-width set the width in words of the output data column of + the listing + --listing-lhs-width2 set the width in words of the continuation lines + of the output data column; ignored if smaller than + the width of the first line + --listing-rhs-width set the max width in characters of the lines from + the source file + --listing-cont-lines set the maximum number of continuation lines used + for the output data column of the listing + -q quieten some warnings + +Report bugs to bug-binutils@gnu.org +Usage: .\..\lib\gcc-lib\mingw32\3.2\..\..\..\..\mingw32\bin\ld.exe [options] file... +Options: + -a KEYWORD Shared library control for HP/UX compatibility + -A ARCH, --architecture ARCH + Set architecture + -b TARGET, --format TARGET Specify target for following input files + -c FILE, --mri-script FILE Read MRI format linker script + -d, -dc, -dp Force common symbols to be defined + -e ADDRESS, --entry ADDRESS Set start address + -E, --export-dynamic Export all dynamic symbols + -EB Link big-endian objects + -EL Link little-endian objects + -f SHLIB, --auxiliary SHLIB Auxiliary filter for shared object symbol table + -F SHLIB, --filter SHLIB Filter for shared object symbol table + -g Ignored + -G SIZE, --gpsize SIZE Small data size (if no size, same as --shared) + -h FILENAME, -soname FILENAME + Set internal name of shared library + -I PROGRAM, --dynamic-linker PROGRAM + Set PROGRAM as the dynamic linker to use + -l LIBNAME, --library LIBNAME + Search for library LIBNAME + -L DIRECTORY, --library-path DIRECTORY + Add DIRECTORY to library search path + -m EMULATION Set emulation + -M, --print-map Print map file on standard output + -n, --nmagic Do not page align data + -N, --omagic Do not page align data, do not make text readonly + -o FILE, --output FILE Set output file name + -O Optimize output file + -Qy Ignored for SVR4 compatibility + -q, --emit-relocs Generate relocations in final output + -r, -i, --relocateable Generate relocateable output + -R FILE, --just-symbols FILE + Just link symbols (if directory, same as --rpath) + -s, --strip-all Strip all symbols + -S, --strip-debug Strip debugging symbols + -t, --trace Trace file opens + -T FILE, --script FILE Read linker script + -u SYMBOL, --undefined SYMBOL + Start with undefined reference to SYMBOL + --unique [=SECTION] Don't merge input [SECTION | orphan] sections + -Ur Build global constructor/destructor tables + -v, --version Print version information + -V Print version and emulation information + -x, --discard-all Discard all local symbols + -X, --discard-locals Discard temporary local symbols (default) + --discard-none Don't discard any local symbols + -y SYMBOL, --trace-symbol SYMBOL + Trace mentions of SYMBOL + -Y PATH Default search path for Solaris compatibility + -(, --start-group Start a group + -), --end-group End a group + -assert KEYWORD Ignored for SunOS compatibility + -Bdynamic, -dy, -call_shared + Link against shared libraries + -Bstatic, -dn, -non_shared, -static + Do not link against shared libraries + -Bsymbolic Bind global references locally + --check-sections Check section addresses for overlaps (default) + --no-check-sections Do not check section addresses for overlaps + --cref Output cross reference table + --defsym SYMBOL=EXPRESSION Define a symbol + --demangle [=STYLE] Demangle symbol names [using STYLE] + --embedded-relocs Generate embedded relocs + -fini SYMBOL Call SYMBOL at unload-time + --force-exe-suffix Force generation of file with .exe suffix + --gc-sections Remove unused sections (on some targets) + --no-gc-sections Don't remove unused sections (default) + --help Print option help + -init SYMBOL Call SYMBOL at load-time + -Map FILE Write a map file + --no-define-common Do not define Common storage + --no-demangle Do not demangle symbol names + --no-keep-memory Use less memory and more disk I/O + --no-undefined Allow no undefined symbols + --allow-shlib-undefined Allow undefined symbols in shared objects + --allow-multiple-definition Allow multiple definitions + --no-undefined-version Disallow undefined version + --no-warn-mismatch Don't warn about mismatched input files + --no-whole-archive Turn off --whole-archive + --noinhibit-exec Create an output file even if errors occur + -nostdlib Only use library directories specified on + the command line + --oformat TARGET Specify target of output file + -qmagic Ignored for Linux compatibility + --relax Relax branches on certain targets + --retain-symbols-file FILE Keep only symbols listed in FILE + -rpath PATH Set runtime shared library search path + -rpath-link PATH Set link time shared library search path + -shared, -Bshareable Create a shared library + --sort-common Sort common symbols by size + --spare-dynamic-tags COUNT How many tags to reserve in .dynamic section + --split-by-file [=SIZE] Split output sections every SIZE octets + --split-by-reloc [=COUNT] Split output sections every COUNT relocs + --stats Print memory usage statistics + --target-help Display target specific options + --task-link SYMBOL Do task level linking + --traditional-format Use same format as native linker + --section-start SECTION=ADDRESS + Set address of named section + -Tbss ADDRESS Set address of .bss section + -Tdata ADDRESS Set address of .data section + -Ttext ADDRESS Set address of .text section + --verbose Output lots of information during link + --version-script FILE Read version information script + --version-exports-section SYMBOL + Take export symbols list from .exports, using + SYMBOL as the version. + --warn-common Warn about duplicate common symbols + --warn-constructors Warn if global constructors/destructors are seen + --warn-multiple-gp Warn if the multiple GP values are used + --warn-once Warn only once per undefined symbol + --warn-section-align Warn if start of section changes due to alignment + --fatal-warnings Treat warnings as errors + --whole-archive Include all objects from following archives + --wrap SYMBOL Use wrapper functions for SYMBOL + --mpc860c0 [=WORDS] Modify problematic branches in last WORDS (1-10, + default 5) words of a page +.\..\lib\gcc-lib\mingw32\3.2\..\..\..\..\mingw32\bin\ld.exe: supported targets: + pe-i386 pei-i386 elf32-i386 elf32-little elf32-big srec symbolsrec tekhex binary ihex +.\..\lib\gcc-lib\mingw32\3.2\..\..\..\..\mingw32\bin\ld.exe: supported emulations: i386pe +.\..\lib\gcc-lib\mingw32\3.2\..\..\..\..\mingw32\bin\ld.exe: emulation specific options: +i386pe: + --base_file <basefile> Generate a base file for relocatable DLLs + --dll Set image base to the default for DLLs + --file-alignment <size> Set file alignment + --heap <size> Set initial size of the heap + --image-base <address> Set start address of the executable + --major-image-version <number> Set version number of the executable + --major-os-version <number> Set minimum required OS version + --major-subsystem-version <number> Set minimum required OS subsystem version + --minor-image-version <number> Set revision number of the executable + --minor-os-version <number> Set minimum required OS revision + --minor-subsystem-version <number> Set minimum required OS subsystem revision + --section-alignment <size> Set section alignment + --stack <size> Set size of the initial stack + --subsystem <name>[:<version>] Set required OS subsystem [& version] + --support-old-code Support interworking with old code + --thumb-entry=<symbol> Set the entry point to be Thumb <symbol> + --add-stdcall-alias Export symbols with and without @nn + --disable-stdcall-fixup Don't link _sym to _sym@nn + --enable-stdcall-fixup Link _sym to _sym@nn without warnings + --exclude-symbols sym,sym,... Exclude symbols from automatic export + --exclude-libs lib,lib,... Exclude libraries from automatic export + --export-all-symbols Automatically export all globals to DLL + --kill-at Remove @nn from exported symbols + --out-implib <file> Generate import library + --output-def <file> Generate a .DEF file for the built DLL + --warn-duplicate-exports Warn about duplicate exports. + --compat-implib Create backward compatible import libs; + create __imp_<SYMBOL> as well. + --enable-auto-image-base Automatically choose image base for DLLs + unless user specifies one + --disable-auto-image-base Do not auto-choose image base. (default) + --dll-search-prefix=<string> When linking dynamically to a dll without an + importlib, use <string><basename>.dll + in preference to lib<basename>.dll + --enable-auto-import Do sophistcated linking of _sym to + __imp_sym for DATA references + --disable-auto-import Do not auto-import DATA items from DLLs + --enable-extra-pe-debug Enable verbose debug output when building + or linking to DLLs (esp. auto-import) + +Report bugs to bug-binutils@gnu.org +Usage: gcc [options] file... +Options: + -pass-exit-codes Exit with highest error code from a phase + --help Display this information + --target-help Display target specific command line options + -dumpspecs Display all of the built in spec strings + -dumpversion Display the version of the compiler + -dumpmachine Display the compiler's target processor + -print-search-dirs Display the directories in the compiler's search path + -print-libgcc-file-name Display the name of the compiler's companion library + -print-file-name=<lib> Display the full path to library <lib> + -print-prog-name=<prog> Display the full path to compiler component <prog> + -print-multi-directory Display the root directory for versions of libgcc + -print-multi-lib Display the mapping between command line options and + multiple library search directories + -Wa,<options> Pass comma-separated <options> on to the assembler + -Wp,<options> Pass comma-separated <options> on to the preprocessor + -Wl,<options> Pass comma-separated <options> on to the linker + -Xlinker <arg> Pass <arg> on to the linker + -save-temps Do not delete intermediate files + -pipe Use pipes rather than intermediate files + -time Time the execution of each subprocess + -specs=<file> Override built-in specs with the contents of <file> + -std=<standard> Assume that the input sources are for <standard> + -B <directory> Add <directory> to the compiler's search paths + -b <machine> Run gcc for target <machine>, if installed + -V <version> Run gcc version number <version>, if installed + -v Display the programs invoked by the compiler + -### Like -v but options quoted and commands not executed + -E Preprocess only; do not compile, assemble or link + -S Compile only; do not assemble or link + -c Compile and assemble, but do not link + -o <file> Place the output into <file> + -x <language> Specify the language of the following input files + Permissable languages include: c c++ assembler none + 'none' means revert to the default behavior of + guessing the language based on the file's extension + +Options starting with -g, -f, -m, -O, -W, or --param are automatically + passed on to the various sub-processes invoked by gcc. In order to pass + other options on to these processes the -W<letter> options must be used. + +For bug reporting instructions, please see: +<URL:http://www.gnu.org/software/gcc/bugs.html> + + +------------------------ DMC -------------------------------------------------- +Digital Mars Compiler Version 8.38n +Copyright (C) Digital Mars 2000-2003. All Rights Reserved. +Written by Walter Bright www.digitalmars.com +DMC is a one-step program to compile and link C++, C and ASM files. +Usage ([] means optional, ... means zero or more): + + DMC file... [flags...] [@respfile] + +file... .CPP, .C or .ASM source, .OBJ object or .LIB library file name +@respfile... pick up arguments from response file or environment variable +flags... one of the following: +-a[1|2|4|8] alignment of struct members -A strict ANSI C/C++ +-Aa enable new[] and delete[] -Ab enable bool +-Ae enable exception handling -Ar enable RTTI +-B[e|f|g|j] message language: English, French, German, Japanese +-c skip the link, do compile only -cpp source files are C++ +-cod generate .cod (assembly) file -C no inline function expansion +-d generate .dep (make dependency) file +-D #define DEBUG 1 -Dmacro[=text] define macro +-e show results of preprocessor -EC do not elide comments +-EL #line directives not output -f IEEE 754 inline 8087 code +-fd work around FDIV problem -ff fast inline 8087 code +-g generate debug info +-gf disable debug info optimization -gg make static functions global +-gh symbol info for globals -gl debug line numbers only +-gp generate pointer validations -gs debug symbol info only +-gt generate trace prolog/epilog -GTnnnn set data threshold to nnnn +-H use precompiled headers (ph) -HDdirectory use ph from directory +-HF[filename] generate ph to filename -HIfilename #include "filename" +-HO include files only once -HS only search -I directories +-HX automatic precompiled headers + +-Ipath #include file search path -j[0|1|2] Asian language characters + 0: Japanese 1: Taiwanese and Chinese 2: Korean +-Jm relaxed type checking -Ju char==unsigned char +-Jb no empty base class optimization -J chars are unsigned +-l[listfile] generate list file -L using non-Digital Mars linker +-Llink specify linker to use -L/switch pass /switch to linker +-Masm specify assembler to use -M/switch pass /switch to assembler +-m[tsmclvfnrpxz][do][w][u] set memory model + s: small code and data m: large code, small data + c: small code, large data l: large code and data + v: VCM r: Rational 16 bit DOS Extender + p: Pharlap 32 bit DOS Extender x: DOSX 32 bit DOS Extender + z: ZPM 16 bit DOS Extender f: OS/2 2.0 32 bit + t: .COM file n: Windows 32s/95/98/NT/2000/ME/XP + d: DOS 16 bit o: OS/2 16 bit + w: SS != DS u: reload DS +-Nc function level linking -NL no default library +-Ns place expr strings in code seg -NS new code seg for each function +-NTname set code segment name -NV vtables in far data +-o[-+flag] run optimizer with flag -ooutput output filename +-p turn off autoprototyping -P default to pascal linkage +-Pz default to stdcall linkage -r strict prototyping +-R put switch tables in code seg -s stack overflow checking +-S always generate stack frame -u suppress predefined macros +-v[0|1|2] verbose compile -w suppress all warnings +-wc warn on C style casts +-wn suppress warning number n -wx treat warnings as errors +-W{0123ADabdefmrstuvwx-+} Windows prolog/epilog + -WA Windows EXE + -WD Windows DLL +-x turn off error maximum -XD instantiate templates +-XItemp<type> instantiate template class temp<type> +-XIfunc(type) instantiate template function func(type) +-[0|2|3|4|5|6] 8088/286/386/486/Pentium/P6 code + + +------------------------------- TCC ---------------------------------------------- + +`-v' + Display current TCC version. +`-c' + Generate an object file (`-o' option must also be given). +`-o outfile' + Put object file, executable, or dll into output file `outfile'. +`-Bdir' + Set the path where the tcc internal libraries can be found (default is `PREFIX/lib/tcc'). +`-bench' + Output compilation statistics. +`-run source [args...]' + Compile file source and run it with the command line arguments args. In + order to be able to give more than one argument to a script, several TCC options + can be given after the `-run' option, separated by spaces. Example: + +tcc "-run -L/usr/X11R6/lib -lX11" ex4.c + + In a script, it gives the following header: + +#!/usr/local/bin/tcc -run -L/usr/X11R6/lib -lX11 +#include <stdlib.h> +int main(int argc, char **argv) +{ + ... +} + +Preprocessor options: + +`-Idir' + Specify an additional include path. Include paths are searched in the order they + are specified. System include paths are always searched after. The default + system include paths are: `/usr/local/include', `/usr/include' and + `PREFIX/lib/tcc/include'. (`PREFIX' is usually `/usr' or `/usr/local'). +`-Dsym[=val]' + Define preprocessor symbol `sym' to val. If val is not present, its value is `1'. + Function-like macros can also be defined: `-DF(a)=a+1' +`-Usym' + Undefine preprocessor symbol `sym'. + +Compilation flags: + +Note: each of the following warning options has a negative form beginning with `-fno-'. + +`-funsigned-char' + Let the char type be unsigned. +`-fsigned-char' + Let the char type be signed. +`-fno-common' + Do not generate common symbols for uninitialized data. +`-fleading-underscore' + Add a leading underscore at the beginning of each C symbol. + +Warning options: + +`-w' + Disable all warnings. + +Note: each of the following warning options has a negative form beginning with `-Wno-'. + +`-Wimplicit-function-declaration' + Warn about implicit function declaration. +`-Wunsupported' + Warn about unsupported GCC features that are ignored by TCC. +`-Wwrite-strings' + Make string constants be of type const char * instead of char *. +`-Werror' + Abort compilation if warnings are issued. +`-Wall' + Activate all warnings, except `-Werror', `-Wunusupported' and `-Wwrite-strings'. + +Linker options: + +`-Ldir' + Specify an additional static library path for the `-l' option. The default + library paths are `/usr/local/lib', `/usr/lib' and `/lib'. +`-lxxx' + Link your program with dynamic library libxxx.so or static library libxxx.a. + The library is searched in the paths specified by the `-L' option. +`-shared' + Generate a shared library instead of an executable (`-o' option must also be given). +`-static' + Generate a statically linked executable (default is a shared linked executable) + (`-o' option must also be given). +`-rdynamic' + Export global symbols to the dynamic linker. It is useful when a library opened + with dlopen() needs to access executable symbols. +`-r' + Generate an object file combining all input files (`-o' option must also be given). +`-Wl,-Ttext,address' + Set the start of the .text section to address. +`-Wl,--oformat,fmt' + Use fmt as output format. The supported output formats are: + + elf32-i386 + ELF output format (default) + binary + Binary image (only for executable output) + coff + COFF output format (only for executable output for TMS320C67xx target) + +Debugger options: + +`-g' + Generate run time debug information so that you get clear run time error + messages: test.c:68: in function 'test5()': dereferencing invalid pointer + instead of the laconic Segmentation fault. +`-b' + Generate additional support code to check memory allocations and + array/pointer bounds. `-g' is implied. Note that the generated code is + slower and bigger in this case. +`-bt N' + Display N callers in stack traces. This is useful with `-g' or `-b'. + +Note: GCC options `-Ox', `-fx' and `-mx' are ignored. + + +--------------------------- Visual C -------------------------------------------- + + C/C++ COMPILER OPTIONS + + -OPTIMIZATION- + +/O1 minimize space /Op[-] improve floating-pt consistency +/O2 maximize speed /Os favor code space +/Oa assume no aliasing /Ot favor code speed +/Ob<n> inline expansion (default n=0) /Ow assume cross-function aliasing +/Od disable optimizations (default) /Ox maximum opts. (/Ogityb2 /Gs) +/Og enable global optimization /Oy[-] enable frame pointer omission +/Oi enable intrinsic functions + + -CODE GENERATION- + +/G3 optimize for 80386 /Gh enable _penter function call +/G4 optimize for 80486 /GH enable _pexit function call +/G5 optimize for Pentium /GR[-] enable C++ RTTI +/G6 optimize for PPro, P-II, P-III /GX[-] enable C++ EH (same as /EHsc) +/G7 optimize for Pentium 4 or Athlon /EHs enable C++ EH (no SEH exceptions) +/GB optimize for blended model (default) /EHa enable C++ EH (w/ SEH exceptions) +/Gd __cdecl calling convention /EHc extern "C" defaults to nothrow +/Gr __fastcall calling convention /GT generate fiber-safe TLS accesses +/Gz __stdcall calling convention /Gm[-] enable minimal rebuild +/GA optimize for Windows Application /GL[-] enable link-time code generation +/Gf enable string pooling /QIfdiv[-] enable Pentium FDIV fix +/GF enable read-only string pooling /QI0f[-] enable Pentium 0x0f fix +/Gy separate functions for linker /QIfist[-] use FIST instead of ftol() +/GZ Enable stack checks (/RTCs) /RTC1 Enable fast checks (/RTCsu) +/Ge force stack checking for all funcs /RTCc Convert to smaller type checks +/Gs[num] control stack checking calls /RTCs Stack Frame runtime checking +/GS enable security checks /RTCu Uninitialized local usage checks +/clr[:noAssembly] compile for the common language runtime + noAssembly - do not produce an assembly +/arch:<SSE|SSE2> minimum CPU architecture requirements, one of: + SSE - enable use of instructions available with SSE enabled CPUs + SSE2 - enable use of instructions available with SSE2 enabled CPUs + + -OUTPUT FILES- + +/Fa[file] name assembly listing file /Fo<file> name object file +/FA[sc] configure assembly listing /Fp<file> name precompiled header file +/Fd[file] name .PDB file /Fr[file] name source browser file +/Fe<file> name executable file /FR[file] name extended .SBR file +/Fm[file] name map file + + -PREPROCESSOR- + +/AI<dir> add to assembly search path /Fx merge injected code to file +/FU<file> forced using assembly/module /FI<file> name forced include file +/C don't strip comments /U<name> remove predefined macro +/D<name>{=|#}<text> define macro /u remove all predefined macros +/E preprocess to stdout /I<dir> add to include search path +/EP preprocess to stdout, no #line /X ignore "standard places" +/P preprocess to file + + -LANGUAGE- + +/Zi enable debugging information /Ze enable extensions (default) +/ZI enable Edit and Continue debug info /Zl omit default library name in .OBJ +/Z7 enable old-style debug info /Zg generate function prototypes +/Zd line number debugging info only /Zs syntax check only +/Zp[n] pack structs on n-byte boundary /vd{0|1} disable/enable vtordisp +/Za disable extensions (implies /Op) /vm<x> type of pointers to members +/Zc:arg1[,arg2] C++ language conformance, where arguments can be: + forScope - enforce Standard C++ for scoping rules + wchar_t - wchar_t is the native type, not a typedef + + -MISCELLANEOUS- + +@<file> options response file /wo<n> issue warning n once +/?, /help print this help message /w<l><n> set warning level 1-4 for n +/c compile only, no link /W<n> set warning level (default n=1) +/H<num> max external name length /Wall enable all warnings +/J default char type is unsigned /Wp64 enable 64 bit porting warnings +/nologo suppress copyright message /WX treat warnings as errors +/showIncludes show include file names /WL enable one line diagnostics +/Tc<source file> compile file as .c /Yc[file] create .PCH file +/Tp<source file> compile file as .cpp /Yd put debug info in every .OBJ +/TC compile all files as .c /Yl[sym] inject .PCH ref for debug lib +/TP compile all files as .cpp /Yu[file] use .PCH file +/V<string> set version string /YX[file] automatic .PCH +/w disable all warnings /Y- disable all PCH options +/wd<n> disable warning n /Zm<n> max memory alloc (% of default) +/we<n> treat warning n as an error + + -LINKING- + +/MD link with MSVCRT.LIB /MDd link with MSVCRTD.LIB debug lib +/ML link with LIBC.LIB /MLd link with LIBCD.LIB debug lib +/MT link with LIBCMT.LIB /MTd link with LIBCMTD.LIB debug lib +/LD Create .DLL /F<num> set stack size +/LDd Create .DLL debug library /link [linker options and libraries] + +Microsoft (R) Incremental Linker Version 7.10.3077 +Copyright (C) Microsoft Corporation. All rights reserved. + + usage: LINK [options] [files] [@commandfile] + + options: + + /ALIGN:# + /ALLOWBIND[:NO] + /ASSEMBLYDEBUG[:DISABLE] + /ASSEMBLYLINKRESOURCE:filename + /ASSEMBLYMODULE:filename + /ASSEMBLYRESOURCE:filename + /BASE:{address|@filename,key} + /DEBUG + /DEF:filename + /DEFAULTLIB:library + /DELAY:{NOBIND|UNLOAD} + /DELAYLOAD:dll + /DELAYSIGN[:NO] + /DLL + /DRIVER[:{UPONLY|WDM}] + /ENTRY:symbol + /EXETYPE:DYNAMIC + /EXPORT:symbol + /FIXED[:NO] + /FORCE[:{MULTIPLE|UNRESOLVED}] + /HEAP:reserve[,commit] + /IDLOUT:filename + /IGNOREIDL + /IMPLIB:filename + /INCLUDE:symbol + /INCREMENTAL[:NO] + /KEYFILE:filename + /KEYCONTAINER:name + /LARGEADDRESSAWARE[:NO] + /LIBPATH:dir + /LTCG[:{NOSTATUS|PGINSTRUMENT|PGOPTIMIZE|STATUS}] + (PGINSTRUMENT and PGOPTIMIZE are only available for IA64) + /MACHINE:{AM33|ARM|EBC|IA64|M32R|MIPS|MIPS16|MIPSFPU|MIPSFPU16|MIPSR41XX| + SH3|SH3DSP|SH4|SH5|THUMB|X86} + /MAP[:filename] + /MAPINFO:{EXPORTS|LINES} + /MERGE:from=to + /MIDL:@commandfile + /NOASSEMBLY + /NODEFAULTLIB[:library] + /NOENTRY + /NOLOGO + /OPT:{ICF[=iterations]|NOICF|NOREF|NOWIN98|REF|WIN98} + /ORDER:@filename + /OUT:filename + /PDB:filename + /PDBSTRIPPED:filename + /PGD:filename + /RELEASE + /SAFESEH[:NO] + /SECTION:name,[E][R][W][S][D][K][L][P][X][,ALIGN=#] + /STACK:reserve[,commit] + /STUB:filename + /SUBSYSTEM:{CONSOLE|EFI_APPLICATION|EFI_BOOT_SERVICE_DRIVER| + EFI_ROM|EFI_RUNTIME_DRIVER|NATIVE|POSIX|WINDOWS| + WINDOWSCE}[,#[.##]] + /SWAPRUN:{CD|NET} + /TLBOUT:filename + /TSAWARE[:NO] + /TLBID:# + /VERBOSE[:{LIB|SAFESEH}] + /VERSION:#[.#] + /VXD + /WINDOWSCE:{CONVERT|EMULATION} + /WS:AGGRESSIVE + +Microsoft (R) Library Manager Version 7.10.3077 +Copyright (C) Microsoft Corporation. All rights reserved. + +usage: LIB [options] [files] + + options: + + /DEF[:filename] + /EXPORT:symbol + /EXTRACT:membername + /INCLUDE:symbol + /LIBPATH:dir + /LIST[:filename] + /MACHINE:{AM33|ARM|EBC|IA64|M32R|MIPS|MIPS16|MIPSFPU|MIPSFPU16|MIPSR41XX| + SH3|SH3DSP|SH4|SH5|THUMB|X86} + /NAME:filename + /NODEFAULTLIB[:library] + /NOLOGO + /OUT:filename + /REMOVE:membername + /SUBSYSTEM:{CONSOLE|EFI_APPLICATION|EFI_BOOT_SERVICE_DRIVER| + EFI_ROM|EFI_RUNTIME_DRIVER|NATIVE|POSIX|WINDOWS| + WINDOWSCE}[,#[.##]] + /VERBOSE + + +Pelles Compiler Driver, Version 4.50.0 +Copyright (c) Pelle Orinius 2002-2006 + +Syntax: +CC [options] + [@commandfile] + { [compiler options] filename1.C [filename2.C ...] | + [assembler options] filename1.ASM [filename2.ASM ...] } + [filename1.RC [filename2.RC ...]] + [linker options] + +Options: +/a Send assembly files to the C compiler (compatibility) +/c Compile only, no link +/Fe<execfile> Name the executable file +/Fo<outfile> Name the output file + +Compiler options: see POCC +Assembler options: see POASM +Linker options: see POLINK + +Pelles ISO C Compiler, Version 4.50.15 +Copyright (c) Pelle Orinius 1999-2006 + +Syntax: +POCC [options] srcfile{.C|.ASM} + +Options: +/D<name>[=<text>] Define a preprocessor symbol +/E Preprocess only (to stdout) +/Fo<outfile> Name the output file +/Gd Use __cdecl as default calling convention (default) +/Gh Enable hook function call +/Gm Don't decorate __stdcall or __fastcall symbols (if /Ze) +/Gn Don't decorate exported __stdcall symbols (if /Ze) +/Go Define compatibility names and use OLDNAMES.LIB +/Gr Use __fastcall as default calling convention (if /Ze) +/Gz Use __stdcall as default calling convention (if /Ze) +/I<path> Add a search path for #include files +/J Default char type is unsigned +/MD Enable dynamic C runtime library (POCRT.DLL) +/MT Enable multi-threading support (CRTMT.LIB) +/O1 Same as /Os +/O2 Same as /Ot +/Op[-] Improve floating-point consistency +/Os Optimize, favor code space +/Ot Optimize, favor code speed +/Ox Perform maximum optimizations +/T<target> Select output target (/T? displays a list) +/U<name> Undefine a preprocessor symbol +/V<n> Set verbosity level 0, 1 or 2 (default n = 0) +/W<n> Set warning level 0, 1 or 2 (default n = 1) +/X Don't search standard places for #include files +/Zd Enable line number debugging information +/Ze Enable Microsoft extensions +/Zg Write function prototypes to stdout +/Zi Enable full debugging information +/Zl Omit default library name in object file +/Zs Syntax check only +/Zx Enable Pelles C extensions + +Pelles Macro Assembler, Version 1.00.34 +Copyright (c) Pelle Orinius 2005-2006 + +Syntax: +POASM [options] srcfile[.ASM] + +Options: +/A<name> Select architecture: IA32 (default), AMD64 or ARM +/D<name>[=<value>] Define a symbol (with optional value) +/Fo<outfile> Name the output file (default: srcfile.OBJ) +/Gd Use cdecl calling convention (default) +/Gr Use fastcall calling convention +/Gz Use stdcall calling convention +/I<path> Add a search path for include files +/V<n> Set verbosity level 0, 1 or 2 (default: n = 0) +/X Don't search standard places for include files +/Zd Enable line number debugging information +/Zg Write function prototypes to stdout +/Zi Enable full debugging information + +Pelles Linker, Version 4.50.2 +Copyright (c) Pelle Orinius 1998-2006 + +Syntax: +POLINK [options] [files] [@commandfile] + +Options: +/ALIGN:# +/ALLOWBIND[:NO] +/BASE:address +/DEBUG[:NO] +/DEBUGTYPE:{CV|COFF|BOTH} +/DEF:filename +/DEFAULTLIB:library +/DELAY:{NOBIND|UNLOAD} +/DELAYLOAD:dll +/DLL +/DRIVER[:{UPONLY|WDM}] +/ENTRY:symbol +/EXPORT:symbol[=symbol][,@ordinal][,DATA] +/FIXED[:NO] +/FORCE:MULTIPLE +/HEAP:reserve[,commit] +/IMPLIB:filename +/INCLUDE:symbol +/LARGEADDRESSAWARE[:NO] +/LIBPATH:path +/MACHINE:{ARM|IX86|X86} +/MAP[:filename] +/MAPINFO:{EXPORTS|FIXUPS|LINES} +/MERGE:from=to +/NODEFAULTLIB +/NOENTRY +/OLDIMPLIB +/OPT:{REF|NOREF|WIN98|NOWIN98} +/OSVERSION:#[.##] +/OUT:filename +/RELEASE +/SECTION:name,[E][R][W][S][D][K][P] +/STACK:reserve[,commit] +/STUB:filename +/SUBSYSTEM:{NATIVE|WINDOWS|CONSOLE|WINDOWSCE}[,#[.##]] +/SWAPRUN:{NET|CD} +/TSAWARE[:NO] +/VERBOSE +/VERSION:#[.##] +/WS:AGGRESSIVE diff --git a/data/changes.txt b/data/changes.txt new file mode 100755 index 000000000..a449b7a62 --- /dev/null +++ b/data/changes.txt @@ -0,0 +1,22 @@ +0.1.0 +* new config system +* new build system +* source renderer +* pas2nim integrated +* support for C++ +* local variables are always initialized +* Rod file reader and writer +* new --out, -o command line options +* fixed bug in nimconf.pas: we now have several + string token types +* changed nkIdentDef to nkIdentDefs +* added type(expr) in the parser and the grammer +* added template +* added command calls +* added case in records/objects +* added --skip_proj_cfg switch for nim.dpr +* added missing features to pasparse +* rewrote the source generator +* ``addr`` and ``cast`` are now keywords; grammar updated +* implemented ` notation; grammar updated +* specification replaced by a manual diff --git a/data/keywords.txt b/data/keywords.txt new file mode 100755 index 000000000..4e5a1c8e6 --- /dev/null +++ b/data/keywords.txt @@ -0,0 +1,19 @@ +addr and as asm +block break +case cast const continue converter +discard div +elif else end enum except exception +finally for from generic +if implies import in include is isnot iterator +lambda +macro method mod +nil not notin +object of or out +proc ptr +raise record ref return +shl shr +template try type +var +when where while with without +xor +yield diff --git a/data/magic.yml b/data/magic.yml new file mode 100755 index 000000000..a126b8075 --- /dev/null +++ b/data/magic.yml @@ -0,0 +1,176 @@ +# All the magics of the system module: +# order has been changed! +[ +'None', +'Defined', +'New', +'NewFinalize', +'Low', +'High', +'SizeOf', +'RegisterFinalizer', +'Succ', +'Pred', +'Inc', +'Dec', +'LengthOpenArray', +'LengthStr', +'LengthArray', +'LengthSeq', +'Incl', +'Excl', +'Card', +'Ord', +'Chr', + +# binary arithmetic with and without overflow checking: +'AddI', +'SubI', +'MulI', +'DivI', +'ModI', +'AddI64', +'SubI64', +'MulI64', +'DivI64', +'ModI64', + +# other binary arithmetic operators: +'ShrI', +'ShlI', +'BitandI', +'BitorI', +'BitxorI', +'MinI', +'MaxI', +'ShrI64', +'ShlI64', +'BitandI64', +'BitorI64', +'BitxorI64', +'MinI64', +'MaxI64', +'AddF64', +'SubF64', +'MulF64', +'DivF64', +'MinF64', +'MaxF64', +'AddU', +'SubU', +'MulU', +'DivU', +'ModU', +'AddU64', +'SubU64', +'MulU64', +'DivU64', +'ModU64', + +# comparison operators: +'EqI', +'LeI', +'LtI', +'EqI64', +'LeI64', +'LtI64', +'EqF64', +'LeF64', +'LtF64', +'LeU', +'LtU', +'LeU64', +'LtU64', +'EqEnum', +'LeEnum', +'LtEnum', +'EqCh', +'LeCh', +'LtCh', +'EqB', +'LeB', +'LtB', +'EqRef', +'EqProc', +'EqUntracedRef', +'LePtr', +'LtPtr', +'EqCString', +'Xor', + +# unary arithmetic with and without overflow checking: +'UnaryMinusI', +'UnaryMinusI64', +'AbsI', +'AbsI64', + +# other unary operations: +'Not', +'UnaryPlusI', +'BitnotI', +'UnaryPlusI64', +'BitnotI64', +'UnaryPlusF64', +'UnaryMinusF64', +'AbsF64', +'Ze', +'Ze64', +'ToU8', +'ToU16', +'ToU32', +'ToFloat', +'ToBiggestFloat', +'ToInt', +'ToBiggestInt', + +# special ones: +'And', +'Or', +'EqStr', +'LeStr', +'LtStr', +'EqSet', +'LeSet', +'LtSet', +'MulSet', +'PlusSet', +'MinusSet', +'SymDiffSet', +'ConStrStr', +'ConArrArr', +'ConArrT', +'ConTArr', +'ConTT', +'Slice', +'AppendStrCh', +'AppendStrStr', +'AppendSeqElem', +'AppendSeqSeq', +'InRange', +'InSet', +'Is', +'Asgn', +'Repr', +'Exit', +'SetLengthStr', +'SetLengthSeq', +'Assert', +'Swap', + +# magic type constructors: +'Array', +'OpenArray', +'Range', +'Tuple', +'Set', +'Seq', + +# magic constants: +'CompileDate', +'CompileTime', +'NimrodVersion', +'NimrodMajor', +'NimrodMinor', +'NimrodPatch', +'CpuEndian' +] diff --git a/data/messages.yml b/data/messages.yml new file mode 100755 index 000000000..e45c41754 --- /dev/null +++ b/data/messages.yml @@ -0,0 +1,282 @@ +# This file contains all the messages of the Nimrod compiler +# (c) 2008 Andreas Rumpf + +[ +# fatal errors: +{'errUnknown': 'unknown error'}, +{'errIllFormedAstX': 'illformed AST: $1'}, +{'errCannotOpenFile': "cannot open '$1'"}, +{'errInternal': 'internal error: $1'}, + +# other errors: +{'errGenerated': '$1'}, +{'errXCompilerDoesNotSupportCpp': "'$1' compiler does not support C++"}, + +# errors: +{'errStringLiteralExpected': 'string literal expected'}, +{'errIntLiteralExpected': 'integer literal expected'}, +{'errInvalidCharacterConstant': 'invalid character constant'}, +{'errClosingTripleQuoteExpected': + 'closing """ expected, but end of file reached'}, +{'errClosingQuoteExpected': 'closing " expected'}, +{'errTabulatorsAreNotAllowed': 'tabulators are not allowed'}, +{'errInvalidToken': 'invalid token: $1'}, +{'errLineTooLong': 'line too long'}, +{'errInvalidNumber': '$1 is not a valid number'}, +{'errNumberOutOfRange': '$1 is too large or too small'}, +{'errNnotAllowedInCharacter': '\\n not allowed in character literal'}, +{'errClosingBracketExpected': "closing ']' expected, but end of file reached"}, +{'errMissingFinalQuote': "missing final '"}, +{'errIdentifierExpected': "identifier expected, but found '$1'"}, +{'errOperatorExpected': "operator expected, but found '$1'"}, +{'errTokenExpected': "'$1' expected"}, +{'errStringAfterIncludeExpected': "string after 'include' expected"}, +{'errRecursiveInclude': "recursive include file: '$1'"}, +{'errAtIfExpected': "'@if' expected"}, +{'errAtIfExpectedBeforeElse': "'@if' expected before '@else'"}, +{'errAtIfExpectedBeforeElif': "'@if' expected before '@elif'"}, +{'errAtEndExpected': "'@end' expected"}, +{'errOnOrOffExpected': "'on' or 'off' expected"}, +{'errNoneSpeedOrSizeExpected': "'none', 'speed' or 'size' expected"}, +{'errInvalidPragma': 'invalid pragma'}, +{'errUnknownPragma': "unknown pragma: '$1'"}, +{'errPragmaXHereNotAllowed': "pragma '$1' here not allowed"}, +{'errUnknownDirective': "unknown directive: '$1'"}, +{'errInvalidDirective': 'invalid directive'}, +{'errAtPopWithoutPush': "'pop' without a 'push' pragma"}, +{'errEmptyAsm': 'empty asm statement makes no sense'}, +{'errAsgnInvalidInExpr': "'=' invalid in an expression; probably '==' meant"}, +{'errInvalidIndentation': 'invalid indentation'}, +{'errExceptionExpected': 'exception expected'}, +{'errExceptionAlreadyHandled': 'exception already handled'}, +{'errReturnNotAllowedHere': "'return' only allowed in routine"}, +{'errYieldNotAllowedHere': "'yield' only allowed in iterator"}, +{'errInvalidNumberOfYieldExpr': "invalid number of 'yield' expresions"}, +{'errReturnInvalidInIterator': "'return' not allowed in iterator"}, +{'errCannotReturnExpr': 'current routine cannot return an expression'}, +{'errAttemptToRedefine': "attempt to redefine '$1'"}, +{'errStmtInvalidAfterReturn': + "statement not allowed after 'return', 'break' or 'raise'"}, +{'errStmtExpected': 'statement expected'}, +{'errYieldOnlyInInterators': "'yield' statement is only allowed in iterators"}, +{'errInvalidLabel': "'$1' is no label"}, +{'errInvalidCmdLineOption': "invalid command line option: '$1'"}, +{'errCmdLineArgExpected': "argument for command line option expected: '$1'"}, +{'errInvalidVarSubstitution': "invalid variable substitution in '$1'"}, +{'errUnknownVar': "unknown variable: '$1'"}, +{'errUnknownCcompiler': "unknown C compiler: '$1'"}, +{'errOnOrOffExpectedButXFound': "'on' or 'off' expected, but '$1' found"}, +{'errNoneBoehmRefcExpectedButXFound': + "'none', 'boehm' or 'refc' expected, but '$1' found"}, +{'errNoneSpeedOrSizeExpectedButXFound': + "'none', 'speed' or 'size' expected, but '$1' found"}, +{'errGuiConsoleOrLibExpectedButXFound': + "'gui', 'console' or 'lib' expected, but '$1' found"}, +{'errUnknownOS': "unknown OS: '$1'"}, +{'errUnknownCPU': "unknown CPU: '$1'"}, +{'errGenOutExpectedButXFound': + "'c', 'c++' or 'yaml' expected, but '$1' found"}, +{'errArgsNeedRunOption': + "arguments can only be given if the '--run' option is selected"}, +{'errInvalidMultipleAsgn': 'multiple assignment is not allowed'}, +{'errColonOrEqualsExpected': "':' or '=' expected, but found '$1'"}, +{'errExprExpected': "expression expected, but found '$1'"}, +{'errUndeclaredIdentifier': "undeclared identifier: '$1'"}, +{'errUseQualifier': "ambigious identifier: '$1' -- use a qualifier"}, +{'errTwiceForwarded': "'$1' is forwarded twice"}, +{'errTypeExpected': 'type expected'}, +{'errSystemNeeds': "system module needs '$1'"}, +{'errExecutionOfProgramFailed': 'execution of an external program failed'}, +{'errNotOverloadable': "overloaded '$1' leads to ambigious calls"}, +{'errInvalidArgForX': "invalid argument for '$1'"}, +{'errStmtHasNoEffect': 'statement has no effect'}, +{'errXExpectsTypeOrValue': "'$1' expects a type or value"}, +{'errXExpectsArrayType': "'$1' expects an array type"}, +{'errIteratorCannotBeInstantiated': + "'$1' cannot be instantiated because its body has not been compiled yet"}, +{'errExprWithNoTypeCannotBeConverted': + 'expression with no type cannot be converted'}, +{'errExprWithNoTypeCannotBeCasted': 'expression with no type cannot be casted'}, +{'errConstantDivisionByZero': 'constant division by zero'}, +{'errOrdinalTypeExpected': 'ordinal type expected'}, +{'errOrdinalOrFloatTypeExpected': 'ordinal or float type expected'}, +{'errOverOrUnderflow': 'over- or underflow'}, +{'errCannotEvalXBecauseIncompletelyDefined': + "cannot evalutate '$1' because type is not defined completely"}, +{'errChrExpectsRange0_255': "'chr' expects an int in the range 0..255"}, +{'errStaticAssertFailed': "'staticAssert' failed: condition is false"}, +{'errStaticAssertCannotBeEval': + "argument to 'staticAssert' cannot be evaluated at compile time"}, +{'errDotRequiresRecordOrObjectType': "'.' requires a record or object type"}, +{'errUndeclaredFieldX': "undeclared field: '$1'"}, +{'errIndexNoIntType': 'index has to be an integer type'}, +{'errIndexOutOfBounds': 'index out of bounds'}, +{'errIndexTypesDoNotMatch': 'index types do not match'}, +{'errBracketsInvalidForType': "'[]' operator invalid for this type"}, +{'errValueOutOfSetBounds': 'value out of set bounds'}, +{'errFieldInitTwice': "field initialized twice: '$1'"}, +{'errFieldNotInit': "field '$1' not initialized"}, +{'errExprCannotBeCalled': 'expression cannot be called'}, +{'errExprHasNoType': 'expression has no type'}, +{'errExprXHasNoType': "expression '$1' has no type"}, +{'errCastNotInSafeMode': "'cast' not allowed in safe mode"}, +{'errExprCannotBeCastedToX': 'expression cannot be casted to $1'}, +{'errUndefinedPrefixOpr': 'undefined prefix operator: $1'}, +{'errCommaOrParRiExpected': "',' or ')' expected"}, +{'errCurlyLeOrParLeExpected': "'{' or '(' expected"}, +{'errSectionExpected': "section ('type', 'proc', etc.) expected"}, +{'errImplemenationExpected': "'implementation' or end of file expected"}, +{'errRangeExpected': 'range expected'}, +{'errInvalidTypeDescription': 'invalid type description'}, +{'errAttemptToRedefineX': "attempt to redefine '$1'"}, +{'errMagicOnlyInSystem': "'magic' only allowed in system module"}, +{'errUnknownOperatorX': "unkown operator: '$1'"}, +{'errPowerOfTwoExpected': 'power of two expected'}, +{'errStringMayNotBeEmpty': 'string literal may not be empty'}, +{'errCallConvExpected': 'calling convention expected'}, +{'errProcOnlyOneCallConv': 'a proc can only have one calling convention'}, +{'errSymbolMustBeImported': "symbol must be imported if 'lib' pragma is used"}, +{'errExprMustBeBool': "expression must be of type 'bool'"}, +{'errConstExprExpected': 'constant expression expected'}, +{'errDuplicateCaseLabel': 'duplicate case label'}, +{'errRangeIsEmpty': 'range is empty'}, +{'errSelectorMustBeOfCertainTypes': + 'selector must be of an ordinal type, real or string'}, +{'errSelectorMustBeOrdinal': + 'selector must be of an ordinal type'}, +{'errOrdXMustNotBeNegative': 'ord($1) must not be negative'}, +{'errLenXinvalid': 'len($1) must be less than 32768'}, +{'errWrongNumberOfLoopVariables': 'wrong number of loop variables'}, +{'errExprCannotBeRaised': 'only objects can be raised'}, +{'errBreakOnlyInLoop': "'break' only allowed in loop construct"}, +{'errTypeXhasUnknownSize': "type '$1' has unknown size"}, +{'errConstNeedsConstExpr': + 'a constant can only be initialized with a constant expression'}, +{'errConstNeedsValue': 'a constant needs a value'}, +{'errResultCannotBeOpenArray': 'the result type cannot be on open array'}, +{'errSizeTooBig': "computing the type's size produced an overflow"}, +{'errSetTooBig': 'set is too large'}, +{'errBaseTypeMustBeOrdinal': 'base type of a set must be an ordinal'}, +{'errInheritanceOnlyWithObjects': 'inheritance only works with an object'}, +{'errInheritanceOnlyWithEnums': 'inheritance only works with an enum'}, +{'errIllegalRecursionInTypeX': "illegal recursion in type '$1'"}, +{'errCannotInstantiateX': "cannot instantiate: '$1'"}, +{'errExprHasNoAddress': 'expression has no address'}, +{'errVarForOutParamNeeded': + 'to an out parameter a variable needs to be passed'}, +{'errPureTypeMismatch': 'type mismatch'}, +{'errTypeMismatch': 'type mismatch: got ('}, +{'errButExpected': 'but expected one of: '}, +{'errButExpectedX': "but expected '$1'"}, +{'errAmbigiousCallXYZ': 'ambigious call; both $1 and $2 match for: $3'}, +{'errWrongNumberOfTypeParams': 'wrong number of type parameters'}, +{'errOutParamNoDefaultValue': 'out parameters cannot have default values'}, +{'errInlineProcHasNoAddress': 'an inline proc has no address'}, +{'errXCannotBeInParamDecl': '$1 cannot be declared in parameter declaration'}, +{'errPragmaOnlyInHeaderOfProc': + 'pragmas are only in the header of a proc allowed'}, +{'errImportedProcCannotHaveImpl': + 'an imported proc cannot have an implementation'}, +{'errImplOfXNotAllowed': "implementation of '$1' is not allowed here"}, +{'errImplOfXexpected': "implementation of '$1' expected"}, +{'errDiscardValue': 'value returned by statement has to be discarded'}, +{'errInvalidDiscard': 'statement returns no value that can be discarded'}, +{'errUnknownPrecedence': + "unknown precedence for operator; use 'infix: prec' pragma"}, +{'errIllegalConvFromXtoY': 'conversion from $1 to $2 is invalid'}, +{'errTypeMismatchExpectedXGotY': "type mismatch: expected '$1', but got '$2'"}, +{'errCannotBindXTwice': "cannot bind parameter '$1' twice"}, +{'errInvalidOrderInEnumX': "invalid order in enum '$1'"}, +{'errEnumXHasWholes': "enum '$1' has wholes"}, +{'errExceptExpected': "'except' or 'finally' expected"}, +{'errInvalidTry': "after catch all 'except' or 'finally' no section may follow"}, +{'errEofExpectedButXFound': "end of file expected, but found token '$1'"}, +{'errOptionExpected': "option expected, but found '$1'"}, +{'errCannotEvaluateForwardConst': 'cannot evaluate forwarded constant'}, +{'errXisNoLabel': "'$1' is not a label"}, +{'errXNeedsConcreteType': "'$1' needs to be of a non-generic type"}, +{'errNotAllCasesCovered': 'not all cases are covered'}, +{'errStringRange': 'string range in case statement not allowed'}, +{'errUnkownSubstitionVar': "unknown substitution variable: '$1'"}, +{'errComplexStmtRequiresInd': 'complex statement requires indentation'}, +{'errXisNotCallable': "'$1' is not callable"}, +{'errNoPragmasAllowedForX': 'no pragmas allowed for $1'}, +{'errNoGenericParamsAllowedForX': 'no generic parameters allowed for $1'}, +{'errInvalidParamKindX': "invalid param kind: '$1'"}, +{'errDefaultArgumentInvalid': 'default argument invalid'}, +{'errNamedParamHasToBeIdent': 'named parameter has to be an identifier'}, +{'errNoReturnTypeForX': 'no return type for $1 allowed'}, +{'errConvNeedsOneArg': 'a type conversion needs exactly one argument'}, +{'errInvalidPragmaX': 'invalid pragma: $1'}, +{'errXNotAllowedHere': '$1 here not allowed'}, +{'errInvalidControlFlowX': 'invalid control flow: $1'}, +{'errATypeHasNoValue': 'a type has no value'}, +{'errXisNoType': "'$1' is no type"}, +{'errCircumNeedsPointer': "'^' needs a pointer or reference type"}, +{'errInvalidContextForBuiltinX': "invalid context for builtin '$1'"}, +{'errInvalidExpression': 'invalid expression'}, +{'errInvalidExpressionX': "invalid expression: '$1'"}, +{'errEnumHasNoValueX': "enum has no value '$1'"}, +{'errNamedExprExpected': 'named expression expected'}, +{'errNamedExprNotAllowed': 'named expression here not allowed'}, +{'errXExpectsOneTypeParam': "'$1' expects one type parameter"}, +{'errArrayExpectsTwoTypeParams': 'array expects two type parameters'}, +{'errInvalidVisibilityX': "invalid invisibility: '$1'"}, +{'errInitHereNotAllowed': 'initialization here not allowed'}, +{'errXCannotBeAssignedTo': "'$1' cannot be assigned to"}, +{'errIteratorNotAllowed': + "iterators can only be defined at the module's top level"}, +{'errIteratorNeedsImplementation': 'iterator needs an implementation'}, +{'errIteratorNeedsReturnType': 'iterator needs a return type'}, +{'errInvalidCommandX': "invalid command: '$1'"}, +{'errXOnlyAtModuleScope': "'$1' is only allowed at top level"}, +{'errTypeXNeedsImplementation': "type '$1' needs an implementation"}, +{'errTemplateInstantiationTooNested': 'template instantiation too nested'}, +{'errInstantiationFrom': 'instantiation from here'}, +{'errInvalidIndexValueForTuple': 'invalid index value for tuple subscript'}, +{'errCommandExpectsFilename': 'command expects a filename argument'}, +{'errXExpected': "'$1' expected"}, +{'errInvalidSectionStart': 'invalid section start'}, +{'errGridTableNotImplemented': 'grid table is not implemented'}, +{'errGeneralParseError': 'general parse error'}, +{'errNewSectionExpected': 'new section expected'}, +{'errWhitespaceExpected': "whitespace expected, got '$1'"}, +{'errXisNoValidIndexFile': "'$1' is no valid index file"}, +{'errCannotRenderX': "cannot render reStructuredText element '$1'"}, + +# user error message: +{'errUser': '$1'}, + +# warnings: +{'warnCannotOpenFile': "cannot open '$1'"}, +{'warnOctalEscape': + 'octal escape sequences do not exist; leading zero is ignored'}, +{'warnXIsNeverRead': "'$1' is never read"}, +{'warnXmightNotBeenInit': "'$1' might not have been initialized"}, +{'warnCannotWriteMO2': "cannot write file '$1'"}, +{'warnCannotReadMO2': "cannot read file '$1'"}, +{'warnDeprecated': "'$1' is deprecated"}, +{'warnSmallLshouldNotBeUsed': + "'l' should not be used as an identifier; may look like '1' (one)"}, +{'warnUnknownMagic': "unknown magic '$1' might crash the compiler"}, +{'warnRedefinitionOfLabel': "redefinition of label '$1'"}, +{'warnUnknownSubstitutionX': "unknown substitution '$1'"}, +{'warnLanguageXNotSupported': "language '$1' not supported"}, +{'warnCommentXIgnored': "comment '$1' ignored"}, +# user warning message: +{'warnUser': '$1'}, + +# hints: +{'hintSuccess': 'operation successful'}, +{'hintLineTooLong': 'line too long'}, +{'hintXDeclaredButNotUsed': "'$1' is declared but not used"}, +{'hintConvToBaseNotNeeded': 'conversion to base object is not needed'}, +{'hintConvFromXtoItselfNotNeeded': 'conversion from $1 to itself is pointless'}, +{'hintExprAlwaysX': "expression evaluates always to '$1'"}, +{'hintMo2FileInvalid': "mo2 file '$1' is invalid"}, +{'hintModuleHasChanged': "module '$1' has been changed"}, +{'hintCannotOpenMo2File': "mo2 file '$1' does not exist"}, + +# user hint message: +{'hintUser': '$1'} +] diff --git a/data/pas_keyw.yml b/data/pas_keyw.yml new file mode 100755 index 000000000..7f2d26960 --- /dev/null +++ b/data/pas_keyw.yml @@ -0,0 +1,26 @@ +# Object Pascal keywords for the Pascal scanner that is part of the +# Nimrod distribution +# (c) Andreas Rumpf 2007 +[ + "and", "array", "as", "asm", + "begin", + "case", "class", "const", "constructor", + "destructor", "div", "do", "downto", + "else", "end", "except", "exports", + "finalization", "finally", "for", "function", + "goto", + "if", "implementation", "in", "inherited", "initialization", "inline", + "interface", "is", + "label", "library", + "mod", + "nil", "not", + "object", "of", "or", "out", + "packed", "procedure", "program", "property", + "raise", "record", "repeat", "resourcestring", + "set", "shl", "shr", + "then", "threadvar", "to", "try", "type", + "unit", "until", "uses", + "var", + "while", "with", + "xor" +] diff --git a/data/readme.txt b/data/readme.txt new file mode 100755 index 000000000..9cea8806a --- /dev/null +++ b/data/readme.txt @@ -0,0 +1,5 @@ +This directory contains data files in a format called YAML_. These files +are required for building Nimrod. + + +.. _YAML: http://www.yaml.org/ |