summaryrefslogtreecommitdiff
path: root/debian/NEWS.gcc
blob: 1f5669df7b4132a2b0425b88be408bd770582b3c (plain)
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
GCC 4.7 Release Series -- Changes, New Features, and Fixes
==========================================================


Caveats
=======

 - The -fconserve-space flag has been deprecated.  The flag had no
   effect for most targets: only targets without a global .bss
   section and without support for switchable sections.  Furthermore,
   the flag only had an effect for G++, where it could result in
   wrong semantics (please refer to the GCC manual for further
   details).  The flag will be removed in GCC 4.8.

 - Support for a number of older systems and recently unmaintained or
   untested target ports of GCC has been declared obsolete in GCC 4.7.
   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:

   - picoChip (picochip-*)

  The following ports for individual systems on particular
  architectures have been obsoleted:

   - IRIX 6.5 (mips-sgi-irix6.5)
   - MIPS OpenBSD (mips*-*-openbsd*)
   - Solaris 8 (*-*-solaris2.8). Details can be found in the announcement.
   - Tru64 UNIX V5.1 (alpha*-dec-osf5.1*)

 - On ARM, when compiling for ARMv6 (but not ARMv6-M), ARMv7-A,
   ARMv7-R, or ARMv7-M, the new option -munaligned-access is active by
   default, which for some source codes generates code that accesses
   memory on unaligned addresses. This will require the kernel of
   those systems to enable such accesses (controlled by CP15 register
   c1, refer to ARM documentation). Alternatively or for compatibility
   with kernels where unaligned accesses are not supported, all code
   has to be compiled with -mno-unaligned-access. Linux/ARM in
   official releases has automatically and unconditionally supported
   unaligned accesses as emitted by GCC due to this option being
   active, since Linux version 2.6.28.

 - Support on ARM for the legacy floating-point accelerator (FPA) and
   the mixed-endian floating-point format that it used has been
   obsoleted. The ports that still use this format have been obsoleted
   as well. Many legacy ARM ports already provide an alternative that
   uses the VFP floating-point format. The obsolete ports will be
   deleted in the next release.  The obsolete ports with alternatives
   are:

   - arm*-*-rtems (use arm*-*-rtemseabi)
   - arm*-*-linux-gnu (use arm*-*-linux-gnueabi)
   - arm*-*-elf (use arm*-*-eabi)
   - arm*-*-uclinux* (use arm*-*-uclinux*eabi)

   Note, however, that these alternatives are not binary compatible
   with their legacy counterparts (although some can support running
   legacy applications).

   The obsolete ports that currently lack a modern alternative are:

   - arm*-*-ecos-elf
   - arm*-*-freebsd
   - arm*-wince-pe*

   New ports that support more recent versions of the architecture are
   welcome.

 - Support for the Maverick co-processor on ARM has been obsoleted. Code to
   support it will be deleted in the next release.

 - Support has been removed for Unix International threads on Solaris 2,
   so the --enable-threads=solaris configure option and the -threads
   compiler option don't work any longer.

 - Support has been removed for the Solaris BSD Compatibility Package,
   which lives in /usr/ucbinclude and /usr/ucblib. It has been removed
   from Solaris 11, and was only intended as a migration aid from
   SunOS 4 to SunOS 5. The -compat-bsd compiler option is not
   recognized any longer.

 - The AVR port's libgcc has been improved and its multilib structure
   has been enhanced. As a result, all objects contributing to an
   application must either be compiled with GCC versions up to 4.6.x
   or with GCC versions 4.7.0 or later.

 - The ARM port's -mwords-little-endian option has been deprecated. It will
   be removed in a future release.

 - Support has been removed for the NetWare x86 configuration obsoleted in
   GCC 4.6.

 - It is no longer possible to use the "l" constraint in MIPS16 asm statements.

 - GCC versions 4.7.0 and 4.7.1 had changes to the C++ standard
   library which affected the ABI in C++11 mode: a data member was
   added to std::list changing its size and altering the definitions
   of some member functions, and std::pair's move constructor was
   non-trivial which altered the calling convention for functions with
   std::pair arguments or return types. The ABI incompatibilities have
   been fixed for GCC version 4.7.2 but as a result C++11 code
   compiled with GCC 4.7.0 or 4.7.1 may be incompatible with C++11
   code compiled with different GCC versions and with C++98/C++03 code
   compiled with any version.

 - On ARM, a bug has been fixed in GCC's implementation of the AAPCS
   rules for the layout of vectors that could lead to wrong code being
   generated. Vectors larger than 8 bytes in size are now by default
   aligned to an 8-byte boundary. This is an ABI change: code that
   makes explicit use of vector types may be incompatible with binary
   objects built with older versions of GCC. Auto-vectorized code is
   not affected by this change. (This change affects GCC versions
   4.7.2 and later.)

 - More information on porting to GCC 4.7 from previous versions of GCC can
   be found in the porting_guide for this release.


