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