1. Vincenzo Ampolo
  2. gdc

Commits

trass3r  committed 7f3024e

  • Participants
  • Parent commits 28dfc2d
  • Branches default

Comments (0)

Files changed (1)

File UserDocumentation.wiki

View file
 |-fdeprecated|Allow use of deprecated features.|
 |-fassert|Generate runtime code for assert()'s|
 |-frelease|Compile release version|
-|-fno-bounds-check|Disable array bounds checking|
+|-f[no-]bounds-check|Controls array bounds checking|
 |-funittest|Compile in unittest code|
 |-fversion=<level/ident>|Compile in version code >= <level> or identified by <ident>|
 |-fdebug,-fdebug=<level>,-fdebug=<ident>|Compile in debug code, code <= level, or code identified by ident|
 |-fdeps=<filename>|Write module dependencies to filename|
 |-fd-verbose|Print information about D language processing to stdout|
 |-fd-version=1|Compile as D language version 1|
-|-femit-templates=[normal/private/all/none/auto]|Control template emission|
-|-femit-templates|Emit templates code and data even if the linker cannot merge multiple copies|
+|-femit-templates=normal/private/all/none/auto\\ -f[no-]emit-templates|Controls whether or not template code is emitted.\\ \\ "normal" -- Emit templates, expecting multiple copies to be merged by the linker.\\ "private" -- Emit templates, but make them private to the translation unit. The executable will have multiple copies of code and data.\\ "all" -- Emit all template instances with public visibility. Do this even if they would not normally be emitted.\\ "none" -- Do not emit templates at all.\\ "auto" -- For targets that support templates, the "full" mode is used.  Otherwise, the "private" mode is used.\\\\ "none" and -fno-emit-templates are synonyms.\\ "auto" and -femit-templates are synonyms.|
+|-fall-sources|For each source file on the command line, semantically process each file preceding it. Use this if compilation errors occur due to complicated circular module references. This will slow compilation noticeably|
 |-nostdinc|Do not search standard system include directories|
 |-fonly=|Process all modules specified on the command line, but only generate code for the module specified by the argument.|
 |-fod=<directory>|Specify the object output directory. Note: this is actually a driver option; the backend ignores it.|
 |-fdoc-inc=<filename>|Include a Ddoc macro file|
 |-fmultilib-dir=<dir>|Select header multilib subdirectory|
 |-Wsign-compare|Warn about signed-unsigned comparisons|
-|-fdump-source|Dump decoded UTF-8 text and source from HTML|
+|-fdump-source|Dump decoded UTF-8 text and source from HTML to <source>.utf-8 and <source>.d.utf-8|
 |-fbuiltin|Recognize built-in functions|
 |-funsigned-char|Make "char" unsigned by default (silently ignored in D)|
 |-fsigned-char|Make "char" signed by default (silently ignored in D)|
 
 ----
 
+== Extensions ==
+=== Extended Assembler ===
+GDC implements a GCC extension that allows inline assembler with D expression operands.  It is available on nearly all targets, not just i386.  The syntax differs from the C language extension in the follow ways. 
+Statements start with 'asm { ...', just like the regular DMD inline assembler.
+It is not necesary to put parentheses around operands.
+Instruction templates can be compile-time string constants, not just string literals.  If the template is not a string literal, use parenthesis to indicate that it is not an opcode.
+
+Unlike i386 inline assembler statements, extended assembler statements do not prevent a function from being inlined.
+
+See the GCC manual for more information about this extension.
+
+Example:
+{{{
+uint invert(uint v)
+{
+    uint result;
+    version(X86)
+       asm{ "notl %[iov]" : [iov] "=r" result : "0" v; }
+    else version(PPC)
+       asm{ "nor %[oresult],%[iv],%[iv]" : [oresult] "=r" result : [iv] "r" v; }
+    return result;
+}
+}}}
+
 == Known Issues ==
 
 See our [[http://bitbucket.org/goshawk/gdc/issues?status=new&status=open|issue tracker]] to see
 
 * See the [[http://svn.kuehne.cn/dstress/www/dstress.html|DStress page]] for known failing cases.
 (Again, may be irrelevant)
-* Debugging information may have a few problems. To enable D name mangling in gdb, apply [[http://dsource.org/projects/gdb-patches/|this patch]].
+* Debugging information may have a few problems. For D symbol name demangling you need at least gdb 7.2.
 * Some targets do not support once-only linking. A workaround is to manually control template emission. 
 See the -femit-templates option below. For Darwin, Apple's GCC 3.x compiler supports one-only linking, 
 but GDC does not build with those sources. There are no problems with the stock GCC 4.x on Darwin.