General Optimizer Improvements
==============================

 - Support for a new parameter --param case-values-threshold=n was
   added to allow users to control the cutoff between doing switch
   statements as a series of if statements and using a jump table.

 - Link-time optimization (LTO) improvements:

   - Improved scalability and reduced memory usage. Link time
     optimization of Firefox now requires 3GB of RAM on a 64-bit
     system, while over 8GB was needed previously. Linking time has
     been improved, too. The serial stage of linking Firefox has been
     sped up by about a factor of 10.

   - Reduced size of object files and temporary storage used during linking.

   - Streaming performance (both outbound and inbound) has been improved.

   - ld -r is now supported with LTO.

   - Several bug fixes, especially in symbol table handling and merging.

 - Interprocedural optimization improvements:

   - Heuristics now take into account that after inlining code will be
     optimized out because of known values (or properties) of function
     parameters. For example:

       void foo(int a)
       {
         if (a > 10)
           ... huge code ...
       }
       void bar (void)
       {
         foo (0);
       }

     The call of foo will be inlined into bar even when optimizing for
     code size. Constructs based on __builtin_constant_p are now
     understood by the inliner and code size estimates are evaluated a
     lot more realistically.

   - The representation of C++ virtual thunks and aliases (both
     implicit and defined via the alias attribute) has been
     re-engineered.  Aliases no longer pose optimization barriers and
     calls to an alias can be inlined and otherwise optimized.

   - The inter-procedural constant propagation pass has been
     rewritten.  It now performs generic function specialization. For
     example when compiling the following:

       void foo(bool flag)
       {
         if (flag)
           ... do something ...
         else
           ... do something else ...
       }
       void bar (void)
       {
         foo (false);
         foo (true);
         foo (false);
         foo (true);
         foo (false);
         foo (true);
       }

     GCC will now produce two copies of foo. One with flag being true,
     while other with flag being false. This leads to performance
     improvements previously possible only by inlining all calls.
     Cloning causes a lot less code size growth.

   - A string length optimization pass has been added. It attempts to
     track string lengths and optimize various standard C string
     functions like strlen, strchr, strcpy, strcat, stpcpy and their
     _FORTIFY_SOURCE counterparts into faster alternatives. This pass
     is enabled by default at -O2 or above, unless optimizing for
     size, and can be disabled by the - fno-optimize-strlen
     option. The pass can e.g. optimize

       char *bar (const char *a)
       {
         size_t l = strlen (a) + 2;
         char *p = malloc (l); if (p == NULL) return p;
         strcpy (p, a); strcat (p, "/"); return p;
       }

     into:

       char *bar (const char *a)
       {
         size_t tmp = strlen (a);
         char *p = malloc (tmp + 2); if (p == NULL) return p;
         memcpy (p, a, tmp); memcpy (p + tmp, "/", 2); return p;
       }

     or for hosted compilations where stpcpy is available in the runtime
     and headers provide its prototype, e.g.

       void foo (char *a, const char *b, const char *c, const char *d)
       {
         strcpy (a, b); strcat (a, c); strcat (a, d);
       }

     can be optimized into:

       void foo (char *a, const char *b, const char *c, const char *d)
       {
         strcpy (stpcpy (stpcpy (a, b), c), d);
       }


New Languages and Language specific improvements
================================================

 - Version 3.1 of the OpenMP_specification is now supported for the C, C++,
   and Fortran compilers.


Ada
---

 - The command-line option -feliminate-unused-debug-types has been re-
   enabled by default, as it is for the other languages, leading to a
   reduction in debug info size of 12.5% and more for relevant cases,
   as well as to a small compilation speedup.


