OSDN Git Service

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