GCC 4.5 リリースノート(続き)

Runtime Library (libstdc++)

  • Improved experimental support for the upcoming ISO C++ standard, C++0x, including:

      • Support for <future>, <functional>, and <random>.
      • Existing facilities now exploit explicit operators and the newly implemented core C++0x features.

    C++0xサポートの追加(future/functional/randomヘッダ、既存クラスのexplicit operators対応)

  • An experimental profile mode has been added. This is an implementation of many C++ standard library constructs with an additional analysis layer that gives performance improvement advice based on recognition of suboptimal usage patterns. For example,
    実験的なプロファイリングモードの追加。これは標準C++ライブラリに追加のレイヤを儲け、非効率な使用パターンを検出することによりパフォーマンスの向上方法をアドバイスすることが出来ます。

    #include <vector>
    int main() 
    {
      std::vector<int> v;
      for (int k = 0; k < 1024; ++k) 
        v.insert(v.begin(), k);
    }
    

    When instrumented via the profile mode, can return suggestions about the initial size and choice of the container used as follows:
    このコードがプロファイルモードで実行されたとき、以下のような提案をします。

    vector-to-list: improvement = 5: call stack = 0x804842c ...
        : advice = change std::vector to std::list
    vector-size: improvement = 3: call stack = 0x804842c ...
        : advice = change initial container size from 0 to 1024
    

    These constructs can be substituted for the normal libstdc++ constructs on a piecemeal basis, or all existing components can be transformed via the -D_GLIBCXX_PROFILE macro.
    (訳注:???-D_GLIBCXX_PROFILEでなんか出来るよってことしかわからない・・・)

  • Support for decimal floating-point arithmetic (aka ISO C++ TR 24733) has been added. This support is in header file <decimal/decimal>, uses namespace std::decimal, and includes classes decimal32, decimal64, and decimal128.
    TR24733 十進浮動小数点演算のサポート。<decimal/decimal>ヘッダ内のstd::decimal名前空間にdecimal32, decimal64, decimal128のクラスが宣言されています。
  • Sources have been audited for application of function attributes nothrow, const, pure, and noreturn.
    関数にnothrow, const, pure, noreturnの各属性を付けられるかどうかを検査するようになりました。
  • Python pretty-printers have been added for many standard library components that simplify the internal representation and present a more intuitive view of components when used with appropriately-advanced versions of GDB. For more information, please consult the more detailed description.
    Pythonのpretty-printerがGDB上での標準ライブラリの表示の簡略化のために導入されました。(訳注:http://d.hatena.ne.jp/faith_and_brave/20100329/1269833173と同じような機能?)
  • The default behavior for comparing typeinfo names has changed, so in <typeinfo>, __GXX_MERGED_TYPEINFO_NAMES now defaults to zero.
    デフォルトのtypeinfoの比較方法が変わりました。<typeinfo>ヘッダの__GXX_MERGED_TYPEINFO_NAMESはデフォルトでは0に設定されています。
  • The new -static-libstdc++ option directs g++ to link the C++ library statically, even if the default would normally be to link it dynamically.
    新しい-static-libstdc++オプションが追加されました。C++ランタイムのみスタティックリンクすることが出来ます
Fortran(訳注:Fortranってまだこんな活発だったの?まあスルーするけど。)
  • The COMMON default padding has been changed ? instead of adding the padding before a variable it is now added afterwards, which increases the compatibility with other vendors and helps to obtain the correct output in some cases. Cf. also the -falign-commons option (added in 4.4).
  • The -finit-real= option now also supports the value snan for signalling not-a-number; to be effective, one additionally needs to enable trapping (e.g. via -ffpe-trap=). Note: Compile-time optimizations can turn a signalling NaN into a quiet one.
  • The new option -fcheck= has been added with the options bounds, array-temps, do, pointer, and recursive. The bounds and array-temps options are equivalent to -fbounds-check and -fcheck-array-temporaries. The do option checks for invalid modification of loop iteration variables, and the recursive option tests for recursive calls to subroutines/functions which are not marked as recursive. With pointer pointer association checks in calls are performed; however, neither undefined pointers nor pointers in expressions are handled. Using -fcheck=all enables all these run-time checks.
  • The run-time checking -fcheck=bounds now warns about invalid string lengths of character dummy arguments. Additionally, more compile-time checks have been added.
  • The new option -fno-protect-parens has been added; if set, the compiler may reorder REAL and COMPLEX expressions without regard to parentheses.
  • GNU Fortran no longer links against libgfortranbegin. As before, MAIN__ (assembler symbol name) is the actual Fortran main program, which is invoked by the main function. However, main is now generated and put in the same object file as MAIN__. For the time being, libgfortranbegin still exists for backward compatibility. For details see the new Mixed-Language Programming chapter in the manual.
  • The I/O library was restructured for performance and cleaner code.
  • Array assignments and WHERE are now run in parallel when OpenMP's WORKSHARE is used.
  • The experimental option -fwhole-file was added. The option allows whole-file checking of procedure arguments and allows for better optimizations. It can also be used with -fwhole-program, which is now also supported in gfortran.
  • More Fortran 2003 and Fortran 2008 mathematical functions can now be used as initialization expressions.
  • Some extended attributes such as STDCALL are now supported via the GCC$ compiler directive.
  • For Fortran 77 compatibility: If -fno-sign-zero is used, the SIGN intrinsic behaves now as if zero were always positive.
  • For legacy compatibiliy: On Cygwin and MinGW, the special files CONOUT$ and CONIN$ (and CONERR$ which maps to CONOUT$) are now supported.
  • Fortran 2003 support has been extended:
    • Procedure-pointer function results and procedure-pointer components (including PASS),
    • allocatable scalars (experimental),
    • DEFERRED type-bound procedures,
    • the ERRMSG= argument of the ALLOCATE and DEALLOCATE statements have been implemented.
    • The ALLOCATE statement supports type-specs and the SOURCE= argument.
    • OPERATOR(*) and ASSIGNMENT(=) are now allowed as GENERIC type-bound procedure (i.e. as type-bound operators).
    • Rounding (ROUND=, RZ, ...) for output is now supported.
    • The INT_FAST{8,16,32,64,128}_T kind type parameters of the intrinsic module ISO_C_BINDING are now supported, except for the targets listed above as ones where GCC does not have type information.
    • Extensible derived types with type-bound procedure or procedure pointer with PASS attribute now have to use CLASS in line with the Fortran 2003 standard; the workaround to use TYPE is no longer supported.
    • Experimental, incomplete support for polymorphism, including CLASS, SELECT TYPE and dynamic dispatch of type-bound procedure calls. Some features do not work yet such as unlimited polymorphism (CLASS(*)).
  • Fortran 2008 support has been extended:
    • The OPEN statement now supports the NEWUNIT= option, which returns a unique file unit, thus preventing inadvertent use of the same unit in different parts of the program.
    • Support for unlimited format items has been added.
    • The INT{8,16,32} and REAL{32,64,128} kind type parameters of the intrinsic module ISO_FORTRAN_ENV are now supported.
    • Using complex arguments with TAN, SINH, COSH, TANH, ASIN, ACOS, and ATAN is now possible; the functions ASINH, ACOSH, and ATANH have been added (for real and complex arguments) and ATAN(Y,X) is now an alias for ATAN2(Y,X).
    • The BLOCK construct has been implemented.
Java (GCJ)(訳注:Javaなんて無かった)

New Targets and Target Specific Improvements
新しいターゲットとターゲット固有の更新

AIX
  • Full cross-toolchain support now available with GNU Binutils
ARM
  • GCC now supports the Cortex-M0 and Cortex-A5 processors.
  • GCC now supports the ARM v7E-M architecture.
  • GCC now supports VFPv4-based FPUs and FPUs with single-precision-only VFP.
  • GCC has many improvements to optimization for other ARM processors, including scheduling support for the integer pipeline on Cortex-A9.
  • GCC now supports the IEEE 754-2008 half-precision floating-point type, and a variant ARM-specific half-precision type. This type is specified using __fp16, with the layout determined by -mfp16-format. With appropriate -mfpu options, the Cortex-A9 and VFPv4 half-precision instructions will be used.
  • GCC now supports the variant of AAPCS that uses VFP registers for parameter passing and return values.
AVR
  • The -mno-tablejump option has been removed because it has the same effect as the -fno-jump-tables option.
  • Added support for these new AVR devices:
    • ATmega8U2
    • ATmega16U2
    • ATmega32U2
IA-32/x86-64
  • GCC now will set the default for -march= based on the configure target.
    -marchをconfigure時のターゲットに自動的に指定するようになりました。
  • GCC now supports handling floating-point excess precision arising from use of the x87 floating-point unit in a way that conforms to ISO C99. This is enabled with -fexcess-precision=standard and with standards conformance options such as -std=c99, and may be disabled using -fexcess-precision=fast.
    C99対応のためx87fpuを使用したときの精度の違いを吸収するようにしました。この挙動は-fexcess-precision=standardまたは-std=c99で有効に、-fexcess-precision=fastで無効になります。
  • Support for the Intel Atom processor is now available through the -march=atom and -mtune=atom options.
    Intel Atom向けのチューニングが追加されました。-march=atom/-mtune-atomを使用してください。
  • A new -mcrc32 option is now available to enable crc32 intrinsics.
    crc32命令のために-mcrc32が追加されました。
  • A new -mmovbe option is now available to enable GCC to use the movbe instruction to implement __builtin_bswap32 and __builtin_bswap64.
    -mmovbeを使うと__buildin_bswap32と__builtin_bswap64の実装にmovbe命令を使うようになりました。
  • SSE math now can be enabled by default at configure time with the new --with-fpmath=sse option.
    configure時に--with-fpmath=sseを使うとデフォルトでSSEによる浮動小数点演算を行うようになりました。
  • There is a new intrinsic header file, <x86intrin.h>. It should be included before using any IA-32/x86-64 intrinsics.
    新しい組み込み命令のヘッダ<intrin.h>が追加されました。すべてのIA-32/x86-64組み込み命令を使う時にincludeする必要があります。
  • Support for the XOP, FMA4, and LWP instruction sets for the AMD Orochi processors are now available with the -mxop, -mfma4, and -mlwp options.
    AMD OrochiのXOP, FMA4, LWP命令がサポートされました。それぞれ-mxop, -mfma4, -mlwpで有効になります。
  • The -mabm option enables GCC to use the popcnt and lzcnt instructions on AMD processors.
    -mabmを使うとAMDプロセッサ上でpopcnt/lzcnt命令を使うようになります。
  • The -mpopcnt option enables GCC to use the popcnt instructions on both AMD and Intel processors.-mpopcntを使うとAMDIntel両方のプロセッサでpopcnt命令を使うようになります。
M68K/ColdFire
  • GCC now supports ColdFire 51xx, 5221x, 5225x, 52274, 52277, 5301x and 5441x devices.
  • GCC now supports thread-local storage (TLS) on M68K and ColdFire processors.
MeP

Support has been added for the Toshiba Media embedded Processor (MeP, or mep-elf) embedded target.

MIPS
  • GCC now supports MIPS 1004K processors.
  • GCC can now be configured with options --with-arch-32, --with-arch-64, --with-tune-32 and --with-tune-64 to control the default optimization separately for 32-bit and 64-bit modes.
  • MIPS targets now support an alternative _mcount interface, in which register $12 points to the function's save slot for register $31. This interface is selected by the -mcount-ra-address option; see the documentation for more details.
  • GNU/Linux targets can now generate read-only .eh_frame sections. This optimization requires GNU binutils 2.20 or above, and is only available if GCC is configured with a suitable version of binutils.
  • GNU/Linux targets can now attach special relocations to indirect calls, so that the linker can turn them into direct jumps or branches. This optimization requires GNU binutils 2.20 or later, and is automatically selected if GCC is configured with an appropriate version of binutils. It can be explicitly enabled or disabled using the -mrelax-pic-calls command-line option.
  • GCC now generates more heavily-optimized atomic operations on Octeon processors.
  • MIPS targets now support the -fstack-protector option.
  • GCC now supports an -msynci option, which specifies that synci is enough to flush the instruction cache, without help from the operating system. GCC uses this information to optimize automatically-generated cache flush operations, such as those used for nested functions in C. There is also a --with-synci configure-time option, which makes -msynci the default.
  • GCC supports four new function attributes for interrupt handlers: interrupt, use_shadow_register_set, keep_interrupts_masked and use_debug_exception_return. See the documentation for more details about these attributes.
picochip
RS/6000 (POWER/PowerPC)
  • GCC now supports the Power ISA 2.06, which includes the VSX instructions that add vector 64-bit floating point support, new population count instructions, and conversions between floating point and unsigned types.
  • Support for the power7 processor is now available through the -mcpu=power7 and -mtune=power7.
  • GCC will now vectorize loops that contain simple math functions like copysign when generating code for altivec or VSX targets.
  • Support for the A2 processor is now available through the -mcpu=a2 and -mtune=a2 options.
  • Support for the 476 processor is now available through the -mcpu={476,476fp} and -mtune={476,476fp} options.
  • Support for the e500mc64 processor is now available through the -mcpu=e500mc64 and -mtune=e500mc64 options.
  • GCC can now be configured with options --with-cpu-32, --with-cpu-64, --with-tune-32 and --with-tune-64 to control the default optimization separately for 32-bit and 64-bit modes.
RX

Support has been added for the Renesas RX Processor (rx-elf) target.

Operating Systems

Windows (Cygwin and MinGW)
  • GCC now installs all the major language runtime libraries as DLLs when configured with the --enable-shared option.
    configure時に--enable-sharedが指定されているときはランタイムライブラリをDLLとしてインストールするようになりました。
  • GCC now makes use of the new support for aligned common variables in versions of binutils >= 2.20 to fix bugs in the support for SSE data types.
    SSEデータ型のバグを修正するため、binutils 2.20以降のアラインされたグローバル変数に対応しました(訳注:?)。
  • Improvements to the libffi support library increase the reliability of code generated by GCJ on all Windows platforms. Libgcj is enabled by default for the first time.
    Windows上でのlibffiを使ったコードの信頼性が向上しました。デフォルトではlibgcjが先に使われます。
  • Libtool improvements simplify installation by placing the generated DLLs in the correct binaries directory.
    DLLを正しいディレクトリにインストールするためにlibtoolが改良されました。
  • Numerous other minor bugfixes and improvements, and substantial enhancements to the Fortran language support library.
    Fortranライブラリの細かいバグ修正と拡張が多数あります。

Documentation improvements

Other significant improvements

Plugins
  • It is now possible to extend the compiler without having to modify its source code. A new option -fplugin=file.so tells GCC to load the shared object file.so and execute it as part of the compiler. The internal documentation describes the details on how plugins can interact with the compiler.
    ソースを修正しなくても機能拡張を行えるようになりました。新しいオプション-fplugin=file.soを使うことで、GCCはfile.soをコンパイルパスの一部として取り込みます。プラグインの仕様は内部ドキュメントで解説されています。
Installation changes
  • The move to newer autotools changed default installation directories and switches to control them: The --with-datarootdir, --with-docdir, --with-pdfdir, and --with-htmldir switches are not used any more. Instead, you can now use --datarootdir, --docdir, --htmldir, and --pdfdir. The default installation directories have changed as follows according to the GNU Coding Standards:
    datarootdir	read-only architecture-independent data root [PREFIX/share]
    localedir	locale-specific message catalogs [DATAROOTDIR/locale]
    docdir	documentation root [DATAROOTDIR/doc/PACKAGE]
    htmldir	html documentation [DOCDIR]
    dvidir	dvi documentation [DOCDIR]
    pdfdir	pdf documentation [DOCDIR]
    psdir	ps documentation [DOCDIR]
    
    The following variables have new default values:
    datadir	read-only architecture-independent data [DATAROOTDIR]
    infodir	info documentation [DATAROOTDIR/info]
    mandir	man documentation [DATAROOTDIR/man]
    

Please send FSF & GNU inquiries & questions to gnu@gnu.org. There are also other ways to contact the FSF.

These pages are maintained by the GCC team.
For questions related to the use of GCC, please consult these web pages and the GCC manuals. If that fails, the gcc-help@gcc.gnu.org mailing list might help.
Please send comments on these web pages and the development of GCC to our developer mailing list at gcc@gnu.org or gcc@gcc.gnu.org. All of our lists have public archives.

Copyright (C) Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA.

Verbatim copying and distribution of this entire article is permitted in any medium, provided this notice is preserved.Last modified 2010-04-14