C family
--------

 - A new built-in, __builtin_assume_aligned, has been added, through which
   the compiler can be hinted about pointer alignment and can use it to
   improve generated code.

 - A new -Wunused-local-typedefs warning was added for C, C++,
   Objective-C and Objective-C++.  This warning diagnoses typedefs
   locally defined in a function, and otherwise not used.

 - A new experimental -ftrack-macro-expansion option was added for C,
   C++, Objective-C, Objective-C++ and Fortran.  It allows the
   compiler to emit diagnostic about the current macro expansion
   stack when a compilation error occurs in a macro expansion.

 - Experimental support for transactional memory has been added. It includes
   support in the compiler, as well as a supporting runtime library called
   libitm. To compile code with transactional memory constructs, use the -
   fgnu-tm option.

   Support is currently available for Alpha, ARM, PowerPC, SH, SPARC, and
   32-bit/64-bit x86 platforms.

   For more details on transactional memory see the_GCC_WiKi.

 - Support for atomic operations specifying the C++11/C11 memory model has
   been added. These new __atomic routines replace the existing __sync
   built-in routines.

   Atomic support is also available for memory blocks. Lock-free
   instructions will be used if a memory block is the same size and
   alignment as a supported integer type. Atomic operations which do not
   have lock-free support are left as function calls. A set of library
   functions is available on the GCC atomic wiki in the "External Atomics
   Library" section.

   For more details on the memory models and features, see the atomic_wiki.

 - When a binary operation is performed on vector types and one of the
   operands is a uniform vector, it is possible to replace the vector with
   the generating element. For example:

     typedef int v4si __attribute__ ((vector_size (16)));
     v4si res, a = {1,2,3,4};
     int x;

     res = 2 + a;  /* means {2,2,2,2} + a  */
     res = a - x;  /* means a - {x,x,x,x}  */


C
-

 - There is support for some more features from the C11 revision of the ISO
   C standard. GCC now accepts the options -std=c11 and -std=gnu11, in
   addition to the previous -std=c1x and -std=gnu1x.

   - Unicode strings (previously supported only with options such as
     -std=gnu11, now supported with -std=c11), and the predefined macros
     __STDC_UTF_16__ and __STDC_UTF_32__.

   - Nonreturning functions (_Noreturn and <stdnoreturn.h>).

   - Alignment support (_Alignas, _Alignof, max_align_t, <stdalign.h>).

   - A built-in function __builtin_complex is provided to support C
     library implementation of the CMPLX family of macros.


