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