分类: C/C++
2009-06-24 00:01:10
下载:
NEW FEATURES SINCE MINGW GCC 3.4
Windows-specific:--
- Shared libgcc: If all modules are linked with -shared-libgcc,
exceptions can be thrown across DLL boundaries. Note that this is
the default for all languages other than C.
- Shared libstdc++: Compile with -D_GLIBCXX_DLL and add -lstdc++_s to
your link flags to link against a DLL version of libstdc++.
- Zero cost exceptions: New exception model Dwarf only has performance
penalty when being thrown. The old model, SJLJ, is no longer
available.
- Thread local storage support: The __thread keyword is honoured.
- Translations into your language! See MINGWsharelocale for a list of
codes. Set the LANG environment variable to the code of your
preferred language.
$ export LANG=es
$ gcc
gcc.exe: no hay ficheros de entrada
In general:--
- New language: Java 1.5, using the Eclipse front end
- New language: Objective-C++, intended to bridge C++ and Objective-C
code
- Improved optimisation: SSA optimisation framework, IPA support,
autovectorization of loops, new register allocator, new instruction
scheduler, and more
- Support for some parts of the upcoming new version of C++
- Support for new IA-32 processors and SIMD instruction sets
- Support for TR1 and experimental support for the next C++ standard
- Fortran language rewritten to support new standards
- Improved debugging information: Dwarf-2 debugging is now the default.
Make sure to get the latest GDB version for the best debugging
experience.
- OpenMP support
For more information, see <
GENERAL NOTES
- Throwing exceptions through foreign frames
Previous versions of GCC would blindly unwind through all foreign frames.
If these frames did not have valid unwind information, perhaps because
they were written in a language that does not have exceptions, program
data structures might be left in an incoherent state, leading to
mysterious bugs including data loss and program crashes. From now on,
GCC will only unwind through frames if it can be determined that the
functions understand exceptions. Currently, functions that use either
Dwarf-2 EH or SEH are supported.
Unfortunately, in i386 versions of Windows, there is no reliable way
for the compiler or runtime unwinder to tell if a function supports
unwinding with SEH. Consequently, it is necessary to add the seh_aware
decorator to the declarations of foreign SEH functions that exceptions
might be thrown through.
If you intend to throw exceptions through Windows API callbacks, you
will need to add __attribute__((seh_aware)) to the declaration of the
corresponding API function. This is only a temporary measure, as a
future version of w32api from MinGW.org will have some sort of way of
adding this annotation automatically. Note that it is not necessary to
add this attribute to the callbacks themselves, or any other function
definition that is compiled by GCC; it is only necessary for foreign
functions.
- Dynamic linking with libgcc_s_dw2-1.dll
Dynamic linking with libgcc_s_dw2-1.dll is necessary to throw
exceptions between different modules, such as between two DLLs or a
DLL and an EXE. Consequently, it is the default for all languages
other than C. To disable this dynamic linking, use -static-libgcc.
To enable this dynamic linking in C, use -shared-libgcc.
KNOWN ISSUES
- The Java compiler GCJ is somewhat broken. Compiling with
-static-libgcj works better than the default of dynamically linking.
- libstdc++_s is only partially implemented.
- GRAPHITE is not supported due to various bugs. This is being corrected
for the next release.