📄 news
字号:
- Two new warning options, -Wbad-function-cast and -Wmissing-declarations have been added.- Configurations may now add machine-specific __attribute__ options on type; many machines support the `section' attribute.- The -ffast-math flag permits some optimization that violate strict IEEE rules, such as converting X * 0.0 to 0.0.Noteworthy changes in GCC version 2.5.8:This release only fixes a few serious bugs. These include fixes for abug that prevented most programs from working on the RS/6000, a bugthat caused invalid assembler code for programs with a `switch'statement on the NS32K, a G++ problem that caused undefined names insome configurations, and several less serious problems, some of whichcan affect most configuration.Noteworthy change in GCC version 2.5.7:This release only fixes a few bugs, one of which was causing bootstrapcompare errors on some systems.Noteworthy change in GCC version 2.5.6:A few backend bugs have been fixed, some of which only occur on onemachine.The C++ compiler in 2.5.6 includes: * fixes for some common crashes * correct handling of nested types that are referenced as `foo::bar' * spurious warnings about friends being declared static and never defined should no longer appear * enums that are local to a method in a class, or a class that's local to a function, are now handled correctly. For example: class foo { void bar () { enum { x, y } E; x; } }; void bar () { class foo { enum { x, y } E; E baz; }; }Noteworthy change in GCC version 2.5.5:A large number of C++ bugs have been fixed.The fixproto script adds prototypes conditionally on __cplusplus.Noteworthy change in GCC version 2.5.4:A bug fix in passing of structure arguments for the HP-PA architecturemakes code compiled with GCC 2.5.4 incompatible with code compiledwith earlier versions (if it passes struct arguments of 33 to 64 bits,interspersed with other types of arguments).Noteworthy change in gcc version 2.5.3:The method of "mangling" C++ function names has been changed. So youmust recompile all C++ programs completely when you start using GCC2.5. Also, GCC 2.5 requires libg++ version 2.5. Earlier libg++versions won't work with GCC 2.5. (This is generally true--GCCversion M.N requires libg++ version M.N.)Noteworthy GCC changes in version 2.5:* There is now support for the IBM 370 architecture as a target.Currently the only operating system supported is MVS; GCC does not runon MVS, so you must produce .s files using GCC as a cross compiler,then transfer them to MVS to assemble them. This port is not reliableyet.* The Power PC is now supported.* The i860-based Paragon machine is now supported.* The Hitachi 3050 (an HP-PA machine) is now supported.* The variable __GNUC_MINOR__ holds the minor version number of GCC, asan integer. For version 2.5.X, the value is 5.* In C, initializers for static and global variables are now processedan element at a time, so that they don't need a lot of storage.* The C syntax for specifying which structure field comes next in aninitializer is now `.FIELDNAME='. The corresponding syntax forarray initializers is now `[INDEX]='. For example, char whitespace[256] = { [' '] = 1, ['\t'] = 1, ['\n'] = 1 };This was changed to accord with the syntax proposed by the NumericalC Extensions Group (NCEG).* Complex numbers are now supported in C. Use the keyword __complex__to declare complex data types. See the manual for details.* GCC now supports `long double' meaningfully on the Sparc (128-bitfloating point) and on the 386 (96-bit floating point). The Sparcsupport is enabled on on Solaris 2.x because earlier system versions(SunOS 4) have bugs in the emulation.* All targets now have assertions for cpu, machine and system. So youcan now use assertions to distinguish among all supported targets.* Nested functions in C may now be inline. Just declare them inlinein the usual way.* Packed structure members are now supported fully; it should be possible to access them on any supported target, no matter how little alignmentthey have.* To declare that a function does not return, you must now writesomething like this (works only in 2.5): void fatal () __attribute__ ((noreturn));or like this (works in older versions too): typedef void voidfn (); volatile voidfn fatal;It used to be possible to do so by writing this: volatile void fatal ();but it turns out that ANSI C requires that to mean somethingelse (which is useless).Likewise, to declare that a function is side-effect-freeso that calls may be deleted or combined, writesomething like this (works only in 2.5): int computation () __attribute__ ((const));or like this (works in older versions too): typedef int intfn (); const intfn computation;* The new option -iwithprefixbefore specifies a directory to add to the search path for include files in the same position where -I wouldput it, but uses the specified prefix just like -iwithprefix.* Basic block profiling has been enhanced to record the function thebasic block comes from, and if the module was compiled for debugging,the line number and filename. A default version of the basic blocksupport module has been added to libgcc2 that appends the basic blockinformation to a text file 'bb.out'. Machine descriptions can nowoverride the basic block support module in the target macro file.New features in g++:* The new flag `-fansi-overloading' for C++. Use a newly implementedscheme of argument matching for C++. It makes g++ more accuratelyobey the rules set down in Chapter 13 of the Annotated C++ ReferenceManual (the ARM). This option will be turned on by default in afuture release.* The -finline-debug flag is now gone (it was never really used by the compiler).* Recognizing the syntax for pointers to members, e.g., "foo::*bar", has been dramatically improved. You should not get any syntax errors or incorrect runtime results while using pointers to members correctly; if you do, it's a definite bug.* Forward declaration of an enum is now flagged as an error.* Class-local typedefs are now working properly.* Nested class support has been significantly improved. The compiler will now (in theory) support up to 240 nested classes before hitting other system limits (like memory size).* There is a new C version of the `g++' driver, to replace the old shell script. This should significantly improve the performance of executing g++ on a system where a user's PATH environment variable references many NFS-mounted filesystems. This driver also works under MS-DOS and OS/2.* The ANSI committee working on the C++ standard has adopted a new keyword `mutable'. This will allow you to make a specific member be modifiable in an otherwise const class.Noteworthy GCC changes in version 2.4.4: A crash building g++ on various hosts (including m68k) has been fixed. Also the g++ compiler no longer reports incorrect ambiguities in some situations where they do not exist, and const template member functions are now being found properly.Noteworthy GCC changes in version 2.4:* On each target, the default is now to return short structurescompatibly with the "usual" compiler on that target.For most targets, this means the default is to return all structuresin memory, like long structures, in whatever way is used on thattarget. Use -freg-struct-return to enable returning short structures(and unions) in registers.This change means that newly compiled binaries are incompatible withbinaries compiled with previous versions of GCC.On some targets, GCC is itself the usual compiler. On these targets,the default way to return short structures is still in registers.Use -fpcc-struct-return to tell GCC to return them in memory.* There is now a floating point emulator which can imitate the way allsupported target machines do floating point arithmetic.This makes it possible to have cross compilation to and from the VAX,and between machines of different endianness. However, this worksonly when the target machine description is updated to use the newfacilities, and not all have been updated.This also makes possible support for longer floating point types.GCC 2.4 supports extended format on the 68K if you use `long double',for targets that have a 68881. (When we have run time libraryroutines for extended floating point, then `long double' will useextended format on all 68K targets.)We expect to support extended floating point on the i386 and Sparc infuture versions.* Building GCC now automatically fixes the system's header files.This should require no attention.* GCC now installs an unsigned data type as size_t when it fixes theheader files (on all but a handful of old target machines).Therefore, the bug that size_t failed to be unsigned is fixed.* Building and installation are now completely separate.All new files are constructed during the build process; installation just copies them.* New targets supported: Clipper, Hitachi SH, Hitachi 8300, and SparcLite.* A totally new and much better Objective C run time system is included.* Objective C supports many new features. Alas, I can't describe themsince I don't use that language; however, they are the same ones supported in recent versions of the NeXT operating system.* The builtin functions __builtin_apply_args, __builtin_apply and__builtin_return let you record the arguments and returnedvalue of a function without knowing their number or type.* The builtin string variables __FUNCTION__ and __PRETTY_FUNCTION__give the name of the function in the source, and a pretty-printedversion of the name. The two are the same in C, but differ in C++.* Casts to union types do not yield lvalues.* ## before an empty rest argument discards the preceding sequenceof non-whitespace characters from the macro definition.(This feature is subject to change.)New features specific to C++:* The manual contains a new section ``Common Misunderstandings withGNU C++'' that C++ users should read.* #pragma interface and #pragma implementation let you use the sameC++ source file for both interface and implementation.However, this mechanism is still in transition.* Named returned values let you avoid an extra constructor callwhen a function result has a class type.* The C++ operators <? and >? yield min and max, respectively.* C++ gotos can exit a block safely even if the block hasaggregates that require destructors.* gcc defines the macro __GNUG__ when compiling C++ programs.* GNU C++ now correctly distinguishes between the prefix and postfixforms of overloaded operator ++ and --. To avoid breaking oldcode, if a class defines only the prefix form, the compileraccepts either ++obj or obj++, unless -pedantic is used.* If you are using version 2.3 of libg++, you need to rebuild it with`make CC=gcc' to avoid mismatches in the definition of `size_t'.Newly documented compiler options:-fnostartfiles Omit the standard system startup files when linking.-fvolatile-global Consider memory references to extern and global data items to be volatile.-idirafter DIR Add DIR to the second include path.-iprefix PREFIX Specify PREFIX for later -iwithprefix options.-iwithprefix DIR Add PREFIX/DIR to the second include path.-mv8 Emit Sparc v8 code (with integer multiply and divide).-msparclite Emit Sparclite code (roughly v7.5).-print-libgcc-file-name Search for the libgcc.a file, print its absolute file name, and exit.-Woverloaded-virtual Warn when a derived class function declaration may be an error in defining a C++ virtual function. -Wtemplate-debugging When using templates in a C++ program, warn if debugging is not yet fully available.+eN Control how C++ virtual function definitions are used (like cfront 1.x).
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -