For variables the attribute is accepted only by GCC 3. To keep code portable across different GCC versions, you can use appropriate preprocessor conditionals. The old loop unroller still can be enabled by -fold-unroll-loops and may produce better code in some cases, especially when the webizer optimization pass is not run.
The pass is especially effective as cleanup after code duplication passes, such as the loop unroller or the tracer. A possible non-intrusive workaround is the following:. You must make the names dependent, e. As an alternative solution unfortunately not backwards compatible with GCC 3. This behavior is not mandated by the standard.
To avoid the error, you must move the declaration of g before the declaration of f. The default arguments for g must be visible at the point where it is called. This might be surprising at first sight, especially since most popular compilers do not correctly implement this rule further details. Support for a number of older systems has been declared obsolete in GCC 3. Unless there is activity to revive them, the next release of GCC will have their sources permanently removed.
A vast number of bugs have been fixed in 3. Please refer to the releases web page for information on how to obtain GCC. For previous versions these were downloadable as separate components such as the core GCC distribution, which included the C language front end and shared components, and language-specific distributions including the language front end and the language runtime where appropriate.
If you also intend to build binutils either to upgrade an existing installation or for use in place of the corresponding tools of your OS , unpack the binutils distribution either in the same directory or a separate one. In the latter case, add symbolic links to any components of the binutils you intend to build alongside the compiler bfd , binutils , gas , gprof , ld , opcodes , … to the directory containing the GCC sources.
Verbatim copying and distribution of this entire article is permitted in any medium, provided this notice is preserved.
0コメント