/usr/src/gcc-4.6/debian/NEWS.gcc is in gcc-4.6-source 4.6.4-6ubuntu2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 | GCC 4.6 Release Series -- Changes, New Features, and Fixes
==========================================================
Caveats
=======
- The options -b <machine> and -V <version> have been removed because
they were unreliable. Instead, users should directly run
<machine>-gcc when cross-compiling, or <machine>-gcc-<version>
to run a different version of gcc.
- GCC now has stricter checks for invalid command-line options. In
particular, when gcc was called to link object files rather than
compile source code, it would previously accept and ignore all options
starting with --, including linker options such as --as-needed and
--export-dynamic, although such options would result in errors if any
source code was compiled. Such options, if unknown to the compiler,
are now rejected in all cases; if the intent was to pass them to the
linker, options such as -Wl,--as-needed should be used.
- Versions of the GNU C library up to and including 2.11.1 included
an incorrect implementation of the cproj function. GCC optimizes
its builtin cproj according to the behavior specified and allowed
by the ISO C99 standard. If you want to avoid discrepancies
between the C library and GCC's builtin transformations when using
cproj in your code, use GLIBC 2.12 or later. If you are using an
older GLIBC and actually rely on the incorrect behavior of cproj,
then you can disable GCC's transformations using -fno-builtin-cproj.
- The C-only intermodule optimization framework (IMA, enabled by
-combine) has been removed in favor of the new generic link-time
optimization framework (LTO) introduced in GCC 4.5.0.
- GCC now ships with the LGPL-licensed libquadmath library, which
provides quad-precision mathematical functions for targets with a
__float128 datatype. __float128 is available for targets on 32-bit
x86, x86-64 and Itanium architectures. The libquadmath library is
automatically built on such targets when building the Fortran
compiler.
- New -Wunused-but-set-variable and -Wunused-but-set-parameter
warnings were added for C, C++, Objective-C and Objective-C++.
These warnings diagnose variables respective parameters which are
only set in the code and never otherwise used. Usually such
variables are useless and often even the value assigned to them is
computed needlessly, sometimes expensively. The
-Wunused-but-set-variable warning is enabled by default by -Wall
flag and -Wunused-but-set-parameter by -Wall -Wextra flags.
- Support for a number of older systems and recently unmaintained or
untested target ports of GCC has been declared obsolete in GCC 4.6.
Unless there is activity to revive them, the next release of GCC
will have their sources permanently removed.
- All GCC ports for the following processor architectures have been
declared obsolete:
- Argonaut ARC (arc-*)
- National Semiconductor CRX (crx-*)
- Motorola 68HC11 and 68HC12
- (m68hc11-*-*, m6811-*-*,
- m68hc12-*-*, m6812-*-*)
- Sunplus S+core (score-*)
- The following ports for individual systems on particular
architectures have been obsoleted:
- Interix (i[34567]86-*-interix3*)
- Generic ARM PE (arm-*-pe* other
- than arm*-wince-pe*)
- MCore PE (mcore-*-pe*)
- SH SymbianOS (sh*-*-symbianelf*)
- GNU Hurd on Alpha and PowerPC
- (alpha*-*-gnu*, powerpc*-*-gnu*)
- M68K uClinux old ABI
- (m68k-*-uclinuxoldabi*)
- a.out NetBSD
- (arm*-*-netbsd*, i[34567]86-*-netbsd*,
- vax-*-netbsd*, but
- not *-*-netbsdelf*)
- The i[34567]86-*-pe alias for Cygwin targets has also been
obsoleted; users should configure for i[34567]86-*-cygwin* instead.
- Certain configure options to control the set of libraries built with
GCC on some targets have been obsoleted. On ARM targets, the
options --disable-fpu, --disable-26bit, --disable-underscore,
--disable-interwork, --disable-biendian and --disable-nofmult have
been obsoleted. On MIPS targets, the options
--disable-single-float, --disable-biendian and --disable-softfloat
have been obsoleted.
- Support has been removed for all the configurations obsoleted in
GCC 4.5.
General Optimizer Improvements
==============================
- A new general optimization level, -Ofast, has been introduced. It
combines the existing optimization level -O3 with options that can
affect standards compliance but result in better optimized code.
For example, -Ofast enables -ffast-math.
- Link-time optimization improvements:
- The Scalable Whole Program Optimizer (WHOPR) project has
stabilized to the point of being usable. It has become the
default mode when using the LTO optimization model. Link time
optimization can now split itself into multiple parallel
compilations. Parallelism is controlled with -flto=n (where n
specifies the number of compilations to execute in parallel). GCC
can also cooperate with a GNU make job server by specifying the
-flto=jobserver option and adding + to the beginning of the
Makefile rule executing the linker.
- Classical LTO mode can be enforced by -flto-partition=none. This
may result in small code quality improvements.
- A large number of bugs were fixed. GCC itself, Mozilla Firefox
and other large applications can be built with LTO enabled.
- The linker plugin support improvements
- Linker plugin is now enabled by default when the linker is
detected to have plugin support. This is the case for GNU ld
2.21.51 or newer (on ELF and Cygwin targets) and the Gold linker
on ELF targets. Plugin support of the Apple linker on Darwin is
not compatible with GCC. The linker plugin can also be
controlled by the -fuse-linker-plugin command line option.
- Resolution information from the linker plugin is used to drive
whole program assumptions. Use of the linker plugin results in
more aggressive optimization on binaries and on shared libraries
that use the hidden visibility attribute. Consequently the use
of -fwhole-program is not neccesary in addition to LTO.
- Hidden symbols used from non-LTO objects now have to be explicitly
annotated with externally_visible when the linker plugin is not
used.
- C++ inline functions and virtual tables are now privatized more
aggressively, leading to better inter-procedural optimization and
faster dynamic linking.
- Memory usage and intermediate language streaming performance have
been improved.
- Static constructors and destructors from individual units are
inlined into a single function. This can significantly improve
startup times of large C++ applications where static constructors
are very common. For example, static constructors are used when
including the iostream header.
- Support for the Ada language has been added.
- Interprocedural optimization improvements
- The interprocedural framework was re-tuned for link time
optimization. Several scalability issues were resolved.
- Improved auto-detection of const and pure functions. Newly,
noreturn functions are auto-detected.
- The -Wsuggest-attribute=[const|pure|noreturn] flag is available
that informs users when adding attributes to headers might improve
code generation.
- A number of inlining heuristic improvements. In particular:
- Partial inlining is now supported and enabled by default at -O2
and greater. The feature can be controlled via
-fpartial-inlining.
- Partial inlining splits functions with short hot path to return.
This allows more aggressive inlining of the hot path leading to
better performance and often to code size reductions (because
cold parts of functions are not duplicated).
- Scalability for large compilation units was improved significantly.
- Inlining of callbacks is now more aggressive.
- Virtual methods are considered for inlining when the caller is
inlined and devirtualization is then possible.
- Inlining when optimizing for size (either in cold regions of a
program or when compiling with -Os) was improved to better
handle C++ programs with larger abstraction penalty, leading to
smaller and faster code.
- The IPA reference optimization pass detecting global variables
used or modified by functions was strengthened and sped up.
- Functions whose address was taken are now optimized out when all
references to them are dead.
- A new inter-procedural static profile estimation pass detects
functions that are executed once or unlikely to be executed.
Unlikely executed functions are optimized for size. Functions
executed once are optimized for size except for the inner
loops.
- On most targets with named section support, functions used only at
startup (static constructors and main), functions used only at
exit and functions detected to be cold are placed into separate
text segment subsections. This extends the -freorder-functions
feature and is controlled by the same switch. The goal is to
improve the startup time of large C++ programs.
Proper function placement requires linker support. GNU ld 2.21.51
on ELF targets was updated to place those functions together within
the text section leading to better code locality and faster startup
times of large C++ programs. The feature is also supported in the
Apple linker. Support in the gold linker is planned.
- A new switch -fstack-usage has been added. It makes the compiler
output stack usage information for the program, on a per-function
basis, in an auxiliary file.
- A new switch -fcombine-stack-adjustments has been added. It can be
used to enable or disable the compiler's stack-slot combining pass
which before was enabled automatically at -O1 and above, but could
not be controlled on its own.
- A new switch -fstrict-volatile-bitfields has been added. Using it
indicates that accesses to volatile bitfields should use a single
access of the width of the field's type. This option can be useful
for precisely defining and accessing memory-mapped peripheral
registers from C or C++.
Compile time and memory usage improvements
==========================================
- Datastructures used by the dataflow framework in GCC were
reorganized for better memory usage and more cache locality.
Compile time is improved especially on units with large functions
(possibly resulting from a lot of inlining) not fitting into the
processor cache. The compile time of the GCC C compiler binary with
link-time optimization went down by over 10% (benchmarked on x86-64
target).
New Languages and Language specific improvements
================================================
Ada
---
- Stack checking has been improved on selected architectures (Alpha,
IA-32/x86-64, RS/6000 and SPARC): it now will detect stack overflows
in all cases on these architectures.
- Initial support for Ada 2012 has been added.
C family
--------
- A new warning, enabled by -Wdouble-promotion, has been added that
warns about cases where a value of type float is implicitly promoted
to double. This is especially helpful for CPUs that handle the
former in hardware, but emulate the latter in software.
- A new function attribute leaf was introduced. This attribute allows
better inter-procedural optimization across calls to functions that
return to the current unit only via returning or exception handling.
This is the case for most library functions that have no callbacks.
- Support for a new data type __int128 for targets having wide enough
machine-mode support.
- The new function attribute callee_pop_aggregate allows to specify if
the caller or callee is responsible for popping the aggregate return
pointer value from the stack.
- Support for selectively enabling and disabling warnings via #pragma
GCC diagnostic has been added. For instance:
#pragma GCC diagnostic error "-Wuninitialized"
foo(a); /* error is given for this one */
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wuninitialized"
foo(b); /* no diagnostic for this one */
#pragma GCC diagnostic pop
foo(c); /* error is given for this one */
#pragma GCC diagnostic pop
foo(d); /* depends on command line options */
- The -fmax-errors=N option is now supported. Using this option
causes the compiler to exit after N errors have been issued.
C
-
- There is now experimental support for some features from the
upcoming C1X revision of the ISO C standard. This support may be
selected with -std=c1x, or -std=gnu1x for C1X with GNU extensions.
Note that this support is experimental and may change incompatibly
in future releases for consistency with changes to the C1X standard
draft. The following features are newly supported as described in
the N1539 draft of C1X (with changes agreed at the March 2011 WG14
meeting); some other features were already supported with no
compiler changes being needed, or have some support but not in full
accord with N1539 (as amended).
- Static assertions (_Static_assert keyword)
- Typedef redefinition
- New macros in <float.h>
- Anonymous structures and unions
- The new -fplan9-extensions option directs the compiler to support
some extensions for anonymous struct fields which are implemented by
the Plan 9 compiler. A pointer to a struct may be automatically
converted to a pointer to an anonymous field when calling a
function, in order to make the types match. An anonymous struct
field whose type is a typedef name may be referred to using the
typedef name.
C++
---
- Improved experimental support for the upcoming C++0x ISO C++
standard, including support for constexpr (thanks to Gabriel Dos
Reis and Jason Merrill), nullptr (thanks to Magnus Fromreide),
noexcept, unrestricted unions, range-based for loops (thanks to
Rodrigo Rivas Costa), opaque enum declarations (thanks also to
Rodrigo), implicitly deleted functions and implicit move
constructors.
- When an extern declaration within a function does not match a
declaration in the enclosing context, G++ now properly declares the
name within the namespace of the function rather than the namespace
which was open just before the function definition (c++/43145).
- GCC now warns by default when casting integers to larger pointer
types. These warnings can be disabled with the option
-Wno-int-to-pointer-cast, which is now also available in C++.
- G++ no longer optimizes using the assumption that a value of
enumeration type will fall within the range specified by the
standard, since that assumption is easily violated with a conversion
from integer type (c++/43680). The old behavior can be restored
with -fstrict-enums.
- The new -fnothrow-opt flag changes the semantics of a throw()
exception specification to match the proposed semantics of the
noexcept specification: just call terminate if an exception tries to
propagate out of a function with such an exception specification.
This dramatically reduces or eliminates the code size overhead from
adding the exception specification.
- The new -Wnoexcept flag will suggest adding a noexcept qualifier to
a function that the compiler can tell doesn't throw if it would
change the value of a noexcept expression.
- The -Wshadow option now warns if a local variable or type
declaration shadows another type in C++. Note that the compiler will
not warn if a local variable shadows a struct/class/enum, but will
warn if it shadows an explicit typedef.
- When an identifier is not found in the current scope, G++ now offers
suggestions about which identifier might have been intended.
- G++ now issues clearer diagnostics for missing semicolons after
class, struct, and union definitions.
- G++ now issues clearer diagnostics for missing semicolons after
class member declarations.
- G++ now issues clearer diagnostics when a colon is used in a place
where a double-colon was intended.
- G++ no longer accepts mutable on reference members (c++/33558).
Use -fpermissive to allow the old, non-conforming behaviour.
- A few mangling fixes have been made, to attribute const/volatile on
function pointer types, decltype of a plain decl, and use of a
function parameter in the declaration of another parameter. By
default the compiler still uses the old mangling, but emits aliases
with the new mangling on targets that support strong aliases. Users
can switch over entirely to the new mangling with -fabi-version=5 or
-fabi-version=0. -Wabi will now warn about code that uses the old
mangling.
- G++ no longer allows objects of const-qualified type to be default
initialized unless the type has a user-declared default constructor.
Code that fails to compile can be fixed by providing an initializer e.g.
struct A { A(); };
struct B : A { };
const B b = B();
Use -fpermissive to allow the old, non-conforming behaviour.
Runtime Library (libstdc++)
---------------------------
- Improved experimental support for the upcoming ISO C++ standard,
C++0x, including using constexpr and nullptr.
- Performance improvements to the Debug Mode, thanks to François
Dumont.
- Atomic operations used for reference-counting are annotated so that
they can be understood by race detectors such as Helgrind, see Data
Race Hunting.
- Most libstdc++ standard headers have been changed to no longer
include the cstddef header as an implementation detail. Code that
relied on that header being included as side-effect of including
other standard headers will need to include cstddef explicitly.
Fortran
-------
- On systems supporting the libquadmath library, GNU Fortran now also
supports a quad-precision, kind=16 floating-point data type
(REAL(16), COMPLEX(16)). As the data type is not fully supported in
hardware, calculations might be one to two orders of magnitude
slower than with the 4, 8 or 10 bytes floating-point data
types. This change does not affect systems which support REAL(16) in
hardware nor those which do not support libquadmath.
- Much improved compile time for large array constructors.
- In order to reduce execution time and memory consumption, use of
temporary arrays in assignment expressions is avoided for many
cases. The compiler now reverses loops in order to avoid generating
a temporary array where possible.
- Improved diagnostics, especially with -fwhole-file.
- The -fwhole-file flag is now enabled by default. This improves code
generation and diagnostics. It can be disabled using the deprecated
-fno-whole-file flag.
- Support the generation of Makefile dependencies via the -M... flags
of GCC; you may need to specify the -cpp option in addition. The
dependencies take modules, Fortran's include, and CPP's #include
into account. Note: Using -M for the module path is no longer
supported, use -J instead.
- The flag -Wconversion has been modified to only issue warnings where
a conversion leads to information loss. This drastically reduces
the number of warnings; -Wconversion is thus now enabled with
-Wall. The flag -Wconversion-extra has been added and also warns
about other conversions; -Wconversion-extra typically issues a huge
number of warnings, most of which can be ignored.
- A new command-line option -Wunused-dummy-argument warns about unused
dummy arguments and is included in -Wall. Before, -Wunused-variable
also warned about unused dummy arguments.
- Fortran 2003 support has been extended:
- Improved support for polymorphism between libraries and programs
and for complicated inheritance patterns (cf. object-oriented
programming).
- Experimental support of the ASSOCIATE construct.
- In pointer assignments it is now possible to specify the lower
bounds of the pointer and, for a rank-1 or a simply contiguous
data-target, to remap the bounds.
- Automatic (re)allocation: In intrinsic assignments to allocatable
variables the left-hand side will be automatically allocated (if
unallocated) or reallocated (if the shape or type parameter is
different). To avoid the small performance penalty, you can use
a(:) = ... instead of a = ... for arrays and character strings
-- or disable the feature using -std=f95 or -fno-realloc-lhs.
- Deferred type parameter: For scalar allocatable and pointer
variables the character length can be deferred.
- Namelist variables with allocatable and pointer attribute and
nonconstant length type parameter are supported.
- Fortran 2008 support has been extended:
- Experimental coarray support (for one image only,
i.e. num_images() == 1); use the -fcoarray=single flag to enable
it.
- The STOP and the new ERROR STOP statements now support all
constant expressions.
- Support for the CONTIGUOUS attribute.
- Support for ALLOCATE with MOLD.
- Support for the STORAGE_SIZE intrinsic inquiry function.
- Support of the NORM2 and PARITY intrinsic functions.
- The following bit intrinsics were added: POPCNT and POPPAR for
counting the number of 1 bits and returning the parity; BGE, BGT,
BLE, and BLT for bitwise comparisons; DSHIFTL and DSHIFTR for
combined left and right shifts, MASKL and MASKR for simple left
and right justified masks, MERGE_BITS for a bitwise merge using a
mask, SHIFTA, SHIFTL and SHIFTR for shift operations, and the
transformational bit intrinsics IALL, IANY and IPARITY.
- Support of the EXECUTE_COMMAND_LINE intrinsic subroutine.
- Support for the IMPURE attribute for procedures, which allows for
ELEMENTAL procedures without the restrictions of PURE.
- Null pointers (including NULL()) and not allocated variables can
be used as actual argument to optional non-pointer,
non-allocatable dummy arguments, denoting an absent argument.
- Non-pointer variables with TARGET attribute can be used as actual
argument to POINTER dummies with INTENT(IN)
- Pointers including procedure pointers and those in a derived type
(pointer components) can now be initialized by a target instead of
only by NULL.
- The EXIT statement (with construct-name) can now be used to leave
not only the DO but also the ASSOCIATE, BLOCK, IF, SELECT CASE and
SELECT TYPE constructs.
- Internal procedures can now be used as actual argument.
- The named constants INTEGER_KINDS, LOGICAL_KINDS, REAL_KINDS and
CHARACTER_KINDS of the intrinsic module ISO_FORTRAN_ENV have been
added; these arrays contain the supported kind values for the
respective types.
- The module procedures C_SIZEOF of the intrinsic module
ISO_C_BINDINGS and COMPILER_VERSION and COMPILER_OPTIONS of
ISO_FORTRAN_ENV have been implemented.
- Minor changes: obsolescence diagnostics for ENTRY was added for
-std=f2008; a line may start with a semicolon; for internal and
module procedures END can be used instead of END SUBROUTINE and
END FUNCTION; SELECTED_REAL_KIND now also takes a RADIX argument;
intrinsic types are supported for TYPE(intrinsic-type-spec);
multiple type-bound procedures can be declared in a single
PROCEDURE statement; implied-shape arrays are supported for named
constants (PARAMETER). The transformational, three argument
versions of BESSEL_JN and BESSEL_YN were added -- the
elemental, two-argument version had been added in GCC 4.4; note
that the transformational functions use a recurrence algorithm.
Go
--
Support for the Go programming language has been added to GCC. It is
not enabled by default when you build GCC; use the --enable-languages
configure option to build it. The driver program for compiling Go
code is gccgo.
Go is currently known to work on GNU/Linux and RTEMS. Solaris support
is in progress. It may or may not work on other platforms.
Java (GCJ)
----------
Objective-C and Objective-C++
-----------------------------
- The -fobjc-exceptions flag is now required to enable Objective-C
exception and synchronization syntax (introduced by the keywords
@try, @catch, @finally and @synchronized).
- A number of Objective-C 2.0 features and extensions are now
supported by GCC. These features are enabled by default; you can
disable them by using the new -fobjc-std=objc1 command-line option.
- The Objective-C 2.0 dot-syntax is now supported. It is an
alternative syntax for using getters and setters; object.count is
automatically converted into [object count] or [object setCount:
...] depending on context; for example if (object.count > 0) is
automatically compiled into the equivalent of if ([object count] >
0) while object.count = 0; is automatically compiled into the
equivalent ot [object setCount: 0];. The dot-syntax can be used
with instance and class objects and with any setters or getters, no
matter if they are part of a declared property or not.
- Objective-C 2.0 declared properties are now supported. They are
declared using the new @property keyword, and are most commonly used
in conjunction with the new Objective-C 2.0 dot-syntax. The
nonatomic, readonly, readwrite, assign, retain, copy, setter and
getter attributes are all supported. Marking declared properties
with __attribute__ ((deprecated)) is supported too.
- The Objective-C 2.0 @synthesize and @dynamic keywords are supported.
@synthesize causes the compiler to automatically synthesize a
declared property, while @dynamic is used to disable all warnings
for a declared property for which no implementation is provided at
compile time. Synthesizing declared properties requires runtime
support in most useful cases; to be able to use it with the GNU
runtime, appropriate helper functions have been added to the GNU
Objective-C runtime ABI, and are implemented by the GNU Objective-C
runtime library shipped with GCC.
- The Objective-C 2.0 fast enumeration syntax is supported in
Objective-C. This is currently not yet available in Objective-C++.
Fast enumeration requires support in the runtime, and such support
has been added to the GNU Objective-C runtime library (shipped with
GCC).
- The Objective-C 2.0 @optional keyword is supported. It allows you
to mark methods or properties in a protocol as optional as opposed
to required.
- The Objective-C 2.0 @package keyword is supported. It has currently
the same effect as the @public keyword.
- Objective-C 2.0 method attributes are supported. Currently the
supported attributes are deprecated, sentinel, noreturn and format.
- Objective-C 2.0 method argument attributes are supported. The most
widely used attribute is unused, to mark an argument as unused in
the implementation.
- Objective-C 2.0 class and protocol attributes are supported.
Currently the only supported attribute is deprecated.
- Objective-C 2.0 class extensions are supported. A class extension
has the same syntax as a category declaration with no category name,
and the methods and properties declared in it are added directly to
the main class. It is mostly used as an alternative to a category
to add methods to a class without advertising them in the public
headers, with the advantage that for class extensions the compiler
checks that all the privately declared methods are actually
implemented.
- As a result of these enhancements, GCC can now be used to build
Objective-C and Objective-C++ software that uses Foundation and
other important system frameworks with the NeXT runtime on Darwin 9
and Darwin 10 (Mac OS X 10.5 and 10.6). Currently this is for m32
code only.
- Many bugs in the compiler have been fixed in this release; in
particular, LTO can now be used when compiling Objective-C and
Objective-C++ and the parser is much more robust in dealing with
invalid code.
Runtime Library (libobjc)
-------------------------
- The GNU Objective-C runtime library now defines the macro
__GNU_LIBOBJC__ (with a value that is increased at every release
where there is any change to the API) in objc/objc.h, making it easy
to determine if the GNU Objective-C runtime library is being used,
and if so, which version. Previous versions of the GNU Objective-C
runtime library (and other Objective-C runtime libraries such as the
Apple one) do not define this macro.
- A new Objective-C 2.0 API, almost identical to the one implemented
by the Apple Objective-C runtime, has been implemented in the GNU
Objective-C runtime library. The new API hides the internals of
most runtime structures but provides a more extensive set of
functions to operate on them. It is much easier, for example, to
create or modify classes at runtime. The new API also makes it
easier to port software from Apple to GNU as almost no changes
should be required. The old API is still supported for backwards
compatibility; including the old objc/objc-api.h header file
automatically selects the old API, while including the new
objc/runtime.h header file automatically selects the new API.
Support for the old API is being phased out and upgrading the
software to use the new API is strongly recommended. To check for
the availability of the new API, the __GNU_LIBOBJC__ macro can be
used as older versions of the GNU Objective-C runtime library, which
do not support the new API, do not define such a macro.
- Runtime support for @synchronized has been added.
- Runtime support for Objective-C 2.0 synthesized property accessors
has been added.
- Runtime support for Objective-C 2.0 fast enumeration has been added.
New Targets and Target Specific Improvements
============================================
ARM
---
- GCC now supports the Cortex-M4 processor implementing the v7-em
version of the architecture using the option -mcpu=cortex-m4.
- Scheduling descriptions for the Cortex-M4, the Neon and the floating
point units of the Cortex-A9 and a pipeline description for the
Cortex-A5 have been added.
- Synchronization primitives such as __sync_fetch_and_add and friends
are now inlined for supported architectures rather than calling into
a kernel helper function.
- SSA loop prefetching is enabled by default for the Cortex-A9 at -O3.
- Several improvements were committed to improve code generation for
the ARM architecture including a rewritten implementation for load
and store multiples.
- Several enhancements were committed to improve SIMD code generation
for NEON by adding support for widening instructions, misaligned
loads and stores, vector conditionals and support for 64 bit
arithmetic.
- Support was added for the Faraday cores fa526, fa606te, fa626te,
fmp626te, fmp626 and fa726te and can be used with the respective
names as parameters to the -mcpu= option.
- Basic support was added for Cortex-A15 and is available through
-mcpu=cortex-a15.
- GCC for AAPCS configurations now more closely adheres to the AAPCS
specification by enabling -fstrict-volatile-bitfields by default.
IA-32/x86-64
------------
- The new -fsplit-stack option permits programs to use a discontiguous
stack. This is useful for threaded programs, in that it is no
longer necessary to specify the maximum stack size when creating a
thread. This feature is currently only implemented for 32-bit and
64-bit x86 GNU/Linux targets.
- Support for emitting profiler counter calls before function
prologues. This is enabled via a new command-line option -mfentry.
- Optimization for the Intel Core 2 processors is now available
through the -march=core2 and -mtune=core2 options.
- Support for Intel Core i3/i5/i7 processors is now available through
the -march=corei7 and -mtune=corei7 options.
- Support for Intel Core i3/i5/i7 processors with AVX is now available
through the -march=corei7-avx and -mtune=corei7-avx options.
- Support for AMD Bobcat (family 14) processors is now available
through the -march=btver1 and -mtune=btver1 options.
- The default setting (when not optimizing for size) for 32-bit
GNU/Linux and Darwin x86 targets has been changed to -fomit-frame-pointer.
The default can be reverted to -fno-omit-frame-pointer by
configuring GCC with the --enable-frame-pointer configure option.
- Darwin, FreeBSD, Solaris 2, MinGW and Cygwin now all support
__float128 on 32-bit and 64-bit x86 targets.
- AVX floating-point arithmetic can now be enabled by default at
configure time with the new --with-fpmath=avx option.
- The SSA loop prefetching pass is enabled when using -O3 when
optimizing for CPUs where prefetching is beneficial (AMD CPUs newer
than K6).
- Support for TBM (Trailing Bit Manipulation) built-in functions and
code generation is available via -mtbm.
- Support for AMD's BMI (Bit Manipulation) built-in functions and code
generation is available via -mbmi.
MicroBlaze
----------
- Support has been added for the Xilinx MicroBlaze softcore processor
(microblaze-elf) embedded target. This configurable processor is
supported on several Xilinx Spartan and Virtex FPGAs.
MIPS
----
- GCC now supports the Loongson 3A processor. Its canonical -march=
and -mtune= name is loongson3a.
MN10300 / AM33
--------------
- The inline assembly register constraint "A" has been renamed "c".
This constraint is used to select a floating-point register that can
be used as the destination of a multiply-accumulate instruction.
- New inline assembly register constraints "A" and "D" have been
added. These constraint letters resolve to all general registers
when compiling for AM33, and resolve to address registers only or
data registers only when compiling for MN10300.
- The MDR register is represented in the compiler. One can access the
register via the "z" constraint in inline assembly. It can be
marked as clobbered or used as a local register variable via the
"mdr" name. The compiler uses the RETF instruction if the function
does not modify the MDR register, so it is important that inline
assembly properly annotate any usage of the register.
PowerPC/PowerPC64
-----------------
- GCC now supports the Applied Micro Titan processor with -mcpu=titan.
- The -mrecip option has been added, which indicates whether the
reciprocal and reciprocal square root instructions should be used.
- The -mveclibabi=mass option can be used to enable the compiler to
autovectorize mathematical functions using the Mathematical
Acceleration Subsystem library.
- The -msingle-pic-base option has been added, which instructs the
compiler to avoid loading the PIC base register in function
prologues. The PIC base register must be initialized by the runtime
system.
- The -mblock-move-inline-limit option has been added, which enables
the user to control the maximum size of inlined memcpy calls and
similar.
- PowerPC64 GNU/Linux support for applications requiring a large TOC
section has been improved. A new command-line option,
-mcmodel=MODEL, controls this feature; valid values for MODEL are
small, medium, or large.
- The altivec builtin functions vec_ld and vec_st have been modified
to generate the Altivec memory instructions LVX and STVX, even if
the -mvsx option is used. In the initial GCC 4.5 release, these
builtin functions were changed to generate VSX memory reference
instructions instead of Altivec memory instructions, but there are
differences between the two instructions. If the VSX instruction
set is available, you can now use the new builtin functions
vec_vsx_ld and vec_vsx_st which always generates the VSX memory
instructions.
- The GCC compiler on AIX now defaults to a process layout with a
larger data space allowing larger programs to be compiled.
- The GCC long double type on AIX 6.1 and above has reverted to 64 bit
double precision, matching the AIX XL compiler default, because of
missing C99 symbols required by the GCC runtime.
- The default processor scheduling model and tuning for PowerPC64
GNU/Linux and for AIX 6.1 and above now is POWER7.
S/390, zSeries and System z9/z10, IBM zEnterprise z196
------------------------------------------------------
- Support for the zEnterprise z196 processor has been added. When
using the -march=z196 option, the compiler will generate code making
use of the following instruction facilities:
- Conditional load/store
- Distinct-operands
- Floating-point-extension
- Interlocked-access
- Population-count
- The -mtune=z196 option avoids the compare and branch instructions as
well as the load address instruction with an index register as much
as possible and performs instruction scheduling appropriate for the
new out-of-order pipeline architecture.
- When using the -m31 -mzarch options the generated code still
conforms to the 32-bit ABI but uses the general purpose registers as
64-bit registers internally. This requires a Linux kernel saving
the whole 64-bit registers when doing a context switch. Kernels
providing that feature indicate that by the 'highgprs' string in
/proc/cpuinfo.
- The SSA loop prefetching pass is enabled when using -O3.
SPARC
-----
- GCC now supports the LEON series of SPARC V8 processors. The code
generated by the compiler can either be tuned to it by means of the
--with-tune=leon configure option and -mtune=leon compilation
option, or the compiler can be built for the sparc-leon-{elf,linux}
and sparc-leon3-{elf,linux} targets directly.
- GCC has stopped sign/zero-extending parameter registers in the
callee for functions taking parameters with sub-word size in 32-bit
mode, since this is redundant with the specification of the ABI.
GCC has never done so in 64-bit mode since this is also redundant.
Operating Systems
-----------------
Android
-------
- GCC now supports the Bionic C library and provides a convenient way
of building native libraries and applications for the Android
platform. Refer to the documentation of the -mandroid and -mbionic
options for details on building native code. At the moment, Android
support is enabled only for ARM.
Darwin/Mac OS X
---------------
- General
- Initial support for CFString types has been added. This allows GCC
to build projects including the system Core Foundation
frameworks. The GCC Objective-C family supports CFString
"toll-free bridged" as per the Mac OS X system tools. CFString is
also recognized in the context of format attributes and arguments
(see the documentation for format attributes for limitations). At
present, 8-bit character types are supported.
- LTO-support. Darwin has benefited from ongoing work on LTO;
support for this is now stable and enabled by default.
- Object file size reduction. The Darwin zeroed memory allocators
have been re-written to make more use of .zerofill sections. For
non-debug code, this can reduce object file size significantly.
- x86 Architecture
- The -mdynamic-no-pic option has been enabled.
- Code supporting -mdynamic-no-pic optimization has been added and
is applicable to -m32 builds. The compiler bootstrap uses the
option where appropriate.
- The default value for -mtune= has been changed.Since Darwin
systems are primarily Xeon, Core-2 or similar the default tuning
has been changed to -mtune=core2.
- PPC Architecture
- Darwin64 ABI.
- Several significant bugs have been fixed, such that GCC now
produces code compatible with the Darwin64 PowerPC ABI.
- libffi and boehm-gc.The Darwin ports of the libffi and boehm-gc
libraries have been upgraded to include a Darwin64
implementation. This means that powerpc*-*-darwin9 platforms may
now, for example, build Java applications with -m64 enabled.
- Plug-in support has been enabled.
- The -fsection-anchors option is now available although, presently,
not heavily tested.
Solaris 2
---------
- New Features
- Support symbol versioning with the Sun linker.
- Allow libstdc++ to leverage full ISO C99 support on Solaris 10+.
- Support thread-local storage (TLS) with the Sun assembler on
Solaris 2/x86.
- Support TLS on Solaris 8/9 if prerequisites are met.
- Support COMDAT group with the GNU assembler and recent Sun linker.
- Support the Sun assembler visibility syntax.
- Default Solaris 2/x86 to -march=pentium4 (Solaris 10+) resp.
-march=pentiumpro (Solaris 8/9).
- Don't use SSE on Solaris 8/9 x86 by default.
- Enable 128-bit long double (__float128) support on Solaris 2/x86.
- ABI Change
- Change the ABI for returning 8-byte vectors like __m64 in MMX
registers on Solaris 10+/x86 to match the Sun Studio 12.1+
compilers. This is an incompatible change. If you use such
types, you must either recompile all your code with the new
compiler or use the new -mvect8-ret-in-mem option to remain
compatible with previous versions of GCC and Sun Studio.
Windows x86/x86_64
------------------
- Initial support for decimal floating point.
- Support for the __thiscall calling-convention.
- Support for hot-patchable function prologues via the
ms_hook_prologue attribute for x86_64 in addition to 32-bit x86.
- Improvements of stack-probing and stack-allocation mechanisms.
- Support of push/pop-macro pragma as preprocessor command. With
#pragma push_macro("macro-name") the current definition of
macro-name is saved and can be restored with #pragma
pop_macro("macro-name") to its saved definition.
- Enable 128-bit long double (__float128) support on MinGW and Cygwin.
Documentation improvements
==========================
Other significant improvements
==============================
Installation changes
--------------------
- An install-strip make target is provided that installs stripped
executables, and may install libraries with unneeded or debugging
sections stripped.
- On Power7 systems, there is a potential problem if you build the GCC
compiler with a host compiler using options that enables the VSX
instruction set generation. If the host compiler has been patched
so that the vec_ld and vec_st builtin functions generate Altivec
memory instructions instead of VSX memory instructions, then you
should be able to build the compiler with VSX instruction
generation.
Changes for GCC Developers
--------------------------
Note: these changes concern developers that develop GCC itself or
software that integrates with GCC, such as plugins, and not the
general GCC users.
- The gengtype utility, which previously was internal to the GCC build
process, has been enchanced to provide GC root information for
plugins as necessary.
- The old GC allocation interface of ggc_alloc and friends was
replaced with a type-safe alternative.
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 list at gcc@gcc.gnu.org. All
of our lists have public archives.
Copyright (C) Free Software Foundation, Inc.
Verbatim copying and distribution of this entire article is
permitted in any medium, provided this notice is preserved.
Last modified 2011-03-22
|