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