C++
---

 - G++ now accepts the -std=c++11, -std=gnu++11, and -Wc++11-compat options,
   which are equivalent to -std=c++0x, -std=gnu++0x, and -Wc++0x-compat,
   respectively.

 - G++ now implements C++11 extended friend syntax:

     template<class W>
     class Q
     {
       static const int I = 2;
     public:
       friend W;
     };

     struct B
     {
       int ar[Q<B>::I];
     };

 - Thanks to Ville Voutilainen, G++ now implements C++11 explicit override
   control.

     struct B {
       virtual void f() const final;
       virtual void f(int);
     };

     struct D : B {
       void f() const;            // error: D::f attempts to
     override final B::f
       void f(long) override;     // error: doesn't override
     anything
       void f(int) override;      // ok
     };

     struct E final { };
     struct F: E { }; // error: deriving from final class

 - G++ now implements C++11 non-static data member initializers.

     struct A {
       int i = 42;
     } a; // initializes a.i to 42

 - Thanks to Ed Smith-Rowland, G++ now implements C++11 user-defined
   literals.

     // Not actually a good approximation.  :)
     constexpr long double operator"" _degrees (long double d)
     { return d * 0.0175; }
     long double pi = 180.0_degrees;

 - G++ now implements C++11 alias-declarations.

     template <class T> using Ptr = T*;
     Ptr<int> ip;  // decltype(ip) is int*

 - Thanks to Ville Voutilainen and Pedro Lamarão, G++ now implements C++11
   delegating constructors.

     struct A {
       A(int);
       A(): A(42) { } // delegate to the A(int) constructor
     };

 - G++ now fully implements C++11 atomic classes rather than just integer
   derived classes.

     class POD {
       int a;
       int b;
     };
     std::atomic<POD> my_atomic_POD;

 - G++ now sets the predefined macro __cplusplus to the correct value,
   199711L for C++98/03, and 201103L for C++11.

 - G++ now correctly implements the two-phase lookup rules such that an
   unqualified name used in a template must have an appropriate declaration
   found either in scope at the point of definition of the template or by
   argument-dependent lookup at the point of instantiation. As a result,
   code that relies on a second unqualified lookup at the point of
   instantiation to find functions declared after the template or in
   dependent bases will be rejected. The compiler will suggest ways to fix
   affected code, and using the -fpermissive compiler flag will allow the
   code to compile with a warning.

     template <class T>
     void f() { g(T()); } // error, g(int) not found by argument-
     dependent lookup
     void g(int) { } // fix by moving this declaration before the
     declaration of f

     template <class T>
     struct A: T {
       // error, B::g(B) not found by argument-dependent lookup
       void f() { g(T()); } // fix by using this->g or A::g
     };

     struct B { void g(B); };

     int main()
     {
       f<int>();
       A<B>().f();
     }

 - G++ now properly re-uses stack space allocated for temporary objects when
   their lifetime ends, which can significantly lower stack consumption for
   some C++ functions. As a result of this, some code with undefined
   behavior will now break:

     const int &amp;f(const int &amp;i) { return i; }
     ....
     const int &amp;x = f(1);
     const int &amp;y = f(2);

   Here, x refers to the temporary allocated to hold the 1 argument, which
   only lives until the end of the initialization; it immediately becomes a
   dangling reference. So the next statement re-uses the stack slot to hold
   the 2 argument, and users of x get that value instead.
   Note that this should not cause any change of behavior for temporaries of
   types with non-trivial destructors, as they are already destroyed at end
   of full-expression; the change is that now the storage is released as
   well.

 - A new command-line option -Wdelete-non-virtual-dtor has been added to
   warn when delete is used to destroy an instance of a class which has
   virtual functions and non-virtual destructor. It is unsafe to delete an
   instance of a derived class through a pointer to a base class if the base
   class does not have a virtual destructor. This warning is enabled by -Wall.

 - A new command-line option -Wzero-as-null-pointer-constant has been added
   to warn when a literal '0' is used as null pointer constant. It can be
   useful to facilitate the conversion to nullptr in C++11.

 - As per C++98, access-declarations are now deprecated by G++. Using-
   declarations are to be used instead. Furthermore, some efforts have been
   made to improve the support of class scope using-declarations. In
   particular, using-declarations referring to a dependent type now work as
   expected (bug_c++/14258).

 - The ELF symbol visibility of a template instantiation is now properly
   constrained by the visibility of its template arguments (bug_c++/35688).


Runtime Library (libstdc++)
---------------------------

 - Improved_experimental_support_for_the_new_ISO_C++_standard,_C++11,
   including:

   - using noexcept in most of the library;

   - implementations of pointer_traits, allocator_traits and
     scoped_allocator_adaptor;

   - uses-allocator construction for tuple;

   - vector meets the allocator-aware container requirements;

   - replacing monotonic_clock with steady_clock;

   - enabling the thread support library on most POSIX targets;

   - many small improvements to conform to the FDIS.

 - Added --enable-clocale=newlib configure option.

 - Debug Mode iterators for unordered associative containers.

 - Avoid polluting the global namespace and do not include <unistd.h>.


