ONEWS revision 1.1
1This file contains information about GCC releases up to GCC 2.8.1, and 2a tiny bit of information on EGCS. 3 4For details of changes in EGCS releases and GCC 2.95 and later releases, 5see the release notes on the GCC web site or the file NEWS which contains 6the most relevant parts of those release notes in text form. 7 8Changes in GCC for EGCS (that are not listed in the web release notes) 9--------------------------------------------------------------------- 10 11The compiler now supports the "ADDRESSOF" optimization which can significantly 12reduce the overhead for certain inline calls (and inline calls in general). 13 14Compile time for certain programs using large constant initializers has been 15improved (affects glibc significantly). 16 17Various improvements have been made to better support cross compilations. They 18are still not easy, but they are improving. 19 20Target-specific changes: 21 22 M32r: Major improvements to this port. 23 24 Arm: Includes Thumb and super interworking support. 25 26Noteworthy changes in GCC version 2.8.1 27--------------------------------------- 28 29Numerous bugs have been fixed and some minor performance 30improvements (compilation speed) have been made. 31 32Noteworthy changes in GCC version 2.8.0 33--------------------------------------- 34 35A major change in this release is the addition of a framework for 36exception handling, currently used by C++. Many internal changes and 37optimization improvements have been made. These increase the 38maintainability and portability of GCC. GCC now uses autoconf to 39compute many host parameters. 40 41The following lists changes that add new features or targets. 42 43See cp/NEWS for new features of C++ in this release. 44 45New tools and features: 46 47 The Dwarf 2 debugging information format is supported on ELF systems, and 48 is the default for -ggdb where available. It can also be used for C++. 49 The Dwarf version 1 debugging format is also permitted for C++, but 50 does not work well. 51 52 gcov.c is provided for test coverage analysis and branch profiling 53 analysis is also supported; see -fprofile-arcs, -ftest-coverage, 54 and -fbranch-probabilities. 55 56 Support for the Checker memory checking tool. 57 58 New switch, -fstack-check, to check for stack overflow on systems that 59 don't have such built into their ABI. 60 61 New switches, -Wundef and -Wno-undef to warn if an undefined identifier 62 is evaluated in an #if directive. 63 64 Options -Wall and -Wimplicit now cause GCC to warn about implicit int 65 in declarations (e.g. `register i;'), since the C Standard committee 66 has decided to disallow this in the next revision of the standard; 67 -Wimplicit-function-declarations and -Wimplicit-int are subsets of 68 this. 69 70 Option -Wsign-compare causes GCC to warn about comparison of signed and 71 unsigned values. 72 73 Add -dI option of cccp for cxref. 74 75New features in configuration, installation and specs file handling: 76 77 New option --enable-c-cpplib to configure script. 78 79 You can use --with-cpu on the configure command to specify the default 80 CPU that GCC should generate code for. 81 82 The -specs=file switch allows you to override default specs used in 83 invoking programs like cc1, as, etc. 84 85 Allow including one specs file from another and renaming a specs 86 variable. 87 88 You can now relocate all GCC files with a single environment variable 89 or a registry entry under Windows 95 and Windows NT. 90 91Changes in Objective-C: 92 93 The Objective-C Runtime Library has been made thread-safe. 94 95 The Objective-C Runtime Library contains an interface for creating 96 mutexes, condition mutexes, and threads; it requires a back-end 97 implementation for the specific platform and/or thread package. 98 Currently supported are DEC/OSF1, IRIX, Mach, OS/2, POSIX, PCThreads, 99 Solaris, and Windows32. The --enable-threads parameter can be used 100 when configuring GCC to enable and select a thread back-end. 101 102 Objective-C is now configured as separate front-end language to GCC, 103 making it more convenient to conditionally build it. 104 105 The internal structures of the Objective-C Runtime Library have 106 changed sufficiently to warrant a new version number; now version 8. 107 Programs compiled with an older version must be recompiled. 108 109 The Objective-C Runtime Library can be built as a DLL on Windows 95 110 and Windows NT systems. 111 112 The Objective-C Runtime Library implements +load. 113 114The following new targets are supported (see also list under each 115individual CPU below): 116 117 Embedded target m32r-elf. 118 Embedded Hitachi Super-H using ELF. 119 RTEMS real-time system on various CPU targets. 120 ARC processor. 121 NEC V850 processor. 122 Matsushita MN10200 processor. 123 Matsushita MN10300 processor. 124 Sparc and PowerPC running on VxWorks. 125 Support both glibc versions 1 and 2 on Linux-based GNU systems. 126 127New features for DEC Alpha systems: 128 129 Allow detailed specification of IEEE fp support: 130 -mieee, -mieee-with-inexact, and -mieee-conformant 131 -mfp-trap-mode=xxx, -mfp-round-mode=xxx, -mtrap-precision=xxx 132 -mcpu=xxx for CPU selection 133 Support scheduling parameters for EV5. 134 Add support for BWX, CIX, and MAX instruction set extensions. 135 Support Linux-based GNU systems. 136 Support VMS. 137 138Additional supported processors and systems for MIPS targets: 139 140 MIPS4 instruction set. 141 R4100, R4300 and R5000 processors. 142 N32 and N64 ABI. 143 IRIX 6.2. 144 SNI SINIX. 145 146New features for Intel x86 family: 147 148 Add scheduling parameters for Pentium and Pentium Pro. 149 Support stabs on Solaris-x86. 150 Intel x86 processors running the SCO OpenServer 5 family. 151 Intel x86 processors running DG/UX. 152 Intel x86 using Cygwin32 or Mingw32 on Windows 95 and Windows NT. 153 154New features for Motorola 68k family: 155 156 Support for 68060 processor. 157 More consistent switches to specify processor. 158 Motorola 68k family running AUX. 159 68040 running pSOS, ELF object files, DBX debugging. 160 Coldfire variant of Motorola m68k family. 161 162New features for the HP PA RISC: 163 164 -mspace and -mno-space 165 -mlong-load-store and -mno-long-load-store 166 -mbig-switch -mno-big-switch 167 168 GCC on the PA requires either gas-2.7 or the HP assembler; for best 169 results using GAS is highly recommended. GAS is required for -g and 170 exception handling support. 171 172New features for SPARC-based systems: 173 174 The ultrasparc cpu. 175 The sparclet cpu, supporting only a.out file format. 176 Sparc running SunOS 4 with the GNU assembler. 177 Sparc running the Linux-based GNU system. 178 Embedded Sparc processors running the ELF object file format. 179 -mcpu=xxx 180 -mtune=xxx 181 -malign-loops=xxx 182 -malign-jumps=xxx 183 -malign-functions=xxx 184 -mimpure-text and -mno-impure-text 185 186 Options -mno-v8 and -mno-sparclite are no longer supported on SPARC 187 targets. Options -mcypress, -mv8, -msupersparc, -msparclite, -mf930, 188 and -mf934 are deprecated and will be deleted in GCC 2.9. Use 189 -mcpu=xxx instead. 190 191New features for rs6000 and PowerPC systems: 192 193 Solaris 2.51 running on PowerPC's. 194 The Linux-based GNU system running on PowerPC's. 195 -mcpu=604e,602,603e,620,801,823,mpc505,821,860,power2 196 -mtune=xxx 197 -mrelocatable-lib, -mno-relocatable-lib 198 -msim, -mmve, -memb 199 -mupdate, -mno-update 200 -mfused-madd, -mno-fused-madd 201 202 -mregnames 203 -meabi 204 -mcall-linux, -mcall-solaris, -mcall-sysv-eabi, -mcall-sysv-noeabi 205 -msdata, -msdata=none, -msdata=default, -msdata=sysv, -msdata=eabi 206 -memb, -msim, -mmvme 207 -myellowknife, -mads 208 wchar_t is now of type long as per the ABI, not unsigned short. 209 -p/-pg support 210 -mcpu=403 now implies -mstrict-align. 211 Implement System V profiling. 212 213 Aix 4.1 GCC targets now default to -mcpu=common so that programs 214 compiled can be moved between rs6000 and powerpc based systems. A 215 consequence of this is that -static won't work, and that some programs 216 may be slightly slower. 217 218 You can select the default value to use for -mcpu=xxx on rs6000 and 219 powerpc targets by using the --with-cpu=xxx option when configuring the 220 compiler. In addition, a new options, -mtune=xxx was added that 221 selects the machine to schedule for but does not select the 222 architecture level. 223 224 Directory names used for storing the multilib libraries on System V 225 and embedded PowerPC systems have been shortened to work with commands 226 like tar that have fixed limits on pathname size. 227 228New features for the Hitachi H8/300(H): 229 230 -malign-300 231 -ms (for the Hitachi H8/S processor) 232 -mint32 233 234New features for the ARM: 235 236 -march=xxx, -mtune=xxx, -mcpu=xxx 237 Support interworking with Thumb code. 238 ARM processor with a.out object format, COFF, or AOF assembler. 239 ARM on "semi-hosted" platform. 240 ARM running NetBSD. 241 ARM running the Linux-based GNU system. 242 243New feature for Solaris systems: 244 245 GCC installation no longer makes a copy of system include files, 246 thus insulating GCC better from updates to the operating system. 247 248 249Noteworthy changes in GCC version 2.7.2 250--------------------------------------- 251 252A few bugs have been fixed (most notably the generation of an 253invalid assembler opcode on some RS/6000 systems). 254 255Noteworthy changes in GCC version 2.7.1 256--------------------------------------- 257 258This release fixes numerous bugs (mostly minor) in GCC 2.7.0, but 259also contains a few new features, mostly related to specific targets. 260 261Major changes have been made in code to support Windows NT. 262 263The following new targets are supported: 264 265 2.9 BSD on PDP-11 266 Linux on m68k 267 HP/UX version 10 on HP PA RISC (treated like version 9) 268 DEC Alpha running Windows NT 269 270When parsing C, GCC now recognizes C++ style `//' comments unless you 271specify `-ansi' or `-traditional'. 272 273The PowerPC System V targets (powerpc-*-sysv, powerpc-*-eabi) now use the 274calling sequence specified in the System V Application Binary Interface 275Processor Supplement (PowerPC Processor ABI Supplement) rather than the calling 276sequence used in GCC version 2.7.0. That calling sequence was based on the AIX 277calling sequence without function descriptors. To compile code for that older 278calling sequence, either configure the compiler for powerpc-*-eabiaix or use 279the -mcall-aix switch when compiling and linking. 280 281Noteworthy changes in GCC version 2.7.0 282--------------------------------------- 283 284GCC now works better on systems that use ".obj" and ".exe" instead of 285".o" and no extension. This involved changes to the driver program, 286gcc.c, to convert ".o" names to ".obj" and to GCC's Makefile to use 287".obj" and ".exe" in filenames that are not targets. In order to 288build GCC on such systems, you may need versions of GNU make and/or 289compatible shells. At this point, this support is preliminary. 290 291Object file extensions of ".obj" and executable file extensions of 292".exe" are allowed when using appropriate version of GNU Make. 293 294Numerous enhancements were made to the __attribute__ facility including 295more attributes and more places that support it. We now support the 296"packed", "nocommon", "noreturn", "volatile", "const", "unused", 297"transparent_union", "constructor", "destructor", "mode", "section", 298"align", "format", "weak", and "alias" attributes. Each of these 299names may also be specified with added underscores, e.g., "__packed__". 300__attribute__ may now be applied to parameter definitions, function 301definitions, and structure, enum, and union definitions. 302 303GCC now supports returning more structures in registers, as specified by 304many calling sequences (ABIs), such as on the HP PA RISC. 305 306A new option '-fpack-struct' was added to automatically pack all structure 307members together without holes. 308 309There is a new library (cpplib) and program (cppmain) that at some 310point will replace cpp (aka cccp). To use cppmain as cpp now, pass 311the option CCCP=cppmain to make. The library is already used by the 312fix-header program, which should speed up the fixproto script. 313 314New options for supported targets: 315 316 GNU on many targets. 317 NetBSD on MIPS, m68k, VAX, and x86. 318 LynxOS on x86, m68k, Sparc, and RS/6000. 319 VxWorks on many targets. 320 321 Windows/NT on x86 architecture. Initial support for Windows/NT on Alpha 322 (not fully working). 323 324 Many embedded targets, specifically UDI on a29k, aout, coff, elf, 325 and vsta "operating systems" on m68k, m88k, mips, sparc, and x86. 326 327Additional support for x86 (i386, i486, and Pentium): 328 329 Work with old and new linkers for Linux-based GNU systems, 330 supporting both a.out and ELF. 331 FreeBSD on x86. 332 Stdcall convention. 333 -malign-double, -mregparm=, -malign-loops= and -malign-jumps= switches. 334 On ISC systems, support -Xp like -posix. 335 336Additions for RS/6000: 337 338 Instruction scheduling information for PowerPC 403. 339 AIX 4.1 on PowerPC. 340 -mstring and -mno-string. 341 -msoft-float and floating-point emulation included. 342 Preliminary support for PowerPC System V.4 with or without the GNU as. 343 Preliminary support for EABI. 344 Preliminary support for 64-bit systems. 345 Both big and little endian systems. 346 347New features for MIPS-based systems: 348 349 r4650. 350 mips4 and R8000. 351 Irix 6.0. 352 64-bit ABI. 353 Allow dollar signs in labels on SGI/Irix 5.x. 354 355New support for HP PA RISC: 356 357 Generation of PIC (requires binutils-2.5.2.u6 or later). 358 HP-UX version 9 on HP PA RISC (dynamically links even with -g). 359 Processor variants for HP PA RISC: 700, 7100, and 7100LC. 360 Automatic generation of long calls when needed. 361 -mfast-indirect-calls for kernels and static binaries. 362 363 The called routine now copies arguments passed by invisible reference, 364 as required by the calling standard. 365 366Other new miscellaneous target-specific support: 367 368 -mno-multm on a29k. 369 -mold-align for i960. 370 Configuration for "semi-hosted" ARM. 371 -momit-leaf-frame-pointer for M88k. 372 SH3 variant of Hitachi Super-H and support both big and little endian. 373 374Changes to Objective-C: 375 376 Bare-bones implementation of NXConstantString has been added, 377 which is invoked by the @"string" directive. 378 379 Class * has been changed to Class to conform to the NextSTEP and 380 OpenStep runtime. 381 382 Enhancements to make dynamic loading easier. 383 384 The module version number has been updated to Version 7, thus existing 385 code will need to be recompiled to use the current run-time library. 386 387GCC now supports the ISO Normative Addendum 1 to the C Standard. 388As a result: 389 390 The header <iso646.h> defines macros for C programs written 391 in national variants of ISO 646. 392 393 The following digraph tokens are supported: 394 <: :> <% %> %: %:%: 395 These behave like the following, respectively: 396 [ ] { } # ## 397 398 Digraph tokens are supported unless you specify the `-traditional' 399 option; you do not need to specify `-ansi' or `-trigraphs'. Except 400 for contrived and unlikely examples involving preprocessor 401 stringizing, digraph interpretation doesn't change the meaning of 402 programs; this is unlike trigraph interpretation, which changes the 403 meanings of relatively common strings. 404 405 The macro __STDC_VERSION__ has the value 199409L. 406 407 As usual, for full conformance to the standard, you also need a 408 C library that conforms. 409 410The following lists changes that have been made to g++. If some 411features mentioned below sound unfamiliar, you will probably want to 412look at the recently-released public review copy of the C++ Working 413Paper. For PostScript and PDF (Adobe Acrobat) versions, see the 414archive at ftp://research.att.com/dist/stdc++/WP. For HTML and ASCII 415versions, see ftp://ftp.cygnus.com/pub/g++. On the web, see 416http://www.cygnus.com/~mrs/wp-draft. 417 418The scope of variables declared in the for-init-statement has been changed 419to conform to http://www.cygnus.com/~mrs/wp-draft/stmt.html#stmt.for; as a 420result, packages such as groff 1.09 will not compile unless you specify the 421-fno-for-scope flag. PLEASE DO NOT REPORT THIS AS A BUG; this is a change 422mandated by the C++ standardization committee. 423 424Binary incompatibilities: 425 426 The builtin 'bool' type is now the size of a machine word on RISC targets, 427 for code efficiency; it remains one byte long on CISC targets. 428 429 Code that does not use #pragma interface/implementation will most 430 likely shrink dramatically, as g++ now only emits the vtable for a 431 class in the translation unit where its first non-inline, non-abstract 432 virtual function is defined. 433 434 Classes that do not define the copy constructor will sometimes be 435 passed and returned in registers. This may illuminate latent bugs in 436 your code. 437 438Support for automatic template instantiation has *NOT* been added, due 439to a disagreement over design philosophies. 440 441Support for exception handling has been improved; more targets are now 442supported, and throws will use the RTTI mechanism to match against the 443catch parameter type. Optimization is NOT SUPPORTED with 444-fhandle-exceptions; no need to report this as a bug. 445 446Support for Run-Time Type Identification has been added with -frtti. 447This support is still in alpha; one major restriction is that any file 448compiled with -frtti must include <typeinfo.h>. 449 450Preliminary support for namespaces has been added. This support is far 451from complete, and probably not useful. 452 453Synthesis of compiler-generated constructors, destructors and 454assignment operators is now deferred until the functions are used. 455 456The parsing of expressions such as `a ? b : c = 1' has changed from 457`(a ? b : c) = 1' to `a : b ? (c = 1)'. 458 459The code generated for testing conditions, especially those using || 460and &&, is now more efficient. 461 462The operator keywords and, and_eq, bitand, bitor, compl, not, not_eq, 463or, or_eq, xor and xor_eq are now supported. Use -ansi or 464-foperator-names to enable them. 465 466The 'explicit' keyword is now supported. 'explicit' is used to mark 467constructors and type conversion operators that should not be used 468implicitly. 469 470g++ now accepts the typename keyword, though it currently has no 471semantics; it can be a no-op in the current template implementation. 472You may want to start using it in your code, however, since the 473pending rewrite of the template implementation to compile STL properly 474(perhaps for 2.8.0, perhaps not) will require you to use it as 475indicated by the current draft. 476 477Handling of user-defined type conversion has been overhauled so that 478type conversion operators are now found and used properly in 479expressions and function calls. 480 481-fno-strict-prototype now only applies to function declarations with 482"C" linkage. 483 484g++ now warns about 'if (x=0)' with -Wparentheses or -Wall. 485 486#pragma weak and #pragma pack are supported on System V R4 targets, as 487are various other target-specific #pragmas supported by gcc. 488 489new and delete of const types is now allowed (with no additional 490semantics). 491 492Explicit instantiation of template methods is now supported. Also, 493'inline template class foo<int>;' can be used to emit only the vtable 494for a template class. 495 496With -fcheck-new, g++ will check the return value of all calls to 497operator new, and not attempt to modify a returned null pointer. 498 499The template instantiation code now handles more conversions when 500passing to a parameter that does not depend on template arguments. 501This means that code like 'string s; cout << s;' now works. 502 503Invalid jumps in a switch statement past declarations that require 504initializations are now caught. 505 506Functions declared 'extern inline' now have the same linkage semantics 507as inline member functions. On supported targets, where previously 508these functions (and vtables, and template instantiations) would have 509been defined statically, they will now be defined as weak symbols so 510that only one out-of-line definition is used. 511 512collect2 now demangles linker output, and c++filt has become part of 513the gcc distribution. 514 515Noteworthy changes in GCC version 2.6.3: 516 517A few more bugs have been fixed. 518 519Noteworthy changes in GCC version 2.6.2: 520 521A few bugs have been fixed. 522 523Names of attributes can now be preceded and followed by double underscores. 524 525Noteworthy changes in GCC version 2.6.1: 526 527Numerous (mostly minor) bugs have been fixed. 528 529The following new configurations are supported: 530 531 GNU on x86 (instead of treating it like MACH) 532 NetBSD on Sparc and Motorola 68k 533 AIX 4.1 on RS/6000 and PowerPC systems 534 Sequent DYNIX/ptx 1.x and 2.x. 535 Both COFF and ELF configurations on AViiON without using /bin/gcc 536 Windows/NT on x86 architecture; preliminary 537 AT&T DSP1610 digital signal processor chips 538 i960 systems on bare boards using COFF 539 PDP11; target only and not extensively tested 540 541The -pg option is now supported for Alpha under OSF/1 V3.0 or later. 542 543Files with an extension of ".c++" are treated as C++ code. 544 545The -Xlinker and -Wl arguments are now passed to the linker in the 546position they were specified on the command line. This makes it 547possible, for example, to pass flags to the linker about specific 548object files. 549 550The use of positional arguments to the configure script is no longer 551recommended. Use --target= to specify the target; see the GCC manual. 552 553The 386 now supports two new switches: -mreg-alloc=<string> changes 554the default register allocation order used by the compiler, and 555-mno-wide-multiply disables the use of the mul/imul instructions that 556produce 64 bit results in EAX:EDX from 32 bit operands to do long long 557multiplies and 32-bit division by constants. 558 559Noteworthy changes in GCC version 2.6.0: 560 561Numerous bugs have been fixed, in the C and C++ front-ends, as 562well as in the common compiler code. 563 564This release includes the C, Objective-C, and C++ compilers. However, 565we have moved the files for the C++ compiler (G++) files to a 566subdirectory, cp. Subsequent releases of GCC will split these files 567to a separate TAR file. 568 569The G++ team has been tracking the development of the ANSI standard for C++. 570Here are some new features added from the latest working paper: 571 572 * built-in boolean type 'bool', with constants 'true' and 'false'. 573 * array new and delete (operator new [] and delete []). 574 * WP-conforming lifetime of temporaries. 575 * explicit instantiation of templates (template class A<int>;), 576 along with an option (-fno-implicit-templates) to disable emission 577 of implicitly instantiated templates, obsoletes -fexternal-templates. 578 * static member constants (static const int foo = 4; within the 579 class declaration). 580 581Many error messages have been improved to tell the user more about the 582problem. Conformance checking with -pedantic-errors has been 583improved. G++ now compiles Fresco. 584 585There is now an experimental implementation of virtual functions using 586thunks instead of Cfront-style vtables, enabled with -fvtable-thunks. 587This option also enables a heuristic which causes the compiler to only 588emit the vtable in the translation unit where its first non-inline 589virtual function is defined; using this option and 590-fno-implicit-templates, users should be able to avoid #pragma 591interface/implementation altogether. 592 593Signatures have been added as a GNU C++ extension. Using the option 594-fhandle-signatures, users are able to turn on recognition of 595signatures. A short introduction on signatures is in the section 596`Extension to the C++ Language' in the manual. 597 598The `g++' program is now a C program, rather than a shell script. 599 600Lots and lots and lots of bugs fixes, in nested types, access control, 601pointers to member functions, the parser, templates, overload 602resolution, etc, etc. 603 604There have been two major enhancements to the Objective-C compiler: 605 6061) Added portability. It now runs on Alpha, and some problems with 607 message forwarding have been addressed on other platforms. 608 6092) Selectors have been redefined to be pointers to structs like: 610 { void *sel_id, char *sel_types }, where the sel_id is the unique 611 identifier, the selector itself is no longer unique. 612 613 Programmers should use the new function sel_eq to test selector 614 equivalence. 615 616The following major changes have been made to the base compiler and 617machine-specific files. 618 619- The MIL-STD-1750A is a new port, but still preliminary. 620 621- The h8/300h is now supported; both the h8/300 and h8/300h ports come 622 with 32 bit IEEE 754 software floating point support. 623 624- The 64-bit Sparc (v9) and 64-bit MIPS chips are supported. 625 626- NetBSD is supported on m68k, Intel x86, and pc523 systems and FreeBSD 627 on x86. 628 629- COFF is supported on x86, m68k, and Sparc systems running LynxOS. 630 631- 68K systems from Bull and Concurrent are supported and System V 632 Release 4 is supported on the Atari. 633 634- GCC supports GAS on the Motorola 3300 (sysV68) and debugging 635 (assuming GAS) on the Plexus 68K system. (However, GAS does not yet 636 work on those systems). 637 638- System V Release 4 is supported on MIPS (Tandem). 639 640- For DG/UX, an ELF configuration is now supported, and both the ELF 641 and BCS configurations support ELF and COFF object file formats. 642 643- OSF/1 V2.0 is supported on Alpha. 644 645- Function profiling is also supported on Alpha. 646 647- GAS and GDB is supported for Irix 5 (MIPS). 648 649- "common mode" (code that will run on both POWER and PowerPC 650 architectures) is now supported for the RS/6000 family; the 651 compiler knows about more PPC chips. 652 653- Both NeXTStep 2.1 and 3 are supported on 68k-based architectures. 654 655- On the AMD 29k, the -msoft-float is now supported, as well as 656 -mno-sum-in-toc for RS/6000, -mapp-regs and -mflat for Sparc, and 657 -membedded-pic for MIPS. 658 659- GCC can now convert division by integer constants into the equivalent 660 multiplication and shift operations when that is faster than the 661 division. 662 663- Two new warning options, -Wbad-function-cast and 664 -Wmissing-declarations have been added. 665 666- Configurations may now add machine-specific __attribute__ options on 667 type; many machines support the `section' attribute. 668 669- The -ffast-math flag permits some optimization that violate strict 670 IEEE rules, such as converting X * 0.0 to 0.0. 671 672Noteworthy changes in GCC version 2.5.8: 673 674This release only fixes a few serious bugs. These include fixes for a 675bug that prevented most programs from working on the RS/6000, a bug 676that caused invalid assembler code for programs with a `switch' 677statement on the NS32K, a G++ problem that caused undefined names in 678some configurations, and several less serious problems, some of which 679can affect most configuration. 680 681Noteworthy change in GCC version 2.5.7: 682 683This release only fixes a few bugs, one of which was causing bootstrap 684compare errors on some systems. 685 686Noteworthy change in GCC version 2.5.6: 687 688A few backend bugs have been fixed, some of which only occur on one 689machine. 690 691The C++ compiler in 2.5.6 includes: 692 693 * fixes for some common crashes 694 * correct handling of nested types that are referenced as `foo::bar' 695 * spurious warnings about friends being declared static and never 696 defined should no longer appear 697 * enums that are local to a method in a class, or a class that's 698 local to a function, are now handled correctly. For example: 699 class foo { void bar () { enum { x, y } E; x; } }; 700 void bar () { class foo { enum { x, y } E; E baz; }; } 701 702Noteworthy change in GCC version 2.5.5: 703 704A large number of C++ bugs have been fixed. 705 706The fixproto script adds prototypes conditionally on __cplusplus. 707 708Noteworthy change in GCC version 2.5.4: 709 710A bug fix in passing of structure arguments for the HP-PA architecture 711makes code compiled with GCC 2.5.4 incompatible with code compiled 712with earlier versions (if it passes struct arguments of 33 to 64 bits, 713interspersed with other types of arguments). 714 715Noteworthy change in gcc version 2.5.3: 716 717The method of "mangling" C++ function names has been changed. So you 718must recompile all C++ programs completely when you start using GCC 7192.5. Also, GCC 2.5 requires libg++ version 2.5. Earlier libg++ 720versions won't work with GCC 2.5. (This is generally true--GCC 721version M.N requires libg++ version M.N.) 722 723Noteworthy GCC changes in version 2.5: 724 725* There is now support for the IBM 370 architecture as a target. 726Currently the only operating system supported is MVS; GCC does not run 727on MVS, so you must produce .s files using GCC as a cross compiler, 728then transfer them to MVS to assemble them. This port is not reliable 729yet. 730 731* The Power PC is now supported. 732 733* The i860-based Paragon machine is now supported. 734 735* The Hitachi 3050 (an HP-PA machine) is now supported. 736 737* The variable __GNUC_MINOR__ holds the minor version number of GCC, as 738an integer. For version 2.5.X, the value is 5. 739 740* In C, initializers for static and global variables are now processed 741an element at a time, so that they don't need a lot of storage. 742 743* The C syntax for specifying which structure field comes next in an 744initializer is now `.FIELDNAME='. The corresponding syntax for 745array initializers is now `[INDEX]='. For example, 746 747 char whitespace[256] 748 = { [' '] = 1, ['\t'] = 1, ['\n'] = 1 }; 749 750This was changed to accord with the syntax proposed by the Numerical 751C Extensions Group (NCEG). 752 753* Complex numbers are now supported in C. Use the keyword __complex__ 754to declare complex data types. See the manual for details. 755 756* GCC now supports `long double' meaningfully on the Sparc (128-bit 757floating point) and on the 386 (96-bit floating point). The Sparc 758support is enabled on Solaris 2.x because earlier system versions 759(SunOS 4) have bugs in the emulation. 760 761* All targets now have assertions for cpu, machine and system. So you 762can now use assertions to distinguish among all supported targets. 763 764* Nested functions in C may now be inline. Just declare them inline 765in the usual way. 766 767* Packed structure members are now supported fully; it should be possible 768to access them on any supported target, no matter how little alignment 769they have. 770 771* To declare that a function does not return, you must now write 772something like this (works only in 2.5): 773 774 void fatal () __attribute__ ((noreturn)); 775 776or like this (works in older versions too): 777 778 typedef void voidfn (); 779 780 volatile voidfn fatal; 781 782It used to be possible to do so by writing this: 783 784 volatile void fatal (); 785 786but it turns out that ANSI C requires that to mean something 787else (which is useless). 788 789Likewise, to declare that a function is side-effect-free 790so that calls may be deleted or combined, write 791something like this (works only in 2.5): 792 793 int computation () __attribute__ ((const)); 794 795or like this (works in older versions too): 796 797 typedef int intfn (); 798 799 const intfn computation; 800 801* The new option -iwithprefixbefore specifies a directory to add to 802the search path for include files in the same position where -I would 803put it, but uses the specified prefix just like -iwithprefix. 804 805* Basic block profiling has been enhanced to record the function the 806basic block comes from, and if the module was compiled for debugging, 807the line number and filename. A default version of the basic block 808support module has been added to libgcc2 that appends the basic block 809information to a text file 'bb.out'. Machine descriptions can now 810override the basic block support module in the target macro file. 811 812New features in g++: 813 814* The new flag `-fansi-overloading' for C++. Use a newly implemented 815scheme of argument matching for C++. It makes g++ more accurately 816obey the rules set down in Chapter 13 of the Annotated C++ Reference 817Manual (the ARM). This option will be turned on by default in a 818future release. 819 820* The -finline-debug flag is now gone (it was never really used by the 821 compiler). 822 823* Recognizing the syntax for pointers to members, e.g., "foo::*bar", has been 824 dramatically improved. You should not get any syntax errors or incorrect 825 runtime results while using pointers to members correctly; if you do, it's 826 a definite bug. 827 828* Forward declaration of an enum is now flagged as an error. 829 830* Class-local typedefs are now working properly. 831 832* Nested class support has been significantly improved. The compiler 833 will now (in theory) support up to 240 nested classes before hitting 834 other system limits (like memory size). 835 836* There is a new C version of the `g++' driver, to replace the old 837 shell script. This should significantly improve the performance of 838 executing g++ on a system where a user's PATH environment variable 839 references many NFS-mounted filesystems. This driver also works 840 under MS-DOS and OS/2. 841 842* The ANSI committee working on the C++ standard has adopted a new 843 keyword `mutable'. This will allow you to make a specific member be 844 modifiable in an otherwise const class. 845 846Noteworthy GCC changes in version 2.4.4: 847 848 A crash building g++ on various hosts (including m68k) has been 849 fixed. Also the g++ compiler no longer reports incorrect 850 ambiguities in some situations where they do not exist, and 851 const template member functions are now being found properly. 852 853Noteworthy GCC changes in version 2.4: 854 855* On each target, the default is now to return short structures 856compatibly with the "usual" compiler on that target. 857 858For most targets, this means the default is to return all structures 859in memory, like long structures, in whatever way is used on that 860target. Use -freg-struct-return to enable returning short structures 861(and unions) in registers. 862 863This change means that newly compiled binaries are incompatible with 864binaries compiled with previous versions of GCC. 865 866On some targets, GCC is itself the usual compiler. On these targets, 867the default way to return short structures is still in registers. 868Use -fpcc-struct-return to tell GCC to return them in memory. 869 870* There is now a floating point emulator which can imitate the way all 871supported target machines do floating point arithmetic. 872 873This makes it possible to have cross compilation to and from the VAX, 874and between machines of different endianness. However, this works 875only when the target machine description is updated to use the new 876facilities, and not all have been updated. 877 878This also makes possible support for longer floating point types. 879GCC 2.4 supports extended format on the 68K if you use `long double', 880for targets that have a 68881. (When we have run time library 881routines for extended floating point, then `long double' will use 882extended format on all 68K targets.) 883 884We expect to support extended floating point on the i386 and Sparc in 885future versions. 886 887* Building GCC now automatically fixes the system's header files. 888This should require no attention. 889 890* GCC now installs an unsigned data type as size_t when it fixes the 891header files (on all but a handful of old target machines). 892Therefore, the bug that size_t failed to be unsigned is fixed. 893 894* Building and installation are now completely separate. 895All new files are constructed during the build process; 896installation just copies them. 897 898* New targets supported: Clipper, Hitachi SH, Hitachi 8300, and Sparc 899Lite. 900 901* A totally new and much better Objective C run time system is included. 902 903* Objective C supports many new features. Alas, I can't describe them 904since I don't use that language; however, they are the same ones 905supported in recent versions of the NeXT operating system. 906 907* The builtin functions __builtin_apply_args, __builtin_apply and 908__builtin_return let you record the arguments and returned 909value of a function without knowing their number or type. 910 911* The builtin string variables __FUNCTION__ and __PRETTY_FUNCTION__ 912give the name of the function in the source, and a pretty-printed 913version of the name. The two are the same in C, but differ in C++. 914 915* Casts to union types do not yield lvalues. 916 917* ## before an empty rest argument discards the preceding sequence 918of non-whitespace characters from the macro definition. 919(This feature is subject to change.) 920 921 922New features specific to C++: 923 924* The manual contains a new section ``Common Misunderstandings with 925GNU C++'' that C++ users should read. 926 927* #pragma interface and #pragma implementation let you use the same 928C++ source file for both interface and implementation. 929However, this mechanism is still in transition. 930 931* Named returned values let you avoid an extra constructor call 932when a function result has a class type. 933 934* The C++ operators <? and >? yield min and max, respectively. 935 936* C++ gotos can exit a block safely even if the block has 937aggregates that require destructors. 938 939* gcc defines the macro __GNUG__ when compiling C++ programs. 940 941* GNU C++ now correctly distinguishes between the prefix and postfix 942forms of overloaded operator ++ and --. To avoid breaking old 943code, if a class defines only the prefix form, the compiler 944accepts either ++obj or obj++, unless -pedantic is used. 945 946* If you are using version 2.3 of libg++, you need to rebuild it with 947`make CC=gcc' to avoid mismatches in the definition of `size_t'. 948 949Newly documented compiler options: 950 951-fnostartfiles 952 Omit the standard system startup files when linking. 953 954-fvolatile-global 955 Consider memory references to extern and global data items to 956 be volatile. 957 958-idirafter DIR 959 Add DIR to the second include path. 960 961-iprefix PREFIX 962 Specify PREFIX for later -iwithprefix options. 963 964-iwithprefix DIR 965 Add PREFIX/DIR to the second include path. 966 967-mv8 968 Emit Sparc v8 code (with integer multiply and divide). 969-msparclite 970 Emit Sparclite code (roughly v7.5). 971 972-print-libgcc-file-name 973 Search for the libgcc.a file, print its absolute file name, and exit. 974 975-Woverloaded-virtual 976 Warn when a derived class function declaration may be an error 977 in defining a C++ virtual function. 978 979-Wtemplate-debugging 980 When using templates in a C++ program, warn if debugging is 981 not yet fully available. 982 983+eN 984 Control how C++ virtual function definitions are used 985 (like cfront 1.x). 986 987 988Copyright (C) 2000, 2001, 2003 Free Software Foundation, Inc. 989 990Copying and distribution of this file, with or without modification, 991are permitted in any medium without royalty provided the copyright 992notice and this notice are preserved. 993