D Front End for GCC - Release 0.10

Last update: January 9, 2005
Supported Systems

    * GCC 3.3.x, 3.4.x
    * Linux (tested on Red Hat 7.2, 8)
    * Mac OS X 10.3.x
    * FreeBSD 5.2.1
    * Cygwin

Similar versions should work and other Unix platforms may work.  Although
the compiler will probably work on most 32-bit architectures, the D runtime
library will still need to be updated to support them.

Downloads

    * Main package (Release 0.10)
      http://home.earthlink.net/~dvdfrdmn/d/gdc-0.10.tgz
      http://home.earthlink.net/~dvdfrdmn/d/gdc-0.10.tar.bz2
    * Build Instructions
      http://home.earthlink.net/~dvdfrdmn/d/INSTALL.html
      (or see INSTALL included in the main package)

Links

    * This Project -- http://home.earthlink.net/~dvdfrdmn/d
    * The D Programming Language -- http://www.digitalmars.com/d/
    * D Links Page -- http://digitalmars.com/d/dlinks.html
    * The D.gnu newsgroup -- news://news.digitalmars.com/D.gnu
    * For general D discussion, the digitalmars.D and
      digitalmars.D.bugs newsgroups
    * The GNU Compiler Collection -- http://gcc.gnu.org/

Contact
David Friedman
e-mail: d3rdclsmail <at> earthlink.net

Status
What's Working

    * Most features of Digital Mars D version 0.110

What's not Working

    * Inline assembler

Gray Area / Known Issues
    * See the DStress (http://svn.kuehne.cn/dstress/www/dstress.html)
      page for known failing cases.
    * Debugging information may have a few problems.  In any case, GDB does
      not support D name mangling.
    * Templates on Mac OS X.  The stock compiler doesn't support one-only
      linkage.  Apple's version does support it, but this release will not
      work with that.  The current solution is to make template
      instantiations private to each module that uses them.  This should
      work as long as the template does not have non-constant static data.
      If you need more control over how emplates are emitted, use the
      -femit-templates flag (see below).  Note that you don't have to worry
      about the stdarg templates as they are handled magically.
    * Complex floating point operations may not work the same as DMD.
    * The 80-bit real type is not supported on Mac OS X and is replaced by
      the 64-bit double type.
    * Some math functions behave differently due to the 80-bit real issue
      and not being able to access x86 floating-point hardware.  Some
      std.math unit tests will fail because of this.
    * In order to prevent nested synchronized statements from deadlocking,
      pthread recursive mutexes are used.  This can cause starvation
      problems on Linux.  I will try the "error-checking" type mutex.
    * Volatile statements probably don't do the right thing.
    * Delegates that refer to nested functions are not valid after the
      parent function returns.

Known Differences from DMD

    * Private functions are not normally exported from the object
      file.  However, as of gdc 0.9, they are exported.  This will
      probably change again.
    * The type of _argptr in variadic functions is the target-specific
      va_list type.  It is not portable to assume this is a pointer.  The
      only portable way to use _argptr is the std.stdarg.va_arg template.

Usage

The compiler driver is named 'gdc' and accepts the standard GCC
options.  There is also a script named 'dmd' which has the same interface
as the Digital Mars dmd.

The mapping from DMD options to GCC is as follows:
-c
	-c
-d
	-fdeprecated
-debug[=<arg>]
	-fdebug[=<arg>]
-gt
	(see GCC manual for profiling options)
-inline
	-finline-functions
-I<path>
	-I <path>
-L<path>
	-L <path>
-O
	-O3 without inlining (may not be equivalent)
-od<dir>
	no equivalent; use the wrapper script
-of<file> 	-o <file>
-op<dir>
	no equivalent; use the wrapper script
-release
	-frelease
-unittest
	-funittest
-version=<arg>
	-fversion=<arg>

Other options:
-f[no-]bounds-check
	Controls array bounds checking

-femit-templates[=full|private|none|auto]
-f[no-]emit-templates
	Controls whether or not template code is emitted.

    "full"    Emit templates, expecting multiple copies to be merged by
              linker.
    "private" Emit templates, but make them private to the translation
              unit.  The executable will have multiple copies of code
              and data.
    "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.
    "full" 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.

-fdump-source
	Dump decoded UTF-8 text and source from HTML to <source>.utf-8
	and <source>.d.utf-8.

Changes

0.10:

    * Fixes
          o Complex number comparisons with NAN operands
          o Cleaned up Phobos installation.
          o Non-virtual method calls
          o Code generation with -mpowerpc64
          o Break in labeled switch statement
    * Improvements
          o Updated to DMD 0.110
          o Applied Thomas Khne's and Anders Bjrklund's HTML patches.
          o Added Thomas Khne's "dump source" code
          o Phobos Makefile now supports the DESTDIR variable

0.9:

    * Fixes
          o Detect use of non-static methods in a static context
          o Enumerated types are signed by default
          o Anders Bjrklund's patch for HTML infinite looping
          o va_start is now a template.
          o Delegate expressions for struct methods now work
          o bswap uses unsigned right shift
          o Fixed several problems with the dmd script
          o Fixed crash when compiling with debug information
          o Handle referenes to instance variables without "this"
          o Fixed ICE for interfaces with multiple inheritence
          o Fix id.h dependcy so concurrent make will work
    * Improvements
          o Updated to DMD 0.109
    *  Notes
          o The (undocumented) BitsPer{Pointer,Word} version
            identifiers are now prefixed with "GNU_"
          o Private declarations are now exported from object files

0.8:
    *  Fixes
          o std.loader module is now enabled
          o Proper casting from complex and imaginary types
          o Diagnostics are now GCC-style
          o Exceptions don't leak memory anymore
          o The gdc command processes ".html" as D source files.
          o ICE for classes declared in a function
          o ICE on empty "if" statement
          o Test for existence of "execvpe", "fwide", and "fputwc" before
            using them
          o Corrected floating point "min_10_exp" properties
          o std.date.getLocalTZA returns a correct values
          o Using gdc to link with C++ should now just need "-lstdc++"
    * Improvements
          o Debugging information is vastly improved
          o DLLs can be built on Cygwin
    * Notes
          o "DigitalMars" is not longer defined as a version symbol

1g:

    * Fixes
          o Various debugging information problems
          o Report more errors and warning with correct line numbers
          o Registers are now put on the stack for garbage collection
          o Signed/unsigned expression semantics should match DMD now

    * Improvements
          o Update to DMD 0.102
          o Templates are handled better on targets without template support

    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