Fortran
-------

 - The compile flag -fstack-arrays has been added, which causes all local
   arrays to be put on stack memory. For some programs this will improve the
   performance significantly. If your program uses very large local arrays,
   it is possible that you will have to extend your runtime limits for stack
   memory.

 - The -Ofast flag now also implies -fno-protect-parens and -fstack-arrays.

 - Front-end optimizations can now be selected by the -ffrontend-optimize
   option and deselected by the -fno-frontend-optimize option.

 - When front-end optimization removes a function call, -Wfunction-
   elimination warns about that.

 - When performing front-end-optimization, the -faggressive-function-
   elimination option allows the removal of duplicate function calls even
   for impure functions.

 - The flag -Wreal-q-constant has been added, which warns if floating-point
   literals have been specified using q (such as 1.0q0); the q marker is now
   supported as a vendor extension to denote quad precision (REAL(16) or, if
   not available, REAL(10)). Consider using a kind parameter (such as in
   1.0_qp) instead, which can be obtained via SELECTED_REAL_KIND.

 - The GFORTRAN_USE_STDERR environment variable has been removed. GNU
   Fortran now always prints error messages to standard error. If you wish
   to redirect standard error, please consult the manual for your OS, shell,
   batch environment etc. as appropriate.

 - The -fdump-core option and GFORTRAN_ERROR_DUMPCORE environment variable
   have been removed. When encountering a serious error, gfortran will now
   always abort the program. Whether a core dump is generated depends on the
   user environment settings; see the ulimit -c setting for POSIX shells,
   limit coredumpsize for C shells, and the WER_user-mode_dumps_settings on
   Windows.

 - The -fbacktrace option is now enabled by default. When encountering a
   fatal error, gfortran will attempt to print a backtrace to standard error
   before aborting. It can be disabled with -fno-backtrace. Note: On POSIX
   targets with the addr2line utility from GNU binutils, GNU Fortran can
   print a backtrace with function name, file name, line number information
   in addition to the addresses; otherwise only the addresses are printed.

 - Fortran_2003:

   - Generic interface names which have the same name as derived types
     are now supported, which allows to write constructor functions.
     Note that Fortran does not support static constructor functions;
     only default initialization or an explicit structure-constructor
     initialization are available.

   - Polymorphic (class) arrays are now supported.

 - Fortran_2008:

   - Support for the DO CONCURRENT construct has been added, which
     allows the user to specify that individual loop iterations have no
     interdependencies.

   - Coarrays: Full single-image support except for polymorphic
     coarrays. Additionally, preliminary support for multiple images via
     an MPI-based coarray_communication_library has been added. Note:
     The library version is not yet usable as remote coarray access is
     not yet possible.

 - TS_29113:

   - New flag -std=f2008ts permits programs that are expected to conform
     to the Fortran 2008 standard and the draft Technical Specification
     (TS) 29113 on Further Interoperability of Fortran with C.

   - The OPTIONAL attribute is now allowed for dummy arguments of BIND
     (C) procedures.
     
   - The RANK intrinsic has been added.

   - The implementation of the ASYNCHRONOUS attribute in GCC is
     compatible with the candidate draft of TS 29113 (since GCC 4.6).


Go
--

 - GCC 4.7 implements the Go_1_language_standard. The library support in
   4.7.0 is not quite complete, due to release timing. Release 4.7.1 is
   expected to include complete support.

 - Go has been tested on GNU/Linux and Solaris platforms. It may work on
   other platforms as well.


New Targets and Target Specific Improvements
============================================

ARM
---

 - GCC now supports the Cortex-A7 processor implementing the v7-a version of
   the architecture using the option -mcpu=cortex-a7.

 - The default vector size in auto-vectorization for NEON is now 128 bits.
   If vectorization fails thusly, the vectorizer tries again with 64-bit
   vectors.

 - A new option -mvectorize-with-neon-double was added to allow users to
   change the vector size to 64 bits.


AVR
---

 - GCC now supports the XMEGA architecture. This requires GNU binutils 2.22
   or later.

 - Support for the named_address_spaces __flash, __flash1, …, __flash5 and
   __memx has been added. These address spaces locate read-only data in
   flash memory and allow reading from flash memory by means of ordinary C
   code, i.e. without the need of (inline) assembler code:

     const __flash int values[] = { 42, 31 };

     int add_values (const __flash int *p, int i)
     {
         return values[i] + *p;
     }

 - Support has been added for a new AVR-specific configure option
   --with-avrlibc=yes in order to arrange for better integration of
   AVR-Libc. This configure option is supported in avr-gcc 4.7.2 and
   newer and will only take effect in non-RTEMS configurations. If
   avr-gcc is configured for RTEMS, the option will be ignored which is
   the same as specifying --with-avrlibc=no. See PR54461 for more
   technical details.

 - Support for AVR-specific built-in_functions has been added.

 - Support has been added for the signed and unsigned 24-bit scalar integer
   types __int24 and __uint24.

 - New command-line options -maccumulate-args, -mbranch-cost=cost and
   -mstrict-X were added to allow better fine-tuning of code optimization.

 - Many optimizations to:

   - 64-bit integer arithmetic

   - Widening multiplication

   - Integer division by a constant

   - Avoid constant reloading in multi-byte instructions.

   - Micro-optimizations for special instruction sequences.

   - Generic built-in functions like __builtin_ffs*, __builtin_clz*, etc.

   - If-else decision trees generated by switch instructions

   - Merging of data located in flash memory

   - New libgcc variants for devices with 8-bit wide stack pointer

 - Better documentation:

   - Handling of EIND and indirect jumps on devices with more than 128
     KiB of program memory.

   - Handling of the RAMPD, RAMPX, RAMPY and RAMPZ special function
     registers.

   - Function attributes OS_main and OS_task.
   - AVR-specific built-in macros.


C6X
---

 - Support has been added for the Texas Instruments C6X family of processors.


CR16
----

 - Support has been added for National Semiconductor's CR16 architecture.


Epiphany
--------

 - Support has been added for Adapteva's Epiphany architecture.


IA-32/x86-64
------------

 - Support for Intel AVX2 intrinsics, built-in functions and code generation
   is available via -mavx2.

 - Support for Intel BMI2 intrinsics, built-in functions and code generation
   is available via -mbmi2.

 - Implementation and automatic generation of __builtin_clz* using the lzcnt
   instruction is available via -mlzcnt.

 - Support for Intel FMA3 intrinsics and code generation is available via
   -mfma.

 - A new -mfsgsbase command-line option is available that makes GCC generate
   new segment register read/write instructions through dedicated built-ins.

 - Support for the new Intel rdrnd instruction is available via -mrdrnd.

 - Two additional AVX vector conversion instructions are available via
   -mf16c.

 - Support for new Intel processor codename IvyBridge with RDRND, FSGSBASE
   and F16C is available through -march=core-avx-i.

 - Support for the new Intel processor codename Haswell with AVX2, FMA, BMI,
   BMI2, LZCNT is available through -march=core-avx2.

 - Support for new AMD family 15h processors (Piledriver core) is now
   available through -march=bdver2 and -mtune=bdver2 options.

 - Support for the_x32_psABI is now available through the -mx32 option.

 - Windows mingw targets are using the -mms-bitfields option by default.

 - Windows x86 targets are using the __thiscall calling convention for C++
   class-member functions.

 - Support for the configure option --with-threads=posix for Windows mingw
   targets.


MIPS
----

 - GCC now supports thread-local storage (TLS) for MIPS16. This requires GNU
   binutils 2.22 or later.

 - GCC can now generate code specifically for the Cavium Octeon+ and Octeon2
   processors. The associated command-line options are -march=octeon+ and
   -march=octeon2 respectively. Both options require GNU binutils 2.22 or
   later.

 - GCC can now work around certain 24k errata, under the control of the
   command-line option -mfix-24k. These workarounds require GNU binutils
   2.20 or later.

 - 32-bit MIPS GNU/Linux targets such as mips-linux-gnu can now build n32
   and n64 multilibs. The result is effectively a 64-bit GNU/Linux toolchain
   that generates 32-bit code by default. Use the configure-time option
   --enable-targets=all to select these extra multilibs.

 - Passing -fno-delayed-branch now also stops the assembler from
   automatically filling delay slots.


PowerPC/PowerPC64
-----------------

 - Vectors of type vector long long or vector long are passed and returned
   using the same method as other vectors with the VSX instruction set.
   Previously the GCC compiler did not adhere to the ABI for 128-bit vectors
   with 64-bit integer base types (PR 48857). This will also be fixed in the
   GCC 4.6.1 and 4.5.4 releases.

 - A new option -mno-pointers-to-nested-functions was added to allow AIX 32-
   bit/64-bit and GNU/Linux 64-bit PowerPC users to specify that the
   compiler should not load up the chain register (r11) before calling a
   function through a pointer. If you use this option, you cannot call
   nested functions through a pointer, or call other languages that might
   use the static chain.

 - A new option msave-toc-indirect was added to allow AIX 32-bit/64-bit and
   GNU/Linux 64-bit PowerPC users control whether we save the TOC in the
   prologue for indirect calls or generate the save inline. This can speed
   up some programs that call through a function pointer a lot, but it can
   slow down other functions that only call through a function pointer in
   exceptional cases.

 - The PowerPC port will now enable machine-specific built-in functions when
   the user switches the target machine using the #pragma GCC target or
   __attribute__ ((__target__ ("target"))) code sequences. In addition, the
   target macros are updated. However, due to the way the -save-temps switch
   is implemented, you won't see the effect of these additional macros being
   defined in preprocessor output.


