mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-20 00:21:35 +00:00
8cf0a35c41
https://gcc.gnu.org/gcc-10/changes.html has a comprehensive overview of many improvements and changes and https://gcc.gnu.org/gcc-10/porting_to.html highlights issues you may encounter porting to this version, though this release series should not bring too many, -fno-common now being the default probably is the one with the largest impact. To give a brief overview of some of the more noticable changes: Several new features from the upcoming C2X revision of the ISO C standard are supported with -std=c2x and -std=gnu2x. Some of these are also supported as extensions when compiling for older language versions. Several C++20 features have been implemented and the libstdc++ runtime library has improved experimental C++2a support. Caveat: The ABI of passing and returning certain C++ classes by value changed on targets including AArch64, ARM, PowerPC ELFv2 in -std=c++17 and -std=c++20 modes. -fanalyzer enables a new static analysis pass and associated warnings, which is more time-consuming, but detects various common errors such as double-free bugs. This is still work in progress, yet definitely worth a try! Extended characters in identifiers may now be specified directly in the input encoding (UTF-8 by default) for the C family of languages, so you can write "const int naïve_π = 3;". The __has_builtin built-in preprocessor operator can be used to query support for built-in functions and __builtin_roundeven has been added. On the Fortran side, the default buffer size for I/O using unformatted files has been increased to 1048576 (and can now be set at run time), mismatches between actual and dummy argument lists in a single file are now rejected with an error (which can be disabled via the new optoins -fallow-argument-mismatch), the handling of a BOZ literal constant has been reworked to provide better conformance to the Fortran 2008 and 2018 standards, and more. Optimization-wise, -fallocation-dce removes unneeded pairs of new and delete operators and -fprofile-partial-training, -fprofile-reproducible, and -fprofile-prefix-path allow for more control over the use of profiles. The inter-procedural optimizers (IPO) have seen many improvements: The inter-procedural scalar replacement of aggregates (IPA-SRA) pass now operates at link time and can remove computing/returning unused return values; -finline-functions is now enabled at -O2 and was retuned; inliner heuristics and function cloning use value-range information to predict the effectivity of individual transformations; and more. Similarly many improvements around link-time optimizations (LTO): A new binary lto-dump shows various information about LTO bytecode object files; the parallel phase of LTO automatically detects a running make's jobserver; LTO bytecode can be compressed with the zstd algorithm; profile maintenance during compilation and hot/cold code partitioning has been improved. Version 2.6 of the OpenACC specification is now supported by the C, C++ and Fortran compilers. GCC 10 adds a number of newly implemented OpenMP 5.0 features on top of the GCC 9 release such as conditional lastprivate clause, scan and loop directives, order(concurrent) and use_device_addr clauses support, if clause on simd construct or partial support for the declare variant directive, getting closer to full support of the OpenMP 5.0 standard. A new warning -Wstring-compare, enabled by -Wextra, warns about equality and inequality expressions between zero and the result of a call to either strcmp and strncmp in some cases. -Wzero-length-bounds, enabled by -Warray-bounds, warns about accesses to elements of zero-length arrays that might overlap other members of the same object. Numerous enhancements to existing warnings, e.g. -Warray-bounds detects more out-of-bounds accesses to member arrays as well as accesses to elements of zero-length arrays, -Wformat-overflow makes full use of string length information computed by the strlen optimization pass, -Wrestrict detects overlapping accesses to dynamically allocated objects, -Wreturn-local-addr diagnoses more instances of return statements returning addresses of automatic variables, -Wstringop-overflow detects more out-of-bounds stores to member arrays including zero-length arrays, dynamically allocated bjects and variable length arrays, as well as more instances of reads of unterminated character arrays by string built-in functions, -Warith-conversion re-enables warnings from -Wconversion, -Wfloat-conversion, and -Wsign-conversion that are now off by default for an expression where the result of an arithmetic operation will not fit in the target type due to promotion, but the operands of the expression do fit in the target type. All architectures have seen improvements, and aarch64 notably has seen several related to the Scalable Vector Extension (SVE). The automatic template instantiation at link time (-frepo) has been removed (finally). Offloading to Heterogeneous System Architecture Intermediate Language (HSAIL) has been deprecated and will likely be removed in a future release. PR: 246700
8 lines
230 B
Plaintext
8 lines
230 B
Plaintext
GCC, the GNU Compiler Collection, supports a number of languages.
|
|
This port installs the C, C++, and Fortran front ends as gcc10, g++10,
|
|
and gfortran10, respectively.
|
|
|
|
WWW: https://gcc.gnu.org
|
|
|
|
Gerald Pfeifer <gerald@FreeBSD.org>
|