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