SH
--

 - A new option -msoft-atomic has been added. When it is specified, GCC will
   generate GNU/Linux-compatible gUSA atomic sequences for the new __atomic
   routines.

 - Since it is neither supported by GAS nor officially documented, code
   generation for little endian SH2A has been disabled. Specifying -ml with
   -m2a* will now result in a compiler error.

 - The defunct -mbranch-cost option has been fixed.

 - Some improvements to the generated code of:

   - Utilization of the tst #imm,R0 instruction.

   - Dynamic shift instructions on SH2A.

   - Integer absolute value calculations.


SPARC
-----

 - The option -mflat has been reinstated. When it is specified, the compiler
   will generate code for a single register window model. This is
   essentially a new implementation and the corresponding debugger support
   has been added to GDB 7.4.

 - Support for the options -mtune=native and -mcpu=native has been added on
   selected native platforms (GNU/Linux and Solaris).

 - Support for the SPARC T3 (Niagara 3) processor has been added.

 - VIS:

   - An intrinsics header visintrin.h has been added.
   - Builtin intrinsics for the VIS 1.0 edge handling and pixel compare
     instructions have been added.
   - The little-endian version of alignaddr is now supported.
   - When possible, VIS builtins are marked const, which should increase
     the compiler's ability to optimize VIS operations.
   - The compiler now properly tracks the %gsr register and how it
     behaves as an input for various VIS instructions.
   - Akin to fzero, the compiler can now generate fone instructions in
     order to set all of the bits of a floating-point register to 1.
   - The documentation for the VIS intrinsics in the GCC manual has been
     brought up to date and many inaccuracies were fixed.
   - Intrinsics for the VIS 2.0 bmask, bshuffle, and non-condition-code
     setting edge instructions have been added. Their availability is
     controlled by the new -mvis2 and -mno-vis2 options. They are
     enabled by default on UltraSPARC-III and later CPUs.

 - Support for UltraSPARC Fused Multiply-Add floating-point extensions has
   been added. These instructions are enabled by default on SPARC T3
  (Niagara 3) and later CPUs.


TILE-Gx/TILEPro
---------------

 - Support has been added for the Tilera TILE-Gx and TILEPro families of
   processors.


Other significant improvements
==============================

 - A new option (-grecord-gcc-switches) was added that appends compiler
   command-line options that might affect code generation to the
   DW_AT_producer attribute string in the DWARF debugging information.

 - GCC now supports various new GNU extensions to the DWARF debugging
   information format, like entry_value and call_site information, typed
   DWARF_stack or a_more_compact_macro_representation. Support for these
   extensions has been added to GDB 7.4. They can be disabled through the
   -gstrict-dwarf command-line option.


GCC 4.7.1
=========

This is the list of problem reports (PRs) from GCC's bug tracking
system that are known to be fixed in the 4.7.1 release. This list
might not be complete (that is, it is possible that some PRs that have
been fixed are not listed here).

http://gcc.gnu.org/bugzilla/buglist.cgi?bug_status=RESOLVED&amp;resolution=FIXED&amp;target_milestone=4.7.1

The Go frontend in the 4.7.1 release fully supports the Go 1 language
standard (http://weekly.golang.org/doc/go1.html).


GCC 4.7.2
=========

This is the list of problem reports (PRs) from GCC's bug tracking
system that are known to be fixed in the 4.7.2 release. This list
might not be complete (that is, it is possible that some PRs that have
been fixed are not listed here).

http://gcc.gnu.org/bugzilla/buglist.cgi?bug_status=RESOLVED&amp;resolution=FIXED&amp;target_milestone=4.7.2


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.

These pages are maintained_by_the_GCC_team.

Last modified 2012-03-26.