commit c59b4004e5c17e51709050ba4f3b8aa2d91c21a2 Author: Fabio Scotto di Santolo Date: Sat Nov 29 18:39:57 2025 +0100 Implemented project structure diff --git a/.gdbinit b/.gdbinit new file mode 100644 index 0000000..19e8279 --- /dev/null +++ b/.gdbinit @@ -0,0 +1 @@ +set dissasembly-flavor intel diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..686521e --- /dev/null +++ b/Makefile @@ -0,0 +1,26 @@ +CC = ./xpack-riscv-none-elf-gcc-13.4.0-1/bin/riscv-none-elf-gcc +CFLAGS = -nostdlib -O2 -g3 -Wall -Wextra -fno-stack-protector -ffreestanding +LD_SCRIPT = kernel.ld +LDFLAGS = -T$(LD_SCRIPT) -Wl,-Map=kernel.map + +SRC = kernel.c +OUT = kernel.elf + +.PHONY: all clean run + +all: $(OUT) + +$(OUT): $(SRC) $(LD_SCRIPT) + $(CC) $(LDFLAGS) $(CFLAGS) $(SRC) -o $@ + +clean: + rm -f $(OUT) kernel.map + +run: $(OUT) + distrobox enter archlinux -- qemu-system-riscv32 \ + -machine virt \ + -bios default \ + -nographic \ + -serial mon:stdio \ + -no-reboot \ + -kernel $(OUT) diff --git a/asm.c b/asm.c new file mode 100644 index 0000000..2112887 --- /dev/null +++ b/asm.c @@ -0,0 +1,21 @@ +#include + +int add(int a, int b) +{ + int result; + asm volatile ( + "addl %2, %1;" // Add b + "movl %1, %0;" + : "=r" (result) + : "r" (a), "r" (b) + : "cc" + ); + return result; +} + +int main(void) +{ + int x = 10, y = 20; + printf("%d + %d = %d\n", x, y, add(x, y)); + return 0; +} diff --git a/kernel.c b/kernel.c new file mode 100644 index 0000000..21d4d8f --- /dev/null +++ b/kernel.c @@ -0,0 +1,56 @@ +#include "kernel.h" + +extern uint8_t __bss[], __bss_end[], __stack_top[]; + +sbiret sbi_call(long arg0, long arg1, long arg2, long arg3, long arg4, + long arg5, long fid, long eid) +{ + register long a0 __asm__("a0") = arg0; + register long a1 __asm__("a1") = arg1; + register long a2 __asm__("a2") = arg2; + register long a3 __asm__("a3") = arg3; + register long a4 __asm__("a4") = arg4; + register long a5 __asm__("a5") = arg5; + register long a6 __asm__("a6") = fid; + register long a7 __asm__("a7") = eid; + + __asm__ __volatile__( + "ecall" + : "=r"(a0), "=r"(a1) + : "r"(a0), "r"(a1), "r"(a2), "r"(a3), "r"(a4), "r"(a5), "r"(a6), "r"(a7) + : "memory" + ); + + return (sbiret) { .error = a0, .value = a1 }; +} + +void putchar(char c) +{ + // 1 => sbi_console_putchar() + sbi_call(c, 0, 0, 0, 0, 0, 0, 1); +} + +void kernel_main(void) +{ + const char *s = "\n\nHello World!\n"; + for (int i = 0; s[i] != '\0'; i++) { + putchar(s[i]); + } + + while(1) { + // wfi -> wait for interrupt + __asm__ __volatile__("wfi"); + } +} + +__attribute__((section(".text.boot"))) +__attribute__((naked)) +void boot(void) +{ + __asm__ __volatile__ ( + "mv sp, %[stack_top]\n" // Initialize the kernel stack pointer + "j kernel_main\n" // Unconditional jump to kernel_main + : // No output + : [stack_top] "r" (__stack_top) // Pass the stack top address + ); +} diff --git a/kernel.h b/kernel.h new file mode 100644 index 0000000..d432b27 --- /dev/null +++ b/kernel.h @@ -0,0 +1,13 @@ +#ifndef KERNEL_H_ +#define KERNEL_H_ + +typedef unsigned char uint8_t; +typedef unsigned int uint32_t; +typedef uint32_t size_t; + +typedef struct { + long error; + long value; +} sbiret; + +#endif // KERNEL_H_ diff --git a/kernel.ld b/kernel.ld new file mode 100644 index 0000000..541efdb --- /dev/null +++ b/kernel.ld @@ -0,0 +1,42 @@ +ENTRY(boot) + +SECTIONS { + /* base address */ + . = 0x80200000; + + /* contains the instructions */ + .text :{ + /* .text.boot always placed at the beginning */ + /* KEEP to not discard section */ + KEEP(*(.text.boot)); + /* match all input files with all .text and all .text.* section */ + ,*(.text .text.); + } + + /* contains read-only data */ + .rodata : ALIGN(4) { + ,*(.rodata .rodata.*); + } + + /* contains read/write data */ + /* adjust current address to a 4-byte boundary */ + .data : ALIGN(4) { + ,*(.data .data.*); + } + + /* contains read/write data with an initial value of zero */ + /* adjust current address to a 4-byte boundary */ + .bss : ALIGN(4) { + /* assign current address to the symbol '__bss' */ + /* you can access this symbol in C using 'extern char __bss;' */ + __bss = .; + ,*(.bss .bss.* .sbss .sbss.*); + __bss_end = .; + } + + /* kernel stack right after .bss and with size 128KB */ + /* adjust current address to a 4-byte boundary */ + . = ALIGN(4); + . += 128 * 1024; /* 128KB */ + __stack_top = .; +} diff --git a/linker.ld b/linker.ld new file mode 100644 index 0000000..e484923 --- /dev/null +++ b/linker.ld @@ -0,0 +1,13 @@ +SECTIONS +{ + . = 0x80200000; + + .text : { + *(.text.entry) /* entry point */ + *(.text*) /* all text sections */ + } + + .rodata : { *(.rodata*) } + .data : { *(.data*) } + .bss : { *(.bss*) } +} diff --git a/naked.c b/naked.c new file mode 100644 index 0000000..ac3e640 --- /dev/null +++ b/naked.c @@ -0,0 +1,25 @@ +#include + +// No function prologue/epilogue - raw assembly only +__attribute__((naked)) +void my_naked_function() +{ + __asm__ volatile ( + "movl $42, %eax\n\t" + "ret" + ); +} + +int main() +{ + int result; + __asm__ volatile ( + "call my_naked_function\n\t" + "movl %%eax, %0\n\t" + : "=r"(result) + : + : "%eax" + ); + printf("Result from naked function: %d\n", result); + return 0; +} diff --git a/print.S b/print.S new file mode 100644 index 0000000..e9f4c14 --- /dev/null +++ b/print.S @@ -0,0 +1,34 @@ +.section .text +.globl _start + +_start: + li a0, 72 # ASCII 'H' + li a7, 1 # SBI call ID for sbi_console_putchar + ecall # Make the SBI call + + li a0, 101 + li a7, 1 + ecall + + li a0, 108 + li a7, 1 + ecall + + li a0, 108 + li a7, 1 + ecall + + li a0, 111 + li a7, 1 + ecall + + li a0, 10 + li a7, 1 + ecall + + li a7, 93 # SBI call: shutdown + li a0, 0 # exit code 0 + ecall + +loop: + j loop # Infinite loop after printing diff --git a/print.o b/print.o new file mode 100644 index 0000000..80e5909 Binary files /dev/null and b/print.o differ diff --git a/section.c b/section.c new file mode 100644 index 0000000..8b4f422 --- /dev/null +++ b/section.c @@ -0,0 +1,16 @@ +#include + +int var __attribute__((section("custom_data"))) = 1337; + +__attribute__((section("custom_text"))) +void custom() +{ + printf("Hello from custom() in custom section!\n"); +} + +int main() +{ + printf("var = %d\n", var); + custom(); + return 0; +} diff --git a/xpack-riscv-none-elf-gcc-13.4.0-1/README.md b/xpack-riscv-none-elf-gcc-13.4.0-1/README.md new file mode 100644 index 0000000..da595f4 --- /dev/null +++ b/xpack-riscv-none-elf-gcc-13.4.0-1/README.md @@ -0,0 +1,14 @@ +# xPack GNU RISC-V Embedded GCC + +The **xPack GNU RISC-V Embedded GCC** (formerly GNU MCU Eclipse RISC-V GCC) +is the **xPack** version of the **GNU RISC-V Embedded GCC** toolchain +maintained by **SiFive**. + +For more details, please read the corresponding release pages: + +- +- + +Thank you for using open source software, + +Liviu Ionescu diff --git a/xpack-riscv-none-elf-gcc-13.4.0-1/bin/riscv-none-elf-addr2line b/xpack-riscv-none-elf-gcc-13.4.0-1/bin/riscv-none-elf-addr2line new file mode 100755 index 0000000..fd302be Binary files /dev/null and b/xpack-riscv-none-elf-gcc-13.4.0-1/bin/riscv-none-elf-addr2line differ diff --git a/xpack-riscv-none-elf-gcc-13.4.0-1/bin/riscv-none-elf-ar b/xpack-riscv-none-elf-gcc-13.4.0-1/bin/riscv-none-elf-ar new file mode 100755 index 0000000..04db172 Binary files /dev/null and b/xpack-riscv-none-elf-gcc-13.4.0-1/bin/riscv-none-elf-ar differ diff --git a/xpack-riscv-none-elf-gcc-13.4.0-1/bin/riscv-none-elf-as b/xpack-riscv-none-elf-gcc-13.4.0-1/bin/riscv-none-elf-as new file mode 100755 index 0000000..c5da3c8 Binary files /dev/null and b/xpack-riscv-none-elf-gcc-13.4.0-1/bin/riscv-none-elf-as differ diff --git a/xpack-riscv-none-elf-gcc-13.4.0-1/bin/riscv-none-elf-c++ b/xpack-riscv-none-elf-gcc-13.4.0-1/bin/riscv-none-elf-c++ new file mode 100755 index 0000000..8c5f0da Binary files /dev/null and b/xpack-riscv-none-elf-gcc-13.4.0-1/bin/riscv-none-elf-c++ differ diff --git a/xpack-riscv-none-elf-gcc-13.4.0-1/bin/riscv-none-elf-c++filt b/xpack-riscv-none-elf-gcc-13.4.0-1/bin/riscv-none-elf-c++filt new file mode 100755 index 0000000..177f62e Binary files /dev/null and b/xpack-riscv-none-elf-gcc-13.4.0-1/bin/riscv-none-elf-c++filt differ diff --git a/xpack-riscv-none-elf-gcc-13.4.0-1/bin/riscv-none-elf-cpp b/xpack-riscv-none-elf-gcc-13.4.0-1/bin/riscv-none-elf-cpp new file mode 100755 index 0000000..c2ba777 Binary files /dev/null and b/xpack-riscv-none-elf-gcc-13.4.0-1/bin/riscv-none-elf-cpp differ diff --git a/xpack-riscv-none-elf-gcc-13.4.0-1/bin/riscv-none-elf-elfedit b/xpack-riscv-none-elf-gcc-13.4.0-1/bin/riscv-none-elf-elfedit new file mode 100755 index 0000000..169b4a7 Binary files /dev/null and b/xpack-riscv-none-elf-gcc-13.4.0-1/bin/riscv-none-elf-elfedit differ diff --git a/xpack-riscv-none-elf-gcc-13.4.0-1/bin/riscv-none-elf-g++ b/xpack-riscv-none-elf-gcc-13.4.0-1/bin/riscv-none-elf-g++ new file mode 100755 index 0000000..8c5f0da Binary files /dev/null and b/xpack-riscv-none-elf-gcc-13.4.0-1/bin/riscv-none-elf-g++ differ diff --git a/xpack-riscv-none-elf-gcc-13.4.0-1/bin/riscv-none-elf-gcc b/xpack-riscv-none-elf-gcc-13.4.0-1/bin/riscv-none-elf-gcc new file mode 100755 index 0000000..85232c4 Binary files /dev/null and b/xpack-riscv-none-elf-gcc-13.4.0-1/bin/riscv-none-elf-gcc differ diff --git a/xpack-riscv-none-elf-gcc-13.4.0-1/bin/riscv-none-elf-gcc-13.4.0 b/xpack-riscv-none-elf-gcc-13.4.0-1/bin/riscv-none-elf-gcc-13.4.0 new file mode 100755 index 0000000..85232c4 Binary files /dev/null and b/xpack-riscv-none-elf-gcc-13.4.0-1/bin/riscv-none-elf-gcc-13.4.0 differ diff --git a/xpack-riscv-none-elf-gcc-13.4.0-1/bin/riscv-none-elf-gcc-ar b/xpack-riscv-none-elf-gcc-13.4.0-1/bin/riscv-none-elf-gcc-ar new file mode 100755 index 0000000..cb4d9f1 Binary files /dev/null and b/xpack-riscv-none-elf-gcc-13.4.0-1/bin/riscv-none-elf-gcc-ar differ diff --git a/xpack-riscv-none-elf-gcc-13.4.0-1/bin/riscv-none-elf-gcc-nm b/xpack-riscv-none-elf-gcc-13.4.0-1/bin/riscv-none-elf-gcc-nm new file mode 100755 index 0000000..93c0f47 Binary files /dev/null and b/xpack-riscv-none-elf-gcc-13.4.0-1/bin/riscv-none-elf-gcc-nm differ diff --git a/xpack-riscv-none-elf-gcc-13.4.0-1/bin/riscv-none-elf-gcc-ranlib b/xpack-riscv-none-elf-gcc-13.4.0-1/bin/riscv-none-elf-gcc-ranlib new file mode 100755 index 0000000..b97441b Binary files /dev/null and b/xpack-riscv-none-elf-gcc-13.4.0-1/bin/riscv-none-elf-gcc-ranlib differ diff --git a/xpack-riscv-none-elf-gcc-13.4.0-1/bin/riscv-none-elf-gcov b/xpack-riscv-none-elf-gcc-13.4.0-1/bin/riscv-none-elf-gcov new file mode 100755 index 0000000..5db70c3 Binary files /dev/null and b/xpack-riscv-none-elf-gcc-13.4.0-1/bin/riscv-none-elf-gcov differ diff --git a/xpack-riscv-none-elf-gcc-13.4.0-1/bin/riscv-none-elf-gcov-dump b/xpack-riscv-none-elf-gcc-13.4.0-1/bin/riscv-none-elf-gcov-dump new file mode 100755 index 0000000..5617f9e Binary files /dev/null and b/xpack-riscv-none-elf-gcc-13.4.0-1/bin/riscv-none-elf-gcov-dump differ diff --git a/xpack-riscv-none-elf-gcc-13.4.0-1/bin/riscv-none-elf-gcov-tool b/xpack-riscv-none-elf-gcc-13.4.0-1/bin/riscv-none-elf-gcov-tool new file mode 100755 index 0000000..371df4a Binary files /dev/null and b/xpack-riscv-none-elf-gcc-13.4.0-1/bin/riscv-none-elf-gcov-tool differ diff --git a/xpack-riscv-none-elf-gcc-13.4.0-1/bin/riscv-none-elf-gdb b/xpack-riscv-none-elf-gcc-13.4.0-1/bin/riscv-none-elf-gdb new file mode 100755 index 0000000..ed14ddb Binary files /dev/null and b/xpack-riscv-none-elf-gcc-13.4.0-1/bin/riscv-none-elf-gdb differ diff --git a/xpack-riscv-none-elf-gcc-13.4.0-1/bin/riscv-none-elf-gdb-add-index b/xpack-riscv-none-elf-gcc-13.4.0-1/bin/riscv-none-elf-gdb-add-index new file mode 100755 index 0000000..00a9bea --- /dev/null +++ b/xpack-riscv-none-elf-gcc-13.4.0-1/bin/riscv-none-elf-gdb-add-index @@ -0,0 +1,185 @@ +#! /bin/sh + +# Add a .gdb_index section to a file. + +# Copyright (C) 2010-2024 Free Software Foundation, Inc. +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +# This program assumes gdb and objcopy are in $PATH. +# If not, or you want others, pass the following in the environment +GDB=${GDB:=gdb} +OBJCOPY=${OBJCOPY:=objcopy} +READELF=${READELF:=readelf} + +myname="${0##*/}" + +dwarf5="" +if [ "$1" = "-dwarf-5" ]; then + dwarf5="$1" + shift +fi + +if test $# != 1; then + echo "usage: $myname [-dwarf-5] FILE" 1>&2 + exit 1 +fi + +file="$1" + +if test -L "$file"; then + if ! command -v readlink >/dev/null 2>&1; then + echo "$myname: 'readlink' missing. Failed to follow symlink $1." 1>&2 + exit 1 + fi + + # Count number of links followed in order to detect loops. + count=0 + while test -L "$file"; do + target=$(readlink "$file") + + case "$target" in + /*) + file="$target" + ;; + *) + file="$(dirname "$file")/$target" + ;; + esac + + count="$((count + 1))" + if test "$count" -gt 10; then + echo "$myname: Detected loop while following link $file" + exit 1 + fi + done +fi + +if test ! -r "$file"; then + echo "$myname: unable to access: $file" 1>&2 + exit 1 +fi + +dir="${file%/*}" +test "$dir" = "$file" && dir="." + +dwz_file="" +if $READELF -S "$file" | grep -q " \.gnu_debugaltlink "; then + dwz_file=$($READELF --string-dump=.gnu_debugaltlink "$file" \ + | grep -A1 "'\.gnu_debugaltlink':" \ + | tail -n +2 \ + | sed 's/.*]//') + dwz_file=$(echo $dwz_file) + if $READELF -S "$dwz_file" | grep -E -q " \.(gdb_index|debug_names) "; then + # Already has an index, skip it. + dwz_file="" + fi +fi + +set_files () +{ + fpath="$1" + + index4="${fpath}.gdb-index" + index5="${fpath}.debug_names" + debugstr="${fpath}.debug_str" + debugstrmerge="${fpath}.debug_str.merge" + debugstrerr="${fpath}.debug_str.err" +} + +tmp_files= +for f in "$file" "$dwz_file"; do + if [ "$f" = "" ]; then + continue + fi + set_files "$f" + tmp_files="$tmp_files $index4 $index5 $debugstr $debugstrmerge $debugstrerr" +done + +rm -f $tmp_files + +# Ensure intermediate index file is removed when we exit. +trap "rm -f $tmp_files" 0 + +$GDB --batch -nx -iex 'set auto-load no' \ + -iex 'set debuginfod enabled off' \ + -ex "file '$file'" -ex "save gdb-index $dwarf5 '$dir'" || { + # Just in case. + status=$? + echo "$myname: gdb error generating index for $file" 1>&2 + exit $status +} + +# In some situations gdb can exit without creating an index. This is +# not an error. +# E.g., if $file is stripped. This behavior is akin to stripping an +# already stripped binary, it's a no-op. +status=0 + +handle_file () +{ + fpath="$1" + + set_files "$fpath" + + if test -f "$index4" -a -f "$index5"; then + echo "$myname: Both index types were created for $fpath" 1>&2 + status=1 + elif test -f "$index4" -o -f "$index5"; then + if test -f "$index4"; then + index="$index4" + section=".gdb_index" + else + index="$index5" + section=".debug_names" + fi + if test -s "$debugstr"; then + if ! $OBJCOPY --dump-section .debug_str="$debugstrmerge" "$fpath" \ + /dev/null 2> "$debugstrerr"; then + cat >&2 "$debugstrerr" + exit 1 + fi + cat "$debugstr" >>"$debugstrmerge" + if grep -q "can't dump section '.debug_str' - it does not exist" \ + "$debugstrerr"; then + $OBJCOPY --add-section $section="$index" \ + --set-section-flags $section=readonly \ + --add-section .debug_str="$debugstrmerge" \ + --set-section-flags .debug_str=readonly \ + "$fpath" "$fpath" + else + $OBJCOPY --add-section $section="$index" \ + --set-section-flags $section=readonly \ + --update-section .debug_str="$debugstrmerge" \ + "$fpath" "$fpath" + fi + else + $OBJCOPY --add-section $section="$index" \ + --set-section-flags $section=readonly \ + "$fpath" "$fpath" + fi + + status=$? + else + echo "$myname: No index was created for $fpath" 1>&2 + echo "$myname: [Was there no debuginfo? Was there already an index?]" \ + 1>&2 + fi +} + +handle_file "$file" +if [ "$dwz_file" != "" ]; then + handle_file "$dwz_file" +fi + +exit $status diff --git a/xpack-riscv-none-elf-gcc-13.4.0-1/bin/riscv-none-elf-gdb-add-index-py3 b/xpack-riscv-none-elf-gcc-13.4.0-1/bin/riscv-none-elf-gdb-add-index-py3 new file mode 100755 index 0000000..00a9bea --- /dev/null +++ b/xpack-riscv-none-elf-gcc-13.4.0-1/bin/riscv-none-elf-gdb-add-index-py3 @@ -0,0 +1,185 @@ +#! /bin/sh + +# Add a .gdb_index section to a file. + +# Copyright (C) 2010-2024 Free Software Foundation, Inc. +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +# This program assumes gdb and objcopy are in $PATH. +# If not, or you want others, pass the following in the environment +GDB=${GDB:=gdb} +OBJCOPY=${OBJCOPY:=objcopy} +READELF=${READELF:=readelf} + +myname="${0##*/}" + +dwarf5="" +if [ "$1" = "-dwarf-5" ]; then + dwarf5="$1" + shift +fi + +if test $# != 1; then + echo "usage: $myname [-dwarf-5] FILE" 1>&2 + exit 1 +fi + +file="$1" + +if test -L "$file"; then + if ! command -v readlink >/dev/null 2>&1; then + echo "$myname: 'readlink' missing. Failed to follow symlink $1." 1>&2 + exit 1 + fi + + # Count number of links followed in order to detect loops. + count=0 + while test -L "$file"; do + target=$(readlink "$file") + + case "$target" in + /*) + file="$target" + ;; + *) + file="$(dirname "$file")/$target" + ;; + esac + + count="$((count + 1))" + if test "$count" -gt 10; then + echo "$myname: Detected loop while following link $file" + exit 1 + fi + done +fi + +if test ! -r "$file"; then + echo "$myname: unable to access: $file" 1>&2 + exit 1 +fi + +dir="${file%/*}" +test "$dir" = "$file" && dir="." + +dwz_file="" +if $READELF -S "$file" | grep -q " \.gnu_debugaltlink "; then + dwz_file=$($READELF --string-dump=.gnu_debugaltlink "$file" \ + | grep -A1 "'\.gnu_debugaltlink':" \ + | tail -n +2 \ + | sed 's/.*]//') + dwz_file=$(echo $dwz_file) + if $READELF -S "$dwz_file" | grep -E -q " \.(gdb_index|debug_names) "; then + # Already has an index, skip it. + dwz_file="" + fi +fi + +set_files () +{ + fpath="$1" + + index4="${fpath}.gdb-index" + index5="${fpath}.debug_names" + debugstr="${fpath}.debug_str" + debugstrmerge="${fpath}.debug_str.merge" + debugstrerr="${fpath}.debug_str.err" +} + +tmp_files= +for f in "$file" "$dwz_file"; do + if [ "$f" = "" ]; then + continue + fi + set_files "$f" + tmp_files="$tmp_files $index4 $index5 $debugstr $debugstrmerge $debugstrerr" +done + +rm -f $tmp_files + +# Ensure intermediate index file is removed when we exit. +trap "rm -f $tmp_files" 0 + +$GDB --batch -nx -iex 'set auto-load no' \ + -iex 'set debuginfod enabled off' \ + -ex "file '$file'" -ex "save gdb-index $dwarf5 '$dir'" || { + # Just in case. + status=$? + echo "$myname: gdb error generating index for $file" 1>&2 + exit $status +} + +# In some situations gdb can exit without creating an index. This is +# not an error. +# E.g., if $file is stripped. This behavior is akin to stripping an +# already stripped binary, it's a no-op. +status=0 + +handle_file () +{ + fpath="$1" + + set_files "$fpath" + + if test -f "$index4" -a -f "$index5"; then + echo "$myname: Both index types were created for $fpath" 1>&2 + status=1 + elif test -f "$index4" -o -f "$index5"; then + if test -f "$index4"; then + index="$index4" + section=".gdb_index" + else + index="$index5" + section=".debug_names" + fi + if test -s "$debugstr"; then + if ! $OBJCOPY --dump-section .debug_str="$debugstrmerge" "$fpath" \ + /dev/null 2> "$debugstrerr"; then + cat >&2 "$debugstrerr" + exit 1 + fi + cat "$debugstr" >>"$debugstrmerge" + if grep -q "can't dump section '.debug_str' - it does not exist" \ + "$debugstrerr"; then + $OBJCOPY --add-section $section="$index" \ + --set-section-flags $section=readonly \ + --add-section .debug_str="$debugstrmerge" \ + --set-section-flags .debug_str=readonly \ + "$fpath" "$fpath" + else + $OBJCOPY --add-section $section="$index" \ + --set-section-flags $section=readonly \ + --update-section .debug_str="$debugstrmerge" \ + "$fpath" "$fpath" + fi + else + $OBJCOPY --add-section $section="$index" \ + --set-section-flags $section=readonly \ + "$fpath" "$fpath" + fi + + status=$? + else + echo "$myname: No index was created for $fpath" 1>&2 + echo "$myname: [Was there no debuginfo? Was there already an index?]" \ + 1>&2 + fi +} + +handle_file "$file" +if [ "$dwz_file" != "" ]; then + handle_file "$dwz_file" +fi + +exit $status diff --git a/xpack-riscv-none-elf-gcc-13.4.0-1/bin/riscv-none-elf-gdb-py3 b/xpack-riscv-none-elf-gcc-13.4.0-1/bin/riscv-none-elf-gdb-py3 new file mode 100755 index 0000000..3214b0c Binary files /dev/null and b/xpack-riscv-none-elf-gcc-13.4.0-1/bin/riscv-none-elf-gdb-py3 differ diff --git a/xpack-riscv-none-elf-gcc-13.4.0-1/bin/riscv-none-elf-gfortran b/xpack-riscv-none-elf-gcc-13.4.0-1/bin/riscv-none-elf-gfortran new file mode 100755 index 0000000..2ed1483 Binary files /dev/null and b/xpack-riscv-none-elf-gcc-13.4.0-1/bin/riscv-none-elf-gfortran differ diff --git a/xpack-riscv-none-elf-gcc-13.4.0-1/bin/riscv-none-elf-gprof b/xpack-riscv-none-elf-gcc-13.4.0-1/bin/riscv-none-elf-gprof new file mode 100755 index 0000000..5201798 Binary files /dev/null and b/xpack-riscv-none-elf-gcc-13.4.0-1/bin/riscv-none-elf-gprof differ diff --git a/xpack-riscv-none-elf-gcc-13.4.0-1/bin/riscv-none-elf-gstack b/xpack-riscv-none-elf-gcc-13.4.0-1/bin/riscv-none-elf-gstack new file mode 100755 index 0000000..26e8bae --- /dev/null +++ b/xpack-riscv-none-elf-gcc-13.4.0-1/bin/riscv-none-elf-gstack @@ -0,0 +1,147 @@ +#!/usr/bin/env bash + +# Copyright (C) 2024-2025 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +# Print a stack trace of a running process. +# Similar to the gcore command, but instead of creating a core file, +# we simply have gdb print out the stack backtrace to the terminal. + +GDB=${GDB:-$(command -v gdb)} +GDBARGS=${GDBARGS:-} +AWK=${AWK:-} +PKGVERSION="(xPack GNU RISC-V Embedded GCC x86_64) " +VERSION="16.3" + +# Find an appropriate awk interpreter if one was not specified +# via the environment. +awk_prog="" +if [ -z "$AWK" ]; then + for prog in gawk mawk nawk awk; do + awk_prog=$(command -v $prog) + test -n "$awk_prog" && break + done + AWK="$awk_prog" +fi +if [ ! -x "$AWK" ]; then + echo "$0: could not find usable awk interpreter" 1>&2 + exit 2 +fi + +function print_usage() { + echo "Usage: $0 [-h|--help] [-v|--version] PID" +} + +function print_try_help() { + echo "Try '$0 --help' for more information." +} + +function print_help() { + print_usage + echo "Print a stack trace of a running program" + echo + echo " -h, --help Print this message then exit." + echo " -v, --version Print version information then exit." +} + +function print_version() { + echo "GNU gstack (${PKGVERSION}) ${VERSION}" +} + +# Parse options. +while getopts hv-: OPT; do + if [ "$OPT" = "-" ]; then + OPT="${OPTARG%%=*}" + OPTARG="${OPTARG#'$OPT'}" + OPTARG="${OPTARG#=}" + fi + + case "$OPT" in + h | help) + print_help + exit 0 + ;; + v | version) + print_version + exit 0 + ;; + \?) + # getopts has already output an error message. + print_try_help 1>&2 + exit 2 ;; + *) + echo "$0: unrecognized option '--$OPT'" 1>&2 + print_try_help 1>&2 + exit 2 + ;; + esac +done +shift $((OPTIND-1)) + +# The sole remaining argument should be the PID of the process +# whose backtrace is desired. +if [ $# -ne 1 ]; then + print_usage 1>&2 + exit 1 +fi + +PID=$1 + +awk_script=$(cat << EOF +BEGIN { + first=1 + attach_okay=0 +} + +/ATTACHED/ { + attach_okay=1 +} + +/^#/ { + if (attach_okay) { + print \$0 + } +} + +/^Thread/ { + if (attach_okay) { + if (first == 0) + print "" + first=0 + print \$0 + } +} + +END { +if (attach_okay == 0) + exit 2 +} +EOF + ) + +# Run GDB and remove some unwanted noise. +"$GDB" --quiet -nx $GDBARGS <. + +# Print a stack trace of a running process. +# Similar to the gcore command, but instead of creating a core file, +# we simply have gdb print out the stack backtrace to the terminal. + +GDB=${GDB:-$(command -v gdb)} +GDBARGS=${GDBARGS:-} +AWK=${AWK:-} +PKGVERSION="(xPack GNU RISC-V Embedded GCC x86_64) " +VERSION="16.3" + +# Find an appropriate awk interpreter if one was not specified +# via the environment. +awk_prog="" +if [ -z "$AWK" ]; then + for prog in gawk mawk nawk awk; do + awk_prog=$(command -v $prog) + test -n "$awk_prog" && break + done + AWK="$awk_prog" +fi +if [ ! -x "$AWK" ]; then + echo "$0: could not find usable awk interpreter" 1>&2 + exit 2 +fi + +function print_usage() { + echo "Usage: $0 [-h|--help] [-v|--version] PID" +} + +function print_try_help() { + echo "Try '$0 --help' for more information." +} + +function print_help() { + print_usage + echo "Print a stack trace of a running program" + echo + echo " -h, --help Print this message then exit." + echo " -v, --version Print version information then exit." +} + +function print_version() { + echo "GNU gstack (${PKGVERSION}) ${VERSION}" +} + +# Parse options. +while getopts hv-: OPT; do + if [ "$OPT" = "-" ]; then + OPT="${OPTARG%%=*}" + OPTARG="${OPTARG#'$OPT'}" + OPTARG="${OPTARG#=}" + fi + + case "$OPT" in + h | help) + print_help + exit 0 + ;; + v | version) + print_version + exit 0 + ;; + \?) + # getopts has already output an error message. + print_try_help 1>&2 + exit 2 ;; + *) + echo "$0: unrecognized option '--$OPT'" 1>&2 + print_try_help 1>&2 + exit 2 + ;; + esac +done +shift $((OPTIND-1)) + +# The sole remaining argument should be the PID of the process +# whose backtrace is desired. +if [ $# -ne 1 ]; then + print_usage 1>&2 + exit 1 +fi + +PID=$1 + +awk_script=$(cat << EOF +BEGIN { + first=1 + attach_okay=0 +} + +/ATTACHED/ { + attach_okay=1 +} + +/^#/ { + if (attach_okay) { + print \$0 + } +} + +/^Thread/ { + if (attach_okay) { + if (first == 0) + print "" + first=0 + print \$0 + } +} + +END { +if (attach_okay == 0) + exit 2 +} +EOF + ) + +# Run GDB and remove some unwanted noise. +"$GDB" --quiet -nx $GDBARGS < + Copyright (C) + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General +Public License instead of this License. diff --git a/xpack-riscv-none-elf-gcc-13.4.0-1/distro-info/licenses/binutils-2.45/COPYING.LIB b/xpack-riscv-none-elf-gcc-13.4.0-1/distro-info/licenses/binutils-2.45/COPYING.LIB new file mode 100644 index 0000000..778d0bb --- /dev/null +++ b/xpack-riscv-none-elf-gcc-13.4.0-1/distro-info/licenses/binutils-2.45/COPYING.LIB @@ -0,0 +1,482 @@ + GNU LIBRARY GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1991 Free Software Foundation, Inc. + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + +[This is the first released version of the library GPL. It is + numbered 2 because it goes with version 2 of the ordinary GPL.] + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +Licenses are intended to guarantee your freedom to share and change +free software--to make sure the software is free for all its users. + + This license, the Library General Public License, applies to some +specially designated Free Software Foundation software, and to any +other libraries whose authors decide to use it. You can use it for +your libraries, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if +you distribute copies of the library, or if you modify it. + + For example, if you distribute copies of the library, whether gratis +or for a fee, you must give the recipients all the rights that we gave +you. You must make sure that they, too, receive or can get the source +code. If you link a program with the library, you must provide +complete object files to the recipients so that they can relink them +with the library, after making changes to the library and recompiling +it. And you must show them these terms so they know their rights. + + Our method of protecting your rights has two steps: (1) copyright +the library, and (2) offer you this license which gives you legal +permission to copy, distribute and/or modify the library. + + Also, for each distributor's protection, we want to make certain +that everyone understands that there is no warranty for this free +library. If the library is modified by someone else and passed on, we +want its recipients to know that what they have is not the original +version, so that any problems introduced by others will not reflect on +the original authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that companies distributing free +software will individually obtain patent licenses, thus in effect +transforming the program into proprietary software. To prevent this, +we have made it clear that any patent must be licensed for everyone's +free use or not licensed at all. + + Most GNU software, including some libraries, is covered by the ordinary +GNU General Public License, which was designed for utility programs. This +license, the GNU Library General Public License, applies to certain +designated libraries. This license is quite different from the ordinary +one; be sure to read it in full, and don't assume that anything in it is +the same as in the ordinary license. + + The reason we have a separate public license for some libraries is that +they blur the distinction we usually make between modifying or adding to a +program and simply using it. Linking a program with a library, without +changing the library, is in some sense simply using the library, and is +analogous to running a utility program or application program. However, in +a textual and legal sense, the linked executable is a combined work, a +derivative of the original library, and the ordinary General Public License +treats it as such. + + Because of this blurred distinction, using the ordinary General +Public License for libraries did not effectively promote software +sharing, because most developers did not use the libraries. We +concluded that weaker conditions might promote sharing better. + + However, unrestricted linking of non-free programs would deprive the +users of those programs of all benefit from the free status of the +libraries themselves. This Library General Public License is intended to +permit developers of non-free programs to use free libraries, while +preserving your freedom as a user of such programs to change the free +libraries that are incorporated in them. (We have not seen how to achieve +this as regards changes in header files, but we have achieved it as regards +changes in the actual functions of the Library.) The hope is that this +will lead to faster development of free libraries. + + The precise terms and conditions for copying, distribution and +modification follow. Pay close attention to the difference between a +"work based on the library" and a "work that uses the library". The +former contains code derived from the library, while the latter only +works together with the library. + + Note that it is possible for a library to be covered by the ordinary +General Public License rather than by this special one. + + GNU LIBRARY GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License Agreement applies to any software library which +contains a notice placed by the copyright holder or other authorized +party saying it may be distributed under the terms of this Library +General Public License (also called "this License"). Each licensee is +addressed as "you". + + A "library" means a collection of software functions and/or data +prepared so as to be conveniently linked with application programs +(which use some of those functions and data) to form executables. + + The "Library", below, refers to any such software library or work +which has been distributed under these terms. A "work based on the +Library" means either the Library or any derivative work under +copyright law: that is to say, a work containing the Library or a +portion of it, either verbatim or with modifications and/or translated +straightforwardly into another language. (Hereinafter, translation is +included without limitation in the term "modification".) + + "Source code" for a work means the preferred form of the work for +making modifications to it. For a library, complete source code means +all the source code for all modules it contains, plus any associated +interface definition files, plus the scripts used to control compilation +and installation of the library. + + Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running a program using the Library is not restricted, and output from +such a program is covered only if its contents constitute a work based +on the Library (independent of the use of the Library in a tool for +writing it). Whether that is true depends on what the Library does +and what the program that uses the Library does. + + 1. You may copy and distribute verbatim copies of the Library's +complete source code as you receive it, in any medium, provided that +you conspicuously and appropriately publish on each copy an +appropriate copyright notice and disclaimer of warranty; keep intact +all the notices that refer to this License and to the absence of any +warranty; and distribute a copy of this License along with the +Library. + + You may charge a fee for the physical act of transferring a copy, +and you may at your option offer warranty protection in exchange for a +fee. + + 2. You may modify your copy or copies of the Library or any portion +of it, thus forming a work based on the Library, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) The modified work must itself be a software library. + + b) You must cause the files modified to carry prominent notices + stating that you changed the files and the date of any change. + + c) You must cause the whole of the work to be licensed at no + charge to all third parties under the terms of this License. + + d) If a facility in the modified Library refers to a function or a + table of data to be supplied by an application program that uses + the facility, other than as an argument passed when the facility + is invoked, then you must make a good faith effort to ensure that, + in the event an application does not supply such function or + table, the facility still operates, and performs whatever part of + its purpose remains meaningful. + + (For example, a function in a library to compute square roots has + a purpose that is entirely well-defined independent of the + application. Therefore, Subsection 2d requires that any + application-supplied function or table used by this function must + be optional: if the application does not supply it, the square + root function must still compute square roots.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Library, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Library, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote +it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Library. + +In addition, mere aggregation of another work not based on the Library +with the Library (or with a work based on the Library) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may opt to apply the terms of the ordinary GNU General Public +License instead of this License to a given copy of the Library. To do +this, you must alter all the notices that refer to this License, so +that they refer to the ordinary GNU General Public License, version 2, +instead of to this License. (If a newer version than version 2 of the +ordinary GNU General Public License has appeared, then you can specify +that version instead if you wish.) Do not make any other change in +these notices. + + Once this change is made in a given copy, it is irreversible for +that copy, so the ordinary GNU General Public License applies to all +subsequent copies and derivative works made from that copy. + + This option is useful when you wish to copy part of the code of +the Library into a program that is not a library. + + 4. You may copy and distribute the Library (or a portion or +derivative of it, under Section 2) in object code or executable form +under the terms of Sections 1 and 2 above provided that you accompany +it with the complete corresponding machine-readable source code, which +must be distributed under the terms of Sections 1 and 2 above on a +medium customarily used for software interchange. + + If distribution of object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the +source code from the same place satisfies the requirement to +distribute the source code, even though third parties are not +compelled to copy the source along with the object code. + + 5. A program that contains no derivative of any portion of the +Library, but is designed to work with the Library by being compiled or +linked with it, is called a "work that uses the Library". Such a +work, in isolation, is not a derivative work of the Library, and +therefore falls outside the scope of this License. + + However, linking a "work that uses the Library" with the Library +creates an executable that is a derivative of the Library (because it +contains portions of the Library), rather than a "work that uses the +library". The executable is therefore covered by this License. +Section 6 states terms for distribution of such executables. + + When a "work that uses the Library" uses material from a header file +that is part of the Library, the object code for the work may be a +derivative work of the Library even though the source code is not. +Whether this is true is especially significant if the work can be +linked without the Library, or if the work is itself a library. The +threshold for this to be true is not precisely defined by law. + + If such an object file uses only numerical parameters, data +structure layouts and accessors, and small macros and small inline +functions (ten lines or less in length), then the use of the object +file is unrestricted, regardless of whether it is legally a derivative +work. (Executables containing this object code plus portions of the +Library will still fall under Section 6.) + + Otherwise, if the work is a derivative of the Library, you may +distribute the object code for the work under the terms of Section 6. +Any executables containing that work also fall under Section 6, +whether or not they are linked directly with the Library itself. + + 6. As an exception to the Sections above, you may also compile or +link a "work that uses the Library" with the Library to produce a +work containing portions of the Library, and distribute that work +under terms of your choice, provided that the terms permit +modification of the work for the customer's own use and reverse +engineering for debugging such modifications. + + You must give prominent notice with each copy of the work that the +Library is used in it and that the Library and its use are covered by +this License. You must supply a copy of this License. If the work +during execution displays copyright notices, you must include the +copyright notice for the Library among them, as well as a reference +directing the user to the copy of this License. Also, you must do one +of these things: + + a) Accompany the work with the complete corresponding + machine-readable source code for the Library including whatever + changes were used in the work (which must be distributed under + Sections 1 and 2 above); and, if the work is an executable linked + with the Library, with the complete machine-readable "work that + uses the Library", as object code and/or source code, so that the + user can modify the Library and then relink to produce a modified + executable containing the modified Library. (It is understood + that the user who changes the contents of definitions files in the + Library will not necessarily be able to recompile the application + to use the modified definitions.) + + b) Accompany the work with a written offer, valid for at + least three years, to give the same user the materials + specified in Subsection 6a, above, for a charge no more + than the cost of performing this distribution. + + c) If distribution of the work is made by offering access to copy + from a designated place, offer equivalent access to copy the above + specified materials from the same place. + + d) Verify that the user has already received a copy of these + materials or that you have already sent this user a copy. + + For an executable, the required form of the "work that uses the +Library" must include any data and utility programs needed for +reproducing the executable from it. However, as a special exception, +the source code distributed need not include anything that is normally +distributed (in either source or binary form) with the major +components (compiler, kernel, and so on) of the operating system on +which the executable runs, unless that component itself accompanies +the executable. + + It may happen that this requirement contradicts the license +restrictions of other proprietary libraries that do not normally +accompany the operating system. Such a contradiction means you cannot +use both them and the Library together in an executable that you +distribute. + + 7. You may place library facilities that are a work based on the +Library side-by-side in a single library together with other library +facilities not covered by this License, and distribute such a combined +library, provided that the separate distribution of the work based on +the Library and of the other library facilities is otherwise +permitted, and provided that you do these two things: + + a) Accompany the combined library with a copy of the same work + based on the Library, uncombined with any other library + facilities. This must be distributed under the terms of the + Sections above. + + b) Give prominent notice with the combined library of the fact + that part of it is a work based on the Library, and explaining + where to find the accompanying uncombined form of the same work. + + 8. You may not copy, modify, sublicense, link with, or distribute +the Library except as expressly provided under this License. Any +attempt otherwise to copy, modify, sublicense, link with, or +distribute the Library is void, and will automatically terminate your +rights under this License. However, parties who have received copies, +or rights, from you under this License will not have their licenses +terminated so long as such parties remain in full compliance. + + 9. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Library or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Library (or any work based on the +Library), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Library or works based on it. + + 10. Each time you redistribute the Library (or any work based on the +Library), the recipient automatically receives a license from the +original licensor to copy, distribute, link with or modify the Library +subject to these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 11. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Library at all. For example, if a patent +license would not permit royalty-free redistribution of the Library by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Library. + +If any portion of this section is held invalid or unenforceable under any +particular circumstance, the balance of the section is intended to apply, +and the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 12. If the distribution and/or use of the Library is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Library under this License may add +an explicit geographical distribution limitation excluding those countries, +so that distribution is permitted only in or among countries not thus +excluded. In such case, this License incorporates the limitation as if +written in the body of this License. + + 13. The Free Software Foundation may publish revised and/or new +versions of the Library General Public License from time to time. +Such new versions will be similar in spirit to the present version, +but may differ in detail to address new problems or concerns. + +Each version is given a distinguishing version number. If the Library +specifies a version number of this License which applies to it and +"any later version", you have the option of following the terms and +conditions either of that version or of any later version published by +the Free Software Foundation. If the Library does not specify a +license version number, you may choose any version ever published by +the Free Software Foundation. + + 14. If you wish to incorporate parts of the Library into other free +programs whose distribution conditions are incompatible with these, +write to the author to ask for permission. For software which is +copyrighted by the Free Software Foundation, write to the Free +Software Foundation; we sometimes make exceptions for this. Our +decision will be guided by the two goals of preserving the free status +of all derivatives of our free software and of promoting the sharing +and reuse of software generally. + + NO WARRANTY + + 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO +WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. +EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR +OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY +KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE +LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME +THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN +WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY +AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU +FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR +CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE +LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING +RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF +SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH +DAMAGES. + + END OF TERMS AND CONDITIONS + + Appendix: How to Apply These Terms to Your New Libraries + + If you develop a new library, and you want it to be of the greatest +possible use to the public, we recommend making it free software that +everyone can redistribute and change. You can do so by permitting +redistribution under these terms (or, alternatively, under the terms of the +ordinary General Public License). + + To apply these terms, attach the following notices to the library. It is +safest to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least the +"copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with this library; if not, write to the Free + Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + MA 02110-1301, USA + +Also add information on how to contact you by electronic and paper mail. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the library, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the + library `Frob' (a library for tweaking knobs) written by James Random Hacker. + + , 1 April 1990 + Ty Coon, President of Vice + +That's all there is to it! diff --git a/xpack-riscv-none-elf-gcc-13.4.0-1/distro-info/licenses/binutils-2.45/COPYING3 b/xpack-riscv-none-elf-gcc-13.4.0-1/distro-info/licenses/binutils-2.45/COPYING3 new file mode 100644 index 0000000..94a9ed0 --- /dev/null +++ b/xpack-riscv-none-elf-gcc-13.4.0-1/distro-info/licenses/binutils-2.45/COPYING3 @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. diff --git a/xpack-riscv-none-elf-gcc-13.4.0-1/distro-info/licenses/binutils-2.45/COPYING3.LIB b/xpack-riscv-none-elf-gcc-13.4.0-1/distro-info/licenses/binutils-2.45/COPYING3.LIB new file mode 100644 index 0000000..fc8a5de --- /dev/null +++ b/xpack-riscv-none-elf-gcc-13.4.0-1/distro-info/licenses/binutils-2.45/COPYING3.LIB @@ -0,0 +1,165 @@ + GNU LESSER GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + + This version of the GNU Lesser General Public License incorporates +the terms and conditions of version 3 of the GNU General Public +License, supplemented by the additional permissions listed below. + + 0. Additional Definitions. + + As used herein, "this License" refers to version 3 of the GNU Lesser +General Public License, and the "GNU GPL" refers to version 3 of the GNU +General Public License. + + "The Library" refers to a covered work governed by this License, +other than an Application or a Combined Work as defined below. + + An "Application" is any work that makes use of an interface provided +by the Library, but which is not otherwise based on the Library. +Defining a subclass of a class defined by the Library is deemed a mode +of using an interface provided by the Library. + + A "Combined Work" is a work produced by combining or linking an +Application with the Library. The particular version of the Library +with which the Combined Work was made is also called the "Linked +Version". + + The "Minimal Corresponding Source" for a Combined Work means the +Corresponding Source for the Combined Work, excluding any source code +for portions of the Combined Work that, considered in isolation, are +based on the Application, and not on the Linked Version. + + The "Corresponding Application Code" for a Combined Work means the +object code and/or source code for the Application, including any data +and utility programs needed for reproducing the Combined Work from the +Application, but excluding the System Libraries of the Combined Work. + + 1. Exception to Section 3 of the GNU GPL. + + You may convey a covered work under sections 3 and 4 of this License +without being bound by section 3 of the GNU GPL. + + 2. Conveying Modified Versions. + + If you modify a copy of the Library, and, in your modifications, a +facility refers to a function or data to be supplied by an Application +that uses the facility (other than as an argument passed when the +facility is invoked), then you may convey a copy of the modified +version: + + a) under this License, provided that you make a good faith effort to + ensure that, in the event an Application does not supply the + function or data, the facility still operates, and performs + whatever part of its purpose remains meaningful, or + + b) under the GNU GPL, with none of the additional permissions of + this License applicable to that copy. + + 3. Object Code Incorporating Material from Library Header Files. + + The object code form of an Application may incorporate material from +a header file that is part of the Library. You may convey such object +code under terms of your choice, provided that, if the incorporated +material is not limited to numerical parameters, data structure +layouts and accessors, or small macros, inline functions and templates +(ten or fewer lines in length), you do both of the following: + + a) Give prominent notice with each copy of the object code that the + Library is used in it and that the Library and its use are + covered by this License. + + b) Accompany the object code with a copy of the GNU GPL and this license + document. + + 4. Combined Works. + + You may convey a Combined Work under terms of your choice that, +taken together, effectively do not restrict modification of the +portions of the Library contained in the Combined Work and reverse +engineering for debugging such modifications, if you also do each of +the following: + + a) Give prominent notice with each copy of the Combined Work that + the Library is used in it and that the Library and its use are + covered by this License. + + b) Accompany the Combined Work with a copy of the GNU GPL and this license + document. + + c) For a Combined Work that displays copyright notices during + execution, include the copyright notice for the Library among + these notices, as well as a reference directing the user to the + copies of the GNU GPL and this license document. + + d) Do one of the following: + + 0) Convey the Minimal Corresponding Source under the terms of this + License, and the Corresponding Application Code in a form + suitable for, and under terms that permit, the user to + recombine or relink the Application with a modified version of + the Linked Version to produce a modified Combined Work, in the + manner specified by section 6 of the GNU GPL for conveying + Corresponding Source. + + 1) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (a) uses at run time + a copy of the Library already present on the user's computer + system, and (b) will operate properly with a modified version + of the Library that is interface-compatible with the Linked + Version. + + e) Provide Installation Information, but only if you would otherwise + be required to provide such information under section 6 of the + GNU GPL, and only to the extent that such information is + necessary to install and execute a modified version of the + Combined Work produced by recombining or relinking the + Application with a modified version of the Linked Version. (If + you use option 4d0, the Installation Information must accompany + the Minimal Corresponding Source and Corresponding Application + Code. If you use option 4d1, you must provide the Installation + Information in the manner specified by section 6 of the GNU GPL + for conveying Corresponding Source.) + + 5. Combined Libraries. + + You may place library facilities that are a work based on the +Library side by side in a single library together with other library +facilities that are not Applications and are not covered by this +License, and convey such a combined library under terms of your +choice, if you do both of the following: + + a) Accompany the combined library with a copy of the same work based + on the Library, uncombined with any other library facilities, + conveyed under the terms of this License. + + b) Give prominent notice with the combined library that part of it + is a work based on the Library, and explaining where to find the + accompanying uncombined form of the same work. + + 6. Revised Versions of the GNU Lesser General Public License. + + The Free Software Foundation may publish revised and/or new versions +of the GNU Lesser General Public License from time to time. Such new +versions will be similar in spirit to the present version, but may +differ in detail to address new problems or concerns. + + Each version is given a distinguishing version number. If the +Library as you received it specifies that a certain numbered version +of the GNU Lesser General Public License "or any later version" +applies to it, you have the option of following the terms and +conditions either of that published version or of any later version +published by the Free Software Foundation. If the Library as you +received it does not specify a version number of the GNU Lesser +General Public License, you may choose any version of the GNU Lesser +General Public License ever published by the Free Software Foundation. + + If the Library as you received it specifies that a proxy can decide +whether future versions of the GNU Lesser General Public License shall +apply, that proxy's public statement of acceptance of any version is +permanent authorization for you to choose that version for the +Library. diff --git a/xpack-riscv-none-elf-gcc-13.4.0-1/distro-info/licenses/binutils-2.45/README b/xpack-riscv-none-elf-gcc-13.4.0-1/distro-info/licenses/binutils-2.45/README new file mode 100644 index 0000000..eb0e436 --- /dev/null +++ b/xpack-riscv-none-elf-gcc-13.4.0-1/distro-info/licenses/binutils-2.45/README @@ -0,0 +1,47 @@ + README for GNU development tools + +This directory contains various GNU compilers, assemblers, linkers, +debuggers, etc., plus their support routines, definitions, and documentation. + +If you are receiving this as part of a GDB release, see the file gdb/README. +If with a binutils release, see binutils/README; if with a libg++ release, +see libg++/README, etc. That'll give you info about this +package -- supported targets, how to use it, how to report bugs, etc. + +It is now possible to automatically configure and build a variety of +tools with one command. To build all of the tools contained herein, +run the ``configure'' script here, e.g.: + + ./configure + make + +To install them (by default in /usr/local/bin, /usr/local/lib, etc), +then do: + make install + +(If the configure script can't determine your type of computer, give it +the name as an argument, for instance ``./configure sun4''. You can +use the script ``config.sub'' to test whether a name is recognized; if +it is, config.sub translates it to a triplet specifying CPU, vendor, +and OS.) + +If you have more than one compiler on your system, it is often best to +explicitly set CC in the environment before running configure, and to +also set CC when running make. For example (assuming sh/bash/ksh): + + CC=gcc ./configure + make + +A similar example using csh: + + setenv CC gcc + ./configure + make + +Much of the code and documentation enclosed is copyright by +the Free Software Foundation, Inc. See the file COPYING or +COPYING.LIB in the various directories, for a description of the +GNU General Public License terms under which you can copy the files. + +REPORTING BUGS: Again, see gdb/README, binutils/README, etc., for info +on where and how to report problems. diff --git a/xpack-riscv-none-elf-gcc-13.4.0-1/distro-info/licenses/binutils-2.45/README-maintainer-mode b/xpack-riscv-none-elf-gcc-13.4.0-1/distro-info/licenses/binutils-2.45/README-maintainer-mode new file mode 100644 index 0000000..fdafa69 --- /dev/null +++ b/xpack-riscv-none-elf-gcc-13.4.0-1/distro-info/licenses/binutils-2.45/README-maintainer-mode @@ -0,0 +1,35 @@ + + Notes on enabling maintainer mode + +Note that if you configure with --enable-maintainer-mode, you will need +special versions of automake, autoconf, libtool and gettext. You will +find the sources for these in the respective upstream directories: + + https://ftp.gnu.org/gnu/autoconf + https://ftp.gnu.org/gnu/automake + https://ftp.gnu.org/gnu/libtool + https://ftp.gnu.org/gnu/gettext + +The required versions of the tools for this tree are: + + autoconf 2.69 + automake 1.15.1 + libtool 2.2.6 + gettext 0.16.1 + +Note - "make distclean" does not work with maintainer mode enabled. +The Makefiles in the some of the po/ subdirectories depend upon the +Makefiles in their parent directories, and distclean will delete the +Makefiles in the parent directories before running the Makefiles in +the child directories. There is no easy way around this (short of +changing the automake macros) as these dependencies need to exist in +order to correctly build the NLS files. + +When running the testsuites a minimum version of dejagnu is also needed. +Dejagnu can be found here: + + https://ftp.gnu.org/gnu/dejagnu/ + +The minimum version required is: + + dejagnu 1.5.3 diff --git a/xpack-riscv-none-elf-gcc-13.4.0-1/distro-info/licenses/bzip2-1.0.8/CHANGES b/xpack-riscv-none-elf-gcc-13.4.0-1/distro-info/licenses/bzip2-1.0.8/CHANGES new file mode 100644 index 0000000..30afead --- /dev/null +++ b/xpack-riscv-none-elf-gcc-13.4.0-1/distro-info/licenses/bzip2-1.0.8/CHANGES @@ -0,0 +1,356 @@ + ------------------------------------------------------------------ + This file is part of bzip2/libbzip2, a program and library for + lossless, block-sorting data compression. + + bzip2/libbzip2 version 1.0.8 of 13 July 2019 + Copyright (C) 1996-2019 Julian Seward + + Please read the WARNING, DISCLAIMER and PATENTS sections in the + README file. + + This program is released under the terms of the license contained + in the file LICENSE. + ------------------------------------------------------------------ + + +0.9.0 +~~~~~ +First version. + + +0.9.0a +~~~~~~ +Removed 'ranlib' from Makefile, since most modern Unix-es +don't need it, or even know about it. + + +0.9.0b +~~~~~~ +Fixed a problem with error reporting in bzip2.c. This does not effect +the library in any way. Problem is: versions 0.9.0 and 0.9.0a (of the +program proper) compress and decompress correctly, but give misleading +error messages (internal panics) when an I/O error occurs, instead of +reporting the problem correctly. This shouldn't give any data loss +(as far as I can see), but is confusing. + +Made the inline declarations disappear for non-GCC compilers. + + +0.9.0c +~~~~~~ +Fixed some problems in the library pertaining to some boundary cases. +This makes the library behave more correctly in those situations. The +fixes apply only to features (calls and parameters) not used by +bzip2.c, so the non-fixedness of them in previous versions has no +effect on reliability of bzip2.c. + +In bzlib.c: + * made zero-length BZ_FLUSH work correctly in bzCompress(). + * fixed bzWrite/bzRead to ignore zero-length requests. + * fixed bzread to correctly handle read requests after EOF. + * wrong parameter order in call to bzDecompressInit in + bzBuffToBuffDecompress. Fixed. + +In compress.c: + * changed setting of nGroups in sendMTFValues() so as to + do a bit better on small files. This _does_ effect + bzip2.c. + + +0.9.5a +~~~~~~ +Major change: add a fallback sorting algorithm (blocksort.c) +to give reasonable behaviour even for very repetitive inputs. +Nuked --repetitive-best and --repetitive-fast since they are +no longer useful. + +Minor changes: mostly a whole bunch of small changes/ +bugfixes in the driver (bzip2.c). Changes pertaining to the +user interface are: + + allow decompression of symlink'd files to stdout + decompress/test files even without .bz2 extension + give more accurate error messages for I/O errors + when compressing/decompressing to stdout, don't catch control-C + read flags from BZIP2 and BZIP environment variables + decline to break hard links to a file unless forced with -f + allow -c flag even with no filenames + preserve file ownerships as far as possible + make -s -1 give the expected block size (100k) + add a flag -q --quiet to suppress nonessential warnings + stop decoding flags after --, so files beginning in - can be handled + resolved inconsistent naming: bzcat or bz2cat ? + bzip2 --help now returns 0 + +Programming-level changes are: + + fixed syntax error in GET_LL4 for Borland C++ 5.02 + let bzBuffToBuffDecompress return BZ_DATA_ERROR{_MAGIC} + fix overshoot of mode-string end in bzopen_or_bzdopen + wrapped bzlib.h in #ifdef __cplusplus ... extern "C" { ... } + close file handles under all error conditions + added minor mods so it compiles with DJGPP out of the box + fixed Makefile so it doesn't give problems with BSD make + fix uninitialised memory reads in dlltest.c + +0.9.5b +~~~~~~ +Open stdin/stdout in binary mode for DJGPP. + +0.9.5c +~~~~~~ +Changed BZ_N_OVERSHOOT to be ... + 2 instead of ... + 1. The + 1 +version could cause the sorted order to be wrong in some extremely +obscure cases. Also changed setting of quadrant in blocksort.c. + +0.9.5d +~~~~~~ +The only functional change is to make bzlibVersion() in the library +return the correct string. This has no effect whatsoever on the +functioning of the bzip2 program or library. Added a couple of casts +so the library compiles without warnings at level 3 in MS Visual +Studio 6.0. Included a Y2K statement in the file Y2K_INFO. All other +changes are minor documentation changes. + +1.0 +~~~ +Several minor bugfixes and enhancements: + +* Large file support. The library uses 64-bit counters to + count the volume of data passing through it. bzip2.c + is now compiled with -D_FILE_OFFSET_BITS=64 to get large + file support from the C library. -v correctly prints out + file sizes greater than 4 gigabytes. All these changes have + been made without assuming a 64-bit platform or a C compiler + which supports 64-bit ints, so, except for the C library + aspect, they are fully portable. + +* Decompression robustness. The library/program should be + robust to any corruption of compressed data, detecting and + handling _all_ corruption, instead of merely relying on + the CRCs. What this means is that the program should + never crash, given corrupted data, and the library should + always return BZ_DATA_ERROR. + +* Fixed an obscure race-condition bug only ever observed on + Solaris, in which, if you were very unlucky and issued + control-C at exactly the wrong time, both input and output + files would be deleted. + +* Don't run out of file handles on test/decompression when + large numbers of files have invalid magic numbers. + +* Avoid library namespace pollution. Prefix all exported + symbols with BZ2_. + +* Minor sorting enhancements from my DCC2000 paper. + +* Advance the version number to 1.0, so as to counteract the + (false-in-this-case) impression some people have that programs + with version numbers less than 1.0 are in some way, experimental, + pre-release versions. + +* Create an initial Makefile-libbz2_so to build a shared library. + Yes, I know I should really use libtool et al ... + +* Make the program exit with 2 instead of 0 when decompression + fails due to a bad magic number (ie, an invalid bzip2 header). + Also exit with 1 (as the manual claims :-) whenever a diagnostic + message would have been printed AND the corresponding operation + is aborted, for example + bzip2: Output file xx already exists. + When a diagnostic message is printed but the operation is not + aborted, for example + bzip2: Can't guess original name for wurble -- using wurble.out + then the exit value 0 is returned, unless some other problem is + also detected. + + I think it corresponds more closely to what the manual claims now. + + +1.0.1 +~~~~~ +* Modified dlltest.c so it uses the new BZ2_ naming scheme. +* Modified makefile-msc to fix minor build probs on Win2k. +* Updated README.COMPILATION.PROBLEMS. + +There are no functionality changes or bug fixes relative to version +1.0.0. This is just a documentation update + a fix for minor Win32 +build problems. For almost everyone, upgrading from 1.0.0 to 1.0.1 is +utterly pointless. Don't bother. + + +1.0.2 +~~~~~ +A bug fix release, addressing various minor issues which have appeared +in the 18 or so months since 1.0.1 was released. Most of the fixes +are to do with file-handling or documentation bugs. To the best of my +knowledge, there have been no data-loss-causing bugs reported in the +compression/decompression engine of 1.0.0 or 1.0.1. + +Note that this release does not improve the rather crude build system +for Unix platforms. The general plan here is to autoconfiscate/ +libtoolise 1.0.2 soon after release, and release the result as 1.1.0 +or perhaps 1.2.0. That, however, is still just a plan at this point. + +Here are the changes in 1.0.2. Bug-reporters and/or patch-senders in +parentheses. + +* Fix an infinite segfault loop in 1.0.1 when a directory is + encountered in -f (force) mode. + (Trond Eivind Glomsrod, Nicholas Nethercote, Volker Schmidt) + +* Avoid double fclose() of output file on certain I/O error paths. + (Solar Designer) + +* Don't fail with internal error 1007 when fed a long stream (> 48MB) + of byte 251. Also print useful message suggesting that 1007s may be + caused by bad memory. + (noticed by Juan Pedro Vallejo, fixed by me) + +* Fix uninitialised variable silly bug in demo prog dlltest.c. + (Jorj Bauer) + +* Remove 512-MB limitation on recovered file size for bzip2recover + on selected platforms which support 64-bit ints. At the moment + all GCC supported platforms, and Win32. + (me, Alson van der Meulen) + +* Hard-code header byte values, to give correct operation on platforms + using EBCDIC as their native character set (IBM's OS/390). + (Leland Lucius) + +* Copy file access times correctly. + (Marty Leisner) + +* Add distclean and check targets to Makefile. + (Michael Carmack) + +* Parameterise use of ar and ranlib in Makefile. Also add $(LDFLAGS). + (Rich Ireland, Bo Thorsen) + +* Pass -p (create parent dirs as needed) to mkdir during make install. + (Jeremy Fusco) + +* Dereference symlinks when copying file permissions in -f mode. + (Volker Schmidt) + +* Majorly simplify implementation of uInt64_qrm10. + (Bo Lindbergh) + +* Check the input file still exists before deleting the output one, + when aborting in cleanUpAndFail(). + (Joerg Prante, Robert Linden, Matthias Krings) + +Also a bunch of patches courtesy of Philippe Troin, the Debian maintainer +of bzip2: + +* Wrapper scripts (with manpages): bzdiff, bzgrep, bzmore. + +* Spelling changes and minor enhancements in bzip2.1. + +* Avoid race condition between creating the output file and setting its + interim permissions safely, by using fopen_output_safely(). + No changes to bzip2recover since there is no issue with file + permissions there. + +* do not print senseless report with -v when compressing an empty + file. + +* bzcat -f works on non-bzip2 files. + +* do not try to escape shell meta-characters on unix (the shell takes + care of these). + +* added --fast and --best aliases for -1 -9 for gzip compatibility. + + +1.0.3 (15 Feb 05) +~~~~~~~~~~~~~~~~~ +Fixes some minor bugs since the last version, 1.0.2. + +* Further robustification against corrupted compressed data. + There are currently no known bitstreams which can cause the + decompressor to crash, loop or access memory which does not + belong to it. If you are using bzip2 or the library to + decompress bitstreams from untrusted sources, an upgrade + to 1.0.3 is recommended. This fixes CAN-2005-1260. + +* The documentation has been converted to XML, from which html + and pdf can be derived. + +* Various minor bugs in the documentation have been fixed. + +* Fixes for various compilation warnings with newer versions of + gcc, and on 64-bit platforms. + +* The BZ_NO_STDIO cpp symbol was not properly observed in 1.0.2. + This has been fixed. + + +1.0.4 (20 Dec 06) +~~~~~~~~~~~~~~~~~ +Fixes some minor bugs since the last version, 1.0.3. + +* Fix file permissions race problem (CAN-2005-0953). + +* Avoid possible segfault in BZ2_bzclose. From Coverity's NetBSD + scan. + +* 'const'/prototype cleanups in the C code. + +* Change default install location to /usr/local, and handle multiple + 'make install's without error. + +* Sanitise file names more carefully in bzgrep. Fixes CAN-2005-0758 + to the extent that applies to bzgrep. + +* Use 'mktemp' rather than 'tempfile' in bzdiff. + +* Tighten up a couple of assertions in blocksort.c following automated + analysis. + +* Fix minor doc/comment bugs. + + +1.0.5 (10 Dec 07) +~~~~~~~~~~~~~~~~~ +Security fix only. Fixes CERT-FI 20469 as it applies to bzip2. + + +1.0.6 (6 Sept 10) +~~~~~~~~~~~~~~~~~ + +* Security fix for CVE-2010-0405. This was reported by Mikolaj + Izdebski. + +* Make the documentation build on Ubuntu 10.04 + +1.0.7 (27 Jun 19) +~~~~~~~~~~~~~~~~~ + +* Fix undefined behavior in the macros SET_BH, CLEAR_BH, & ISSET_BH + +* bzip2: Fix return value when combining --test,-t and -q. + +* bzip2recover: Fix buffer overflow for large argv[0] + +* bzip2recover: Fix use after free issue with outFile (CVE-2016-3189) + +* Make sure nSelectors is not out of range (CVE-2019-12900) + +1.0.8 (13 Jul 19) +~~~~~~~~~~~~~~~~~ + +* Accept as many selectors as the file format allows. + This relaxes the fix for CVE-2019-12900 from 1.0.7 + so that bzip2 allows decompression of bz2 files that + use (too) many selectors again. + +* Fix handling of large (> 4GB) files on Windows. + +* Cleanup of bzdiff and bzgrep scripts so they don't use + any bash extensions and handle multiple archives correctly. + +* There is now a bz2-files testsuite at + https://sourceware.org/git/bzip2-tests.git diff --git a/xpack-riscv-none-elf-gcc-13.4.0-1/distro-info/licenses/bzip2-1.0.8/LICENSE b/xpack-riscv-none-elf-gcc-13.4.0-1/distro-info/licenses/bzip2-1.0.8/LICENSE new file mode 100644 index 0000000..81a37ea --- /dev/null +++ b/xpack-riscv-none-elf-gcc-13.4.0-1/distro-info/licenses/bzip2-1.0.8/LICENSE @@ -0,0 +1,42 @@ + +-------------------------------------------------------------------------- + +This program, "bzip2", the associated library "libbzip2", and all +documentation, are copyright (C) 1996-2019 Julian R Seward. All +rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + +2. The origin of this software must not be misrepresented; you must + not claim that you wrote the original software. If you use this + software in a product, an acknowledgment in the product + documentation would be appreciated but is not required. + +3. Altered source versions must be plainly marked as such, and must + not be misrepresented as being the original software. + +4. The name of the author may not be used to endorse or promote + products derived from this software without specific prior written + permission. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS +OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE +GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Julian Seward, jseward@acm.org +bzip2/libbzip2 version 1.0.8 of 13 July 2019 + +-------------------------------------------------------------------------- diff --git a/xpack-riscv-none-elf-gcc-13.4.0-1/distro-info/licenses/bzip2-1.0.8/README b/xpack-riscv-none-elf-gcc-13.4.0-1/distro-info/licenses/bzip2-1.0.8/README new file mode 100644 index 0000000..b9c6099 --- /dev/null +++ b/xpack-riscv-none-elf-gcc-13.4.0-1/distro-info/licenses/bzip2-1.0.8/README @@ -0,0 +1,196 @@ + +This is the README for bzip2/libzip2. +This version is fully compatible with the previous public releases. + +------------------------------------------------------------------ +This file is part of bzip2/libbzip2, a program and library for +lossless, block-sorting data compression. + +bzip2/libbzip2 version 1.0.8 of 13 July 2019 +Copyright (C) 1996-2019 Julian Seward + +Please read the WARNING, DISCLAIMER and PATENTS sections in this file. + +This program is released under the terms of the license contained +in the file LICENSE. +------------------------------------------------------------------ + +Complete documentation is available in Postscript form (manual.ps), +PDF (manual.pdf) or html (manual.html). A plain-text version of the +manual page is available as bzip2.txt. + + +HOW TO BUILD -- UNIX + +Type 'make'. This builds the library libbz2.a and then the programs +bzip2 and bzip2recover. Six self-tests are run. If the self-tests +complete ok, carry on to installation: + +To install in /usr/local/bin, /usr/local/lib, /usr/local/man and +/usr/local/include, type + + make install + +To install somewhere else, eg, /xxx/yyy/{bin,lib,man,include}, type + + make install PREFIX=/xxx/yyy + +If you are (justifiably) paranoid and want to see what 'make install' +is going to do, you can first do + + make -n install or + make -n install PREFIX=/xxx/yyy respectively. + +The -n instructs make to show the commands it would execute, but not +actually execute them. + + +HOW TO BUILD -- UNIX, shared library libbz2.so. + +Do 'make -f Makefile-libbz2_so'. This Makefile seems to work for +Linux-ELF (RedHat 7.2 on an x86 box), with gcc. I make no claims +that it works for any other platform, though I suspect it probably +will work for most platforms employing both ELF and gcc. + +bzip2-shared, a client of the shared library, is also built, but not +self-tested. So I suggest you also build using the normal Makefile, +since that conducts a self-test. A second reason to prefer the +version statically linked to the library is that, on x86 platforms, +building shared objects makes a valuable register (%ebx) unavailable +to gcc, resulting in a slowdown of 10%-20%, at least for bzip2. + +Important note for people upgrading .so's from 0.9.0/0.9.5 to version +1.0.X. All the functions in the library have been renamed, from (eg) +bzCompress to BZ2_bzCompress, to avoid namespace pollution. +Unfortunately this means that the libbz2.so created by +Makefile-libbz2_so will not work with any program which used an older +version of the library. I do encourage library clients to make the +effort to upgrade to use version 1.0, since it is both faster and more +robust than previous versions. + + +HOW TO BUILD -- Windows 95, NT, DOS, Mac, etc. + +It's difficult for me to support compilation on all these platforms. +My approach is to collect binaries for these platforms, and put them +on the master web site (https://sourceware.org/bzip2/). Look there. However +(FWIW), bzip2-1.0.X is very standard ANSI C and should compile +unmodified with MS Visual C. If you have difficulties building, you +might want to read README.COMPILATION.PROBLEMS. + +At least using MS Visual C++ 6, you can build from the unmodified +sources by issuing, in a command shell: + + nmake -f makefile.msc + +(you may need to first run the MSVC-provided script VCVARS32.BAT + so as to set up paths to the MSVC tools correctly). + + +VALIDATION + +Correct operation, in the sense that a compressed file can always be +decompressed to reproduce the original, is obviously of paramount +importance. To validate bzip2, I used a modified version of Mark +Nelson's churn program. Churn is an automated test driver which +recursively traverses a directory structure, using bzip2 to compress +and then decompress each file it encounters, and checking that the +decompressed data is the same as the original. + + + +Please read and be aware of the following: + +WARNING: + + This program and library (attempts to) compress data by + performing several non-trivial transformations on it. + Unless you are 100% familiar with *all* the algorithms + contained herein, and with the consequences of modifying them, + you should NOT meddle with the compression or decompression + machinery. Incorrect changes can and very likely *will* + lead to disastrous loss of data. + + +DISCLAIMER: + + I TAKE NO RESPONSIBILITY FOR ANY LOSS OF DATA ARISING FROM THE + USE OF THIS PROGRAM/LIBRARY, HOWSOEVER CAUSED. + + Every compression of a file implies an assumption that the + compressed file can be decompressed to reproduce the original. + Great efforts in design, coding and testing have been made to + ensure that this program works correctly. However, the complexity + of the algorithms, and, in particular, the presence of various + special cases in the code which occur with very low but non-zero + probability make it impossible to rule out the possibility of bugs + remaining in the program. DO NOT COMPRESS ANY DATA WITH THIS + PROGRAM UNLESS YOU ARE PREPARED TO ACCEPT THE POSSIBILITY, HOWEVER + SMALL, THAT THE DATA WILL NOT BE RECOVERABLE. + + That is not to say this program is inherently unreliable. + Indeed, I very much hope the opposite is true. bzip2/libbzip2 + has been carefully constructed and extensively tested. + + +PATENTS: + + To the best of my knowledge, bzip2/libbzip2 does not use any + patented algorithms. However, I do not have the resources + to carry out a patent search. Therefore I cannot give any + guarantee of the above statement. + + + +WHAT'S NEW IN 0.9.0 (as compared to 0.1pl2) ? + + * Approx 10% faster compression, 30% faster decompression + * -t (test mode) is a lot quicker + * Can decompress concatenated compressed files + * Programming interface, so programs can directly read/write .bz2 files + * Less restrictive (BSD-style) licensing + * Flag handling more compatible with GNU gzip + * Much more documentation, i.e., a proper user manual + * Hopefully, improved portability (at least of the library) + +WHAT'S NEW IN 0.9.5 ? + + * Compression speed is much less sensitive to the input + data than in previous versions. Specifically, the very + slow performance caused by repetitive data is fixed. + * Many small improvements in file and flag handling. + * A Y2K statement. + +WHAT'S NEW IN 1.0.x ? + + See the CHANGES file. + +I hope you find bzip2 useful. Feel free to contact the developers at + bzip2-devel@sourceware.org +if you have any suggestions or queries. Many people mailed me with +comments, suggestions and patches after the releases of bzip-0.15, +bzip-0.21, and bzip2 versions 0.1pl2, 0.9.0, 0.9.5, 1.0.0, 1.0.1, +1.0.2 and 1.0.3, and the changes in bzip2 are largely a result of this +feedback. I thank you for your comments. + +bzip2's "home" is https://sourceware.org/bzip2/ + +Julian Seward +jseward@acm.org +Cambridge, UK. + +18 July 1996 (version 0.15) +25 August 1996 (version 0.21) + 7 August 1997 (bzip2, version 0.1) +29 August 1997 (bzip2, version 0.1pl2) +23 August 1998 (bzip2, version 0.9.0) + 8 June 1999 (bzip2, version 0.9.5) + 4 Sept 1999 (bzip2, version 0.9.5d) + 5 May 2000 (bzip2, version 1.0pre8) +30 December 2001 (bzip2, version 1.0.2pre1) +15 February 2005 (bzip2, version 1.0.3) +20 December 2006 (bzip2, version 1.0.4) +10 December 2007 (bzip2, version 1.0.5) + 6 Sept 2010 (bzip2, version 1.0.6) +27 June 2019 (bzip2, version 1.0.7) +13 July 2019 (bzip2, version 1.0.8) diff --git a/xpack-riscv-none-elf-gcc-13.4.0-1/distro-info/licenses/bzip2-1.0.8/README.COMPILATION.PROBLEMS b/xpack-riscv-none-elf-gcc-13.4.0-1/distro-info/licenses/bzip2-1.0.8/README.COMPILATION.PROBLEMS new file mode 100644 index 0000000..fa317a5 --- /dev/null +++ b/xpack-riscv-none-elf-gcc-13.4.0-1/distro-info/licenses/bzip2-1.0.8/README.COMPILATION.PROBLEMS @@ -0,0 +1,58 @@ +------------------------------------------------------------------ +This file is part of bzip2/libbzip2, a program and library for +lossless, block-sorting data compression. + +bzip2/libbzip2 version 1.0.8 of 13 July 2019 +Copyright (C) 1996-2019 Julian Seward + +Please read the WARNING, DISCLAIMER and PATENTS sections in the +README file. + +This program is released under the terms of the license contained +in the file LICENSE. +------------------------------------------------------------------ + +bzip2 should compile without problems on the vast majority of +platforms. Using the supplied Makefile, I've built and tested it +myself for x86-linux and amd64-linux. With makefile.msc, Visual C++ +6.0 and nmake, you can build a native Win32 version too. Large file +support seems to work correctly on at least on amd64-linux. + +When I say "large file" I mean a file of size 2,147,483,648 (2^31) +bytes or above. Many older OSs can't handle files above this size, +but many newer ones can. Large files are pretty huge -- most files +you'll encounter are not Large Files. + +Early versions of bzip2 (0.1, 0.9.0, 0.9.5) compiled on a wide variety +of platforms without difficulty, and I hope this version will continue +in that tradition. However, in order to support large files, I've had +to include the define -D_FILE_OFFSET_BITS=64 in the Makefile. This +can cause problems. + +The technique of adding -D_FILE_OFFSET_BITS=64 to get large file +support is, as far as I know, the Recommended Way to get correct large +file support. For more details, see the Large File Support +Specification, published by the Large File Summit, at + + http://ftp.sas.com/standards/large.file + +As a general comment, if you get compilation errors which you think +are related to large file support, try removing the above define from +the Makefile, ie, delete the line + + BIGFILES=-D_FILE_OFFSET_BITS=64 + +from the Makefile, and do 'make clean ; make'. This will give you a +version of bzip2 without large file support, which, for most +applications, is probably not a problem. + +Alternatively, try some of the platform-specific hints listed below. + +You can use the spewG.c program to generate huge files to test bzip2's +large file support, if you are feeling paranoid. Be aware though that +any compilation problems which affect bzip2 will also affect spewG.c, +alas. + +AIX: I have reports that for large file support, you need to specify +-D_LARGE_FILES rather than -D_FILE_OFFSET_BITS=64. I have not tested +this myself. diff --git a/xpack-riscv-none-elf-gcc-13.4.0-1/distro-info/licenses/bzip2-1.0.8/README.XML.STUFF b/xpack-riscv-none-elf-gcc-13.4.0-1/distro-info/licenses/bzip2-1.0.8/README.XML.STUFF new file mode 100644 index 0000000..1503476 --- /dev/null +++ b/xpack-riscv-none-elf-gcc-13.4.0-1/distro-info/licenses/bzip2-1.0.8/README.XML.STUFF @@ -0,0 +1,45 @@ + ---------------------------------------------------------------- + This file is part of bzip2/libbzip2, a program and library for + lossless, block-sorting data compression. + + bzip2/libbzip2 version 1.0.8 of 13 July 2019 + Copyright (C) 1996-2019 Julian Seward + + Please read the WARNING, DISCLAIMER and PATENTS sections in the + README file. + + This program is released under the terms of the license contained + in the file LICENSE. + ---------------------------------------------------------------- + +The script xmlproc.sh takes an xml file as input, +and processes it to create .pdf, .html or .ps output. +It uses format.pl, a perl script to format
 blocks nicely,
+ and add CDATA tags so writers do not have to use eg. < 
+
+The file "entities.xml" must be edited to reflect current
+version, year, etc.
+
+
+Usage:
+
+  ./xmlproc.sh -v manual.xml
+  Validates an xml file to ensure no dtd-compliance errors
+
+  ./xmlproc.sh -html manual.xml
+  Output: manual.html
+
+  ./xmlproc.sh -pdf manual.xml
+  Output: manual.pdf
+
+  ./xmlproc.sh -ps manual.xml
+  Output: manual.ps
+
+
+Notum bene: 
+- pdfxmltex barfs if given a filename with an underscore in it
+
+- xmltex won't work yet - there's a bug in passivetex
+    which we are all waiting for Sebastian to fix.
+  So we are going the xml -> pdf -> ps route for the time being,
+    using pdfxmltex.
diff --git a/xpack-riscv-none-elf-gcc-13.4.0-1/distro-info/licenses/expat-2.7.3/AUTHORS b/xpack-riscv-none-elf-gcc-13.4.0-1/distro-info/licenses/expat-2.7.3/AUTHORS
new file mode 100644
index 0000000..99475bb
--- /dev/null
+++ b/xpack-riscv-none-elf-gcc-13.4.0-1/distro-info/licenses/expat-2.7.3/AUTHORS
@@ -0,0 +1,10 @@
+Expat is brought to you by:
+
+Clark Cooper
+Fred L. Drake, Jr.
+Greg Stein
+James Clark
+Karl Waclawek
+Rhodri James
+Sebastian Pipping
+Steven Solie
diff --git a/xpack-riscv-none-elf-gcc-13.4.0-1/distro-info/licenses/expat-2.7.3/CMake.README b/xpack-riscv-none-elf-gcc-13.4.0-1/distro-info/licenses/expat-2.7.3/CMake.README
new file mode 100644
index 0000000..eb6215c
--- /dev/null
+++ b/xpack-riscv-none-elf-gcc-13.4.0-1/distro-info/licenses/expat-2.7.3/CMake.README
@@ -0,0 +1,42 @@
+== How to build expat with cmake (experimental) ==
+
+The cmake based buildsystem for expat works on Windows (cygwin, mingw, Visual
+Studio) and should work on all other platform cmake supports.
+
+Assuming ~/expat-2.7.3 is the source directory of expat, add a subdirectory
+build and change into that directory:
+~/expat-2.7.3$ mkdir build && cd build
+~/expat-2.7.3/build$
+
+From that directory, call cmake first, then call make, make test and
+make install in the usual way:
+~/expat-2.7.3/build$ cmake ..
+-- The C compiler identification is GNU
+-- The CXX compiler identification is GNU
+....
+-- Configuring done
+-- Generating done
+-- Build files have been written to: /home/patrick/expat-2.7.3/build
+
+If you want to specify the install location for your files, append
+-DCMAKE_INSTALL_PREFIX=/your/install/path to the cmake call.
+
+~/expat-2.7.3/build$ make && make test && make install
+Scanning dependencies of target expat
+[  5%] Building C object CMakeFiles/expat.dir/lib/xmlparse.c.o
+[ 11%] Building C object CMakeFiles/expat.dir/lib/xmlrole.c.o
+....
+-- Installing: /usr/local/lib/pkgconfig/expat.pc
+-- Installing: /usr/local/bin/xmlwf
+-- Installing: /usr/local/share/man/man1/xmlwf.1
+
+For Windows builds, you must make sure to call cmake from an environment where
+your compiler is reachable, that means either you call it from the
+Visual Studio Command Prompt or when using mingw, you must open a cmd.exe and
+make sure that gcc can be called. On Windows, you also might want to specify a
+special Generator for CMake:
+for Visual Studio builds do:
+cmake .. -G "Visual Studio 17 2022" && msbuild /m expat.sln
+for mingw builds do:
+cmake .. -G "MinGW Makefiles" -DCMAKE_INSTALL_PREFIX=D:\expat-install
+    && gmake && gmake install
diff --git a/xpack-riscv-none-elf-gcc-13.4.0-1/distro-info/licenses/expat-2.7.3/COPYING b/xpack-riscv-none-elf-gcc-13.4.0-1/distro-info/licenses/expat-2.7.3/COPYING
new file mode 100644
index 0000000..c6d184a
--- /dev/null
+++ b/xpack-riscv-none-elf-gcc-13.4.0-1/distro-info/licenses/expat-2.7.3/COPYING
@@ -0,0 +1,21 @@
+Copyright (c) 1998-2000 Thai Open Source Software Center Ltd and Clark Cooper
+Copyright (c) 2001-2025 Expat maintainers
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be included
+in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/xpack-riscv-none-elf-gcc-13.4.0-1/distro-info/licenses/expat-2.7.3/README.md b/xpack-riscv-none-elf-gcc-13.4.0-1/distro-info/licenses/expat-2.7.3/README.md
new file mode 100644
index 0000000..c2f288c
--- /dev/null
+++ b/xpack-riscv-none-elf-gcc-13.4.0-1/distro-info/licenses/expat-2.7.3/README.md
@@ -0,0 +1,311 @@
+[![Run Linux CI tasks](https://github.com/libexpat/libexpat/actions/workflows/linux.yml/badge.svg)](https://github.com/libexpat/libexpat/actions/workflows/linux.yml)
+[![Packaging status](https://repology.org/badge/tiny-repos/expat.svg)](https://repology.org/metapackage/expat/versions)
+[![Downloads SourceForge](https://img.shields.io/sourceforge/dt/expat?label=Downloads%20SourceForge)](https://sourceforge.net/projects/expat/files/)
+[![Downloads GitHub](https://img.shields.io/github/downloads/libexpat/libexpat/total?label=Downloads%20GitHub)](https://github.com/libexpat/libexpat/releases)
+[![OpenSSF Best Practices](https://www.bestpractices.dev/projects/10205/badge)](https://www.bestpractices.dev/projects/10205)
+
+> [!CAUTION]
+>
+> Expat is **understaffed** and without funding.
+> There is a [call for help with details](https://github.com/libexpat/libexpat/blob/master/expat/Changes)
+> at the top of the `Changes` file.
+
+
+# Expat, Release 2.7.3
+
+This is Expat, a C99 library for parsing
+[XML 1.0 Fourth Edition](https://www.w3.org/TR/2006/REC-xml-20060816/), started by
+[James Clark](https://en.wikipedia.org/wiki/James_Clark_%28programmer%29) in 1997.
+Expat is a stream-oriented XML parser.  This means that you register
+handlers with the parser before starting the parse.  These handlers
+are called when the parser discovers the associated structures in the
+document being parsed.  A start tag is an example of the kind of
+structures for which you may register handlers.
+
+Expat supports the following C99 compilers:
+
+- GNU GCC >=4.5 (for use from C) or GNU GCC >=4.8.1 (for use from C++)
+- LLVM Clang >=3.5
+- Microsoft Visual Studio >=17.0/2022
+  (the oldest version supported by the [official GitHub Actions Windows images](https://github.com/actions/runner-images))
+
+Windows users can use the
+[`expat-win32bin-*.*.*.{exe,zip}` download](https://github.com/libexpat/libexpat/releases),
+which includes both pre-compiled libraries and executables, and source code for
+developers.
+
+Expat is [free software](https://www.gnu.org/philosophy/free-sw.en.html).
+You may copy, distribute, and modify it under the terms of the License
+contained in the file
+[`COPYING`](https://github.com/libexpat/libexpat/blob/master/expat/COPYING)
+distributed with this package.
+This license is the same as the MIT/X Consortium license.
+
+
+## Using libexpat in your CMake-Based Project
+
+There are three documented ways of using libexpat with CMake:
+
+### a) `find_package` with Module Mode
+
+This approach leverages CMake's own [module `FindEXPAT`](https://cmake.org/cmake/help/latest/module/FindEXPAT.html).
+
+Notice the *uppercase* `EXPAT` in the following example:
+
+```cmake
+cmake_minimum_required(VERSION 3.10)
+
+project(hello VERSION 1.0.0)
+
+find_package(EXPAT 2.2.8 MODULE REQUIRED)
+
+add_executable(hello
+    hello.c
+)
+
+target_link_libraries(hello PUBLIC EXPAT::EXPAT)
+```
+
+### b) `find_package` with Config Mode
+
+This approach requires files from…
+
+- libexpat >=2.2.8 where packaging uses the CMake build system
+or
+- libexpat >=2.3.0 where packaging uses the GNU Autotools build system
+  on Linux
+or
+- libexpat >=2.4.0 where packaging uses the GNU Autotools build system
+  on macOS or MinGW.
+
+Notice the *lowercase* `expat` in the following example:
+
+```cmake
+cmake_minimum_required(VERSION 3.10)
+
+project(hello VERSION 1.0.0)
+
+find_package(expat 2.2.8 CONFIG REQUIRED char dtd ns)
+
+add_executable(hello
+    hello.c
+)
+
+target_link_libraries(hello PUBLIC expat::expat)
+```
+
+### c) The `FetchContent` module
+
+This approach — as demonstrated below — requires CMake >=3.18 for both the
+[`FetchContent` module](https://cmake.org/cmake/help/latest/module/FetchContent.html)
+and its support for the `SOURCE_SUBDIR` option to be available.
+
+Please note that:
+- Use of the `FetchContent` module with *non-release* SHA1s or `master`
+  of libexpat is neither advised nor considered officially supported.
+- Pinning to a specific commit is great for robust CI.
+- Pinning to a specific commit needs updating every time there is a new
+  release of libexpat — either manually or through automation —,
+  to not miss out on libexpat security updates.
+
+For an example that pulls in libexpat via Git:
+
+```cmake
+cmake_minimum_required(VERSION 3.18)
+
+include(FetchContent)
+
+project(hello VERSION 1.0.0)
+
+FetchContent_Declare(
+    expat
+    GIT_REPOSITORY https://github.com/libexpat/libexpat/
+    GIT_TAG        000000000_GIT_COMMIT_SHA1_HERE_000000000  # i.e. Git tag R_X_Y_Z
+    SOURCE_SUBDIR  expat/
+)
+
+FetchContent_MakeAvailable(expat)
+
+add_executable(hello
+    hello.c
+)
+
+target_link_libraries(hello PUBLIC expat)
+```
+
+
+## Building from a Git Clone
+
+If you are building Expat from a check-out from the
+[Git repository](https://github.com/libexpat/libexpat/),
+you need to run a script that generates the configure script using the
+GNU autoconf and libtool tools.  To do this, you need to have
+autoconf 2.58 or newer. Run the script like this:
+
+```console
+./buildconf.sh
+```
+
+Once this has been done, follow the same instructions as for building
+from a source distribution.
+
+
+## Building from a Source Distribution
+
+### a) Building with the configure script (i.e. GNU Autotools)
+
+To build Expat from a source distribution, you first run the
+configuration shell script in the top level distribution directory:
+
+```console
+./configure
+```
+
+There are many options which you may provide to configure (which you
+can discover by running configure with the `--help` option).  But the
+one of most interest is the one that sets the installation directory.
+By default, the configure script will set things up to install
+libexpat into `/usr/local/lib`, `expat.h` into `/usr/local/include`, and
+`xmlwf` into `/usr/local/bin`.  If, for example, you'd prefer to install
+into `/home/me/mystuff/lib`, `/home/me/mystuff/include`, and
+`/home/me/mystuff/bin`, you can tell `configure` about that with:
+
+```console
+./configure --prefix=/home/me/mystuff
+```
+
+Another interesting option is to enable 64-bit integer support for
+line and column numbers and the over-all byte index:
+
+```console
+./configure CPPFLAGS=-DXML_LARGE_SIZE
+```
+
+However, such a modification would be a breaking change to the ABI
+and is therefore not recommended for general use — e.g. as part of
+a Linux distribution — but rather for builds with special requirements.
+
+After running the configure script, the `make` command will build
+things and `make install` will install things into their proper
+location.  Have a look at the `Makefile` to learn about additional
+`make` options.  Note that you need to have write permission into
+the directories into which things will be installed.
+
+If you are interested in building Expat to provide document
+information in UTF-16 encoding rather than the default UTF-8, follow
+these instructions (after having run `make distclean`).
+Please note that we configure with `--without-xmlwf` as xmlwf does not
+support this mode of compilation (yet):
+
+1. Mass-patch `Makefile.am` files to use `libexpatw.la` for a library name:
+   
+ `find . -name Makefile.am -exec sed + -e 's,libexpat\.la,libexpatw.la,' + -e 's,libexpat_la,libexpatw_la,' + -i.bak {} +` + +1. Run `automake` to re-write `Makefile.in` files:
+ `automake` + +1. For UTF-16 output as unsigned short (and version/error strings as char), + run:
+ `./configure CPPFLAGS=-DXML_UNICODE --without-xmlwf`
+ For UTF-16 output as `wchar_t` (incl. version/error strings), run:
+ `./configure CFLAGS="-g -O2 -fshort-wchar" CPPFLAGS=-DXML_UNICODE_WCHAR_T + --without-xmlwf` +
Note: The latter requires libc compiled with `-fshort-wchar`, as well. + +1. Run `make` (which excludes xmlwf). + +1. Run `make install` (again, excludes xmlwf). + +Using `DESTDIR` is supported. It works as follows: + +```console +make install DESTDIR=/path/to/image +``` + +overrides the in-makefile set `DESTDIR`, because variable-setting priority is + +1. commandline +1. in-makefile +1. environment + +Note: This only applies to the Expat library itself, building UTF-16 versions +of xmlwf and the tests is currently not supported. + +When using Expat with a project using autoconf for configuration, you +can use the probing macro in `conftools/expat.m4` to determine how to +include Expat. See the comments at the top of that file for more +information. + +A reference manual is available in the file `doc/reference.html` in this +distribution. + + +### b) Building with CMake + +The CMake build system is still *experimental* and may replace the primary +build system based on GNU Autotools at some point when it is ready. + + +#### Available Options + +For an idea of the available (non-advanced) options for building with CMake: + +```console +# rm -f CMakeCache.txt ; cmake -D_EXPAT_HELP=ON -LH . | grep -B1 ':.*=' | sed 's,^--$,,' +// Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel ... +CMAKE_BUILD_TYPE:STRING= + +// Install path prefix, prepended onto install directories. +CMAKE_INSTALL_PREFIX:PATH=/usr/local + +// Path to a program. +DOCBOOK_TO_MAN:FILEPATH=/usr/bin/docbook2x-man + +// Build man page for xmlwf +EXPAT_BUILD_DOCS:BOOL=ON + +// Build the examples for expat library +EXPAT_BUILD_EXAMPLES:BOOL=ON + +// Build fuzzers for the expat library +EXPAT_BUILD_FUZZERS:BOOL=OFF + +// Build pkg-config file +EXPAT_BUILD_PKGCONFIG:BOOL=ON + +// Build the tests for expat library +EXPAT_BUILD_TESTS:BOOL=ON + +// Build the xmlwf tool for expat library +EXPAT_BUILD_TOOLS:BOOL=ON + +// Character type to use (char|ushort|wchar_t) [default=char] +EXPAT_CHAR_TYPE:STRING=char + +// Install expat files in cmake install target +EXPAT_ENABLE_INSTALL:BOOL=ON + +// Use /MT flag (static CRT) when compiling in MSVC +EXPAT_MSVC_STATIC_CRT:BOOL=OFF + +// Build fuzzers via OSS-Fuzz for the expat library +EXPAT_OSSFUZZ_BUILD:BOOL=OFF + +// Build a shared expat library +EXPAT_SHARED_LIBS:BOOL=ON + +// Treat all compiler warnings as errors +EXPAT_WARNINGS_AS_ERRORS:BOOL=OFF + +// Make use of getrandom function (ON|OFF|AUTO) [default=AUTO] +EXPAT_WITH_GETRANDOM:STRING=AUTO + +// Utilize libbsd (for arc4random_buf) +EXPAT_WITH_LIBBSD:BOOL=OFF + +// Make use of syscall SYS_getrandom (ON|OFF|AUTO) [default=AUTO] +EXPAT_WITH_SYS_GETRANDOM:STRING=AUTO +``` diff --git a/xpack-riscv-none-elf-gcc-13.4.0-1/distro-info/licenses/gcc-13.4.0/COPYING b/xpack-riscv-none-elf-gcc-13.4.0-1/distro-info/licenses/gcc-13.4.0/COPYING new file mode 100644 index 0000000..623b625 --- /dev/null +++ b/xpack-riscv-none-elf-gcc-13.4.0-1/distro-info/licenses/gcc-13.4.0/COPYING @@ -0,0 +1,340 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Library General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General +Public License instead of this License. diff --git a/xpack-riscv-none-elf-gcc-13.4.0-1/distro-info/licenses/gcc-13.4.0/COPYING.LIB b/xpack-riscv-none-elf-gcc-13.4.0-1/distro-info/licenses/gcc-13.4.0/COPYING.LIB new file mode 100644 index 0000000..2d2d780 --- /dev/null +++ b/xpack-riscv-none-elf-gcc-13.4.0-1/distro-info/licenses/gcc-13.4.0/COPYING.LIB @@ -0,0 +1,510 @@ + + GNU LESSER GENERAL PUBLIC LICENSE + Version 2.1, February 1999 + + Copyright (C) 1991, 1999 Free Software Foundation, Inc. + 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + +[This is the first released version of the Lesser GPL. It also counts + as the successor of the GNU Library Public License, version 2, hence + the version number 2.1.] + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +Licenses are intended to guarantee your freedom to share and change +free software--to make sure the software is free for all its users. + + This license, the Lesser General Public License, applies to some +specially designated software packages--typically libraries--of the +Free Software Foundation and other authors who decide to use it. You +can use it too, but we suggest you first think carefully about whether +this license or the ordinary General Public License is the better +strategy to use in any particular case, based on the explanations +below. + + When we speak of free software, we are referring to freedom of use, +not price. Our General Public Licenses are designed to make sure that +you have the freedom to distribute copies of free software (and charge +for this service if you wish); that you receive source code or can get +it if you want it; that you can change the software and use pieces of +it in new free programs; and that you are informed that you can do +these things. + + To protect your rights, we need to make restrictions that forbid +distributors to deny you these rights or to ask you to surrender these +rights. These restrictions translate to certain responsibilities for +you if you distribute copies of the library or if you modify it. + + For example, if you distribute copies of the library, whether gratis +or for a fee, you must give the recipients all the rights that we gave +you. You must make sure that they, too, receive or can get the source +code. If you link other code with the library, you must provide +complete object files to the recipients, so that they can relink them +with the library after making changes to the library and recompiling +it. And you must show them these terms so they know their rights. + + We protect your rights with a two-step method: (1) we copyright the +library, and (2) we offer you this license, which gives you legal +permission to copy, distribute and/or modify the library. + + To protect each distributor, we want to make it very clear that +there is no warranty for the free library. Also, if the library is +modified by someone else and passed on, the recipients should know +that what they have is not the original version, so that the original +author's reputation will not be affected by problems that might be +introduced by others. + + Finally, software patents pose a constant threat to the existence of +any free program. We wish to make sure that a company cannot +effectively restrict the users of a free program by obtaining a +restrictive license from a patent holder. Therefore, we insist that +any patent license obtained for a version of the library must be +consistent with the full freedom of use specified in this license. + + Most GNU software, including some libraries, is covered by the +ordinary GNU General Public License. This license, the GNU Lesser +General Public License, applies to certain designated libraries, and +is quite different from the ordinary General Public License. We use +this license for certain libraries in order to permit linking those +libraries into non-free programs. + + When a program is linked with a library, whether statically or using +a shared library, the combination of the two is legally speaking a +combined work, a derivative of the original library. The ordinary +General Public License therefore permits such linking only if the +entire combination fits its criteria of freedom. The Lesser General +Public License permits more lax criteria for linking other code with +the library. + + We call this license the "Lesser" General Public License because it +does Less to protect the user's freedom than the ordinary General +Public License. It also provides other free software developers Less +of an advantage over competing non-free programs. These disadvantages +are the reason we use the ordinary General Public License for many +libraries. However, the Lesser license provides advantages in certain +special circumstances. + + For example, on rare occasions, there may be a special need to +encourage the widest possible use of a certain library, so that it +becomes a de-facto standard. To achieve this, non-free programs must +be allowed to use the library. A more frequent case is that a free +library does the same job as widely used non-free libraries. In this +case, there is little to gain by limiting the free library to free +software only, so we use the Lesser General Public License. + + In other cases, permission to use a particular library in non-free +programs enables a greater number of people to use a large body of +free software. For example, permission to use the GNU C Library in +non-free programs enables many more people to use the whole GNU +operating system, as well as its variant, the GNU/Linux operating +system. + + Although the Lesser General Public License is Less protective of the +users' freedom, it does ensure that the user of a program that is +linked with the Library has the freedom and the wherewithal to run +that program using a modified version of the Library. + + The precise terms and conditions for copying, distribution and +modification follow. Pay close attention to the difference between a +"work based on the library" and a "work that uses the library". The +former contains code derived from the library, whereas the latter must +be combined with the library in order to run. + + GNU LESSER GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License Agreement applies to any software library or other +program which contains a notice placed by the copyright holder or +other authorized party saying it may be distributed under the terms of +this Lesser General Public License (also called "this License"). +Each licensee is addressed as "you". + + A "library" means a collection of software functions and/or data +prepared so as to be conveniently linked with application programs +(which use some of those functions and data) to form executables. + + The "Library", below, refers to any such software library or work +which has been distributed under these terms. A "work based on the +Library" means either the Library or any derivative work under +copyright law: that is to say, a work containing the Library or a +portion of it, either verbatim or with modifications and/or translated +straightforwardly into another language. (Hereinafter, translation is +included without limitation in the term "modification".) + + "Source code" for a work means the preferred form of the work for +making modifications to it. For a library, complete source code means +all the source code for all modules it contains, plus any associated +interface definition files, plus the scripts used to control +compilation and installation of the library. + + Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running a program using the Library is not restricted, and output from +such a program is covered only if its contents constitute a work based +on the Library (independent of the use of the Library in a tool for +writing it). Whether that is true depends on what the Library does +and what the program that uses the Library does. + + 1. You may copy and distribute verbatim copies of the Library's +complete source code as you receive it, in any medium, provided that +you conspicuously and appropriately publish on each copy an +appropriate copyright notice and disclaimer of warranty; keep intact +all the notices that refer to this License and to the absence of any +warranty; and distribute a copy of this License along with the +Library. + + You may charge a fee for the physical act of transferring a copy, +and you may at your option offer warranty protection in exchange for a +fee. + + 2. You may modify your copy or copies of the Library or any portion +of it, thus forming a work based on the Library, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) The modified work must itself be a software library. + + b) You must cause the files modified to carry prominent notices + stating that you changed the files and the date of any change. + + c) You must cause the whole of the work to be licensed at no + charge to all third parties under the terms of this License. + + d) If a facility in the modified Library refers to a function or a + table of data to be supplied by an application program that uses + the facility, other than as an argument passed when the facility + is invoked, then you must make a good faith effort to ensure that, + in the event an application does not supply such function or + table, the facility still operates, and performs whatever part of + its purpose remains meaningful. + + (For example, a function in a library to compute square roots has + a purpose that is entirely well-defined independent of the + application. Therefore, Subsection 2d requires that any + application-supplied function or table used by this function must + be optional: if the application does not supply it, the square + root function must still compute square roots.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Library, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Library, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote +it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Library. + +In addition, mere aggregation of another work not based on the Library +with the Library (or with a work based on the Library) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may opt to apply the terms of the ordinary GNU General Public +License instead of this License to a given copy of the Library. To do +this, you must alter all the notices that refer to this License, so +that they refer to the ordinary GNU General Public License, version 2, +instead of to this License. (If a newer version than version 2 of the +ordinary GNU General Public License has appeared, then you can specify +that version instead if you wish.) Do not make any other change in +these notices. + + Once this change is made in a given copy, it is irreversible for +that copy, so the ordinary GNU General Public License applies to all +subsequent copies and derivative works made from that copy. + + This option is useful when you wish to copy part of the code of +the Library into a program that is not a library. + + 4. You may copy and distribute the Library (or a portion or +derivative of it, under Section 2) in object code or executable form +under the terms of Sections 1 and 2 above provided that you accompany +it with the complete corresponding machine-readable source code, which +must be distributed under the terms of Sections 1 and 2 above on a +medium customarily used for software interchange. + + If distribution of object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the +source code from the same place satisfies the requirement to +distribute the source code, even though third parties are not +compelled to copy the source along with the object code. + + 5. A program that contains no derivative of any portion of the +Library, but is designed to work with the Library by being compiled or +linked with it, is called a "work that uses the Library". Such a +work, in isolation, is not a derivative work of the Library, and +therefore falls outside the scope of this License. + + However, linking a "work that uses the Library" with the Library +creates an executable that is a derivative of the Library (because it +contains portions of the Library), rather than a "work that uses the +library". The executable is therefore covered by this License. +Section 6 states terms for distribution of such executables. + + When a "work that uses the Library" uses material from a header file +that is part of the Library, the object code for the work may be a +derivative work of the Library even though the source code is not. +Whether this is true is especially significant if the work can be +linked without the Library, or if the work is itself a library. The +threshold for this to be true is not precisely defined by law. + + If such an object file uses only numerical parameters, data +structure layouts and accessors, and small macros and small inline +functions (ten lines or less in length), then the use of the object +file is unrestricted, regardless of whether it is legally a derivative +work. (Executables containing this object code plus portions of the +Library will still fall under Section 6.) + + Otherwise, if the work is a derivative of the Library, you may +distribute the object code for the work under the terms of Section 6. +Any executables containing that work also fall under Section 6, +whether or not they are linked directly with the Library itself. + + 6. As an exception to the Sections above, you may also combine or +link a "work that uses the Library" with the Library to produce a +work containing portions of the Library, and distribute that work +under terms of your choice, provided that the terms permit +modification of the work for the customer's own use and reverse +engineering for debugging such modifications. + + You must give prominent notice with each copy of the work that the +Library is used in it and that the Library and its use are covered by +this License. You must supply a copy of this License. If the work +during execution displays copyright notices, you must include the +copyright notice for the Library among them, as well as a reference +directing the user to the copy of this License. Also, you must do one +of these things: + + a) Accompany the work with the complete corresponding + machine-readable source code for the Library including whatever + changes were used in the work (which must be distributed under + Sections 1 and 2 above); and, if the work is an executable linked + with the Library, with the complete machine-readable "work that + uses the Library", as object code and/or source code, so that the + user can modify the Library and then relink to produce a modified + executable containing the modified Library. (It is understood + that the user who changes the contents of definitions files in the + Library will not necessarily be able to recompile the application + to use the modified definitions.) + + b) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (1) uses at run time a + copy of the library already present on the user's computer system, + rather than copying library functions into the executable, and (2) + will operate properly with a modified version of the library, if + the user installs one, as long as the modified version is + interface-compatible with the version that the work was made with. + + c) Accompany the work with a written offer, valid for at least + three years, to give the same user the materials specified in + Subsection 6a, above, for a charge no more than the cost of + performing this distribution. + + d) If distribution of the work is made by offering access to copy + from a designated place, offer equivalent access to copy the above + specified materials from the same place. + + e) Verify that the user has already received a copy of these + materials or that you have already sent this user a copy. + + For an executable, the required form of the "work that uses the +Library" must include any data and utility programs needed for +reproducing the executable from it. However, as a special exception, +the materials to be distributed need not include anything that is +normally distributed (in either source or binary form) with the major +components (compiler, kernel, and so on) of the operating system on +which the executable runs, unless that component itself accompanies +the executable. + + It may happen that this requirement contradicts the license +restrictions of other proprietary libraries that do not normally +accompany the operating system. Such a contradiction means you cannot +use both them and the Library together in an executable that you +distribute. + + 7. You may place library facilities that are a work based on the +Library side-by-side in a single library together with other library +facilities not covered by this License, and distribute such a combined +library, provided that the separate distribution of the work based on +the Library and of the other library facilities is otherwise +permitted, and provided that you do these two things: + + a) Accompany the combined library with a copy of the same work + based on the Library, uncombined with any other library + facilities. This must be distributed under the terms of the + Sections above. + + b) Give prominent notice with the combined library of the fact + that part of it is a work based on the Library, and explaining + where to find the accompanying uncombined form of the same work. + + 8. You may not copy, modify, sublicense, link with, or distribute +the Library except as expressly provided under this License. Any +attempt otherwise to copy, modify, sublicense, link with, or +distribute the Library is void, and will automatically terminate your +rights under this License. However, parties who have received copies, +or rights, from you under this License will not have their licenses +terminated so long as such parties remain in full compliance. + + 9. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Library or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Library (or any work based on the +Library), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Library or works based on it. + + 10. Each time you redistribute the Library (or any work based on the +Library), the recipient automatically receives a license from the +original licensor to copy, distribute, link with or modify the Library +subject to these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties with +this License. + + 11. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Library at all. For example, if a patent +license would not permit royalty-free redistribution of the Library by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Library. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply, and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 12. If the distribution and/or use of the Library is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Library under this License +may add an explicit geographical distribution limitation excluding those +countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 13. The Free Software Foundation may publish revised and/or new +versions of the Lesser General Public License from time to time. +Such new versions will be similar in spirit to the present version, +but may differ in detail to address new problems or concerns. + +Each version is given a distinguishing version number. If the Library +specifies a version number of this License which applies to it and +"any later version", you have the option of following the terms and +conditions either of that version or of any later version published by +the Free Software Foundation. If the Library does not specify a +license version number, you may choose any version ever published by +the Free Software Foundation. + + 14. If you wish to incorporate parts of the Library into other free +programs whose distribution conditions are incompatible with these, +write to the author to ask for permission. For software which is +copyrighted by the Free Software Foundation, write to the Free +Software Foundation; we sometimes make exceptions for this. Our +decision will be guided by the two goals of preserving the free status +of all derivatives of our free software and of promoting the sharing +and reuse of software generally. + + NO WARRANTY + + 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO +WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. +EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR +OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY +KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE +LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME +THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN +WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY +AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU +FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR +CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE +LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING +RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF +SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH +DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Libraries + + If you develop a new library, and you want it to be of the greatest +possible use to the public, we recommend making it free software that +everyone can redistribute and change. You can do so by permitting +redistribution under these terms (or, alternatively, under the terms +of the ordinary General Public License). + + To apply these terms, attach the following notices to the library. +It is safest to attach them to the start of each source file to most +effectively convey the exclusion of warranty; and each file should +have at least the "copyright" line and a pointer to where the full +notice is found. + + + + Copyright (C) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +Also add information on how to contact you by electronic and paper mail. + +You should also get your employer (if you work as a programmer) or +your school, if any, to sign a "copyright disclaimer" for the library, +if necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the + library `Frob' (a library for tweaking knobs) written by James + Random Hacker. + + , 1 April 1990 + Ty Coon, President of Vice + +That's all there is to it! + + diff --git a/xpack-riscv-none-elf-gcc-13.4.0-1/distro-info/licenses/gcc-13.4.0/COPYING.RUNTIME b/xpack-riscv-none-elf-gcc-13.4.0-1/distro-info/licenses/gcc-13.4.0/COPYING.RUNTIME new file mode 100644 index 0000000..e1b3c69 --- /dev/null +++ b/xpack-riscv-none-elf-gcc-13.4.0-1/distro-info/licenses/gcc-13.4.0/COPYING.RUNTIME @@ -0,0 +1,73 @@ +GCC RUNTIME LIBRARY EXCEPTION + +Version 3.1, 31 March 2009 + +Copyright (C) 2009 Free Software Foundation, Inc. + +Everyone is permitted to copy and distribute verbatim copies of this +license document, but changing it is not allowed. + +This GCC Runtime Library Exception ("Exception") is an additional +permission under section 7 of the GNU General Public License, version +3 ("GPLv3"). It applies to a given file (the "Runtime Library") that +bears a notice placed by the copyright holder of the file stating that +the file is governed by GPLv3 along with this Exception. + +When you use GCC to compile a program, GCC may combine portions of +certain GCC header files and runtime libraries with the compiled +program. The purpose of this Exception is to allow compilation of +non-GPL (including proprietary) programs to use, in this way, the +header files and runtime libraries covered by this Exception. + +0. Definitions. + +A file is an "Independent Module" if it either requires the Runtime +Library for execution after a Compilation Process, or makes use of an +interface provided by the Runtime Library, but is not otherwise based +on the Runtime Library. + +"GCC" means a version of the GNU Compiler Collection, with or without +modifications, governed by version 3 (or a specified later version) of +the GNU General Public License (GPL) with the option of using any +subsequent versions published by the FSF. + +"GPL-compatible Software" is software whose conditions of propagation, +modification and use would permit combination with GCC in accord with +the license of GCC. + +"Target Code" refers to output from any compiler for a real or virtual +target processor architecture, in executable form or suitable for +input to an assembler, loader, linker and/or execution +phase. Notwithstanding that, Target Code does not include data in any +format that is used as a compiler intermediate representation, or used +for producing a compiler intermediate representation. + +The "Compilation Process" transforms code entirely represented in +non-intermediate languages designed for human-written code, and/or in +Java Virtual Machine byte code, into Target Code. Thus, for example, +use of source code generators and preprocessors need not be considered +part of the Compilation Process, since the Compilation Process can be +understood as starting with the output of the generators or +preprocessors. + +A Compilation Process is "Eligible" if it is done using GCC, alone or +with other GPL-compatible software, or if it is done without using any +work based on GCC. For example, using non-GPL-compatible Software to +optimize any GCC intermediate representations would not qualify as an +Eligible Compilation Process. + +1. Grant of Additional Permission. + +You have permission to propagate a work of Target Code formed by +combining the Runtime Library with Independent Modules, even if such +propagation would otherwise violate the terms of GPLv3, provided that +all Target Code was generated by Eligible Compilation Processes. You +may then convey such a combination under terms of your choice, +consistent with the licensing of the Independent Modules. + +2. No Weakening of GCC Copyleft. + +The availability of this Exception does not imply any general +presumption that third-party software is unaffected by the copyleft +requirements of the license of GCC. + diff --git a/xpack-riscv-none-elf-gcc-13.4.0-1/distro-info/licenses/gcc-13.4.0/COPYING3 b/xpack-riscv-none-elf-gcc-13.4.0-1/distro-info/licenses/gcc-13.4.0/COPYING3 new file mode 100644 index 0000000..94a9ed0 --- /dev/null +++ b/xpack-riscv-none-elf-gcc-13.4.0-1/distro-info/licenses/gcc-13.4.0/COPYING3 @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. diff --git a/xpack-riscv-none-elf-gcc-13.4.0-1/distro-info/licenses/gcc-13.4.0/COPYING3.LIB b/xpack-riscv-none-elf-gcc-13.4.0-1/distro-info/licenses/gcc-13.4.0/COPYING3.LIB new file mode 100644 index 0000000..fc8a5de --- /dev/null +++ b/xpack-riscv-none-elf-gcc-13.4.0-1/distro-info/licenses/gcc-13.4.0/COPYING3.LIB @@ -0,0 +1,165 @@ + GNU LESSER GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + + This version of the GNU Lesser General Public License incorporates +the terms and conditions of version 3 of the GNU General Public +License, supplemented by the additional permissions listed below. + + 0. Additional Definitions. + + As used herein, "this License" refers to version 3 of the GNU Lesser +General Public License, and the "GNU GPL" refers to version 3 of the GNU +General Public License. + + "The Library" refers to a covered work governed by this License, +other than an Application or a Combined Work as defined below. + + An "Application" is any work that makes use of an interface provided +by the Library, but which is not otherwise based on the Library. +Defining a subclass of a class defined by the Library is deemed a mode +of using an interface provided by the Library. + + A "Combined Work" is a work produced by combining or linking an +Application with the Library. The particular version of the Library +with which the Combined Work was made is also called the "Linked +Version". + + The "Minimal Corresponding Source" for a Combined Work means the +Corresponding Source for the Combined Work, excluding any source code +for portions of the Combined Work that, considered in isolation, are +based on the Application, and not on the Linked Version. + + The "Corresponding Application Code" for a Combined Work means the +object code and/or source code for the Application, including any data +and utility programs needed for reproducing the Combined Work from the +Application, but excluding the System Libraries of the Combined Work. + + 1. Exception to Section 3 of the GNU GPL. + + You may convey a covered work under sections 3 and 4 of this License +without being bound by section 3 of the GNU GPL. + + 2. Conveying Modified Versions. + + If you modify a copy of the Library, and, in your modifications, a +facility refers to a function or data to be supplied by an Application +that uses the facility (other than as an argument passed when the +facility is invoked), then you may convey a copy of the modified +version: + + a) under this License, provided that you make a good faith effort to + ensure that, in the event an Application does not supply the + function or data, the facility still operates, and performs + whatever part of its purpose remains meaningful, or + + b) under the GNU GPL, with none of the additional permissions of + this License applicable to that copy. + + 3. Object Code Incorporating Material from Library Header Files. + + The object code form of an Application may incorporate material from +a header file that is part of the Library. You may convey such object +code under terms of your choice, provided that, if the incorporated +material is not limited to numerical parameters, data structure +layouts and accessors, or small macros, inline functions and templates +(ten or fewer lines in length), you do both of the following: + + a) Give prominent notice with each copy of the object code that the + Library is used in it and that the Library and its use are + covered by this License. + + b) Accompany the object code with a copy of the GNU GPL and this license + document. + + 4. Combined Works. + + You may convey a Combined Work under terms of your choice that, +taken together, effectively do not restrict modification of the +portions of the Library contained in the Combined Work and reverse +engineering for debugging such modifications, if you also do each of +the following: + + a) Give prominent notice with each copy of the Combined Work that + the Library is used in it and that the Library and its use are + covered by this License. + + b) Accompany the Combined Work with a copy of the GNU GPL and this license + document. + + c) For a Combined Work that displays copyright notices during + execution, include the copyright notice for the Library among + these notices, as well as a reference directing the user to the + copies of the GNU GPL and this license document. + + d) Do one of the following: + + 0) Convey the Minimal Corresponding Source under the terms of this + License, and the Corresponding Application Code in a form + suitable for, and under terms that permit, the user to + recombine or relink the Application with a modified version of + the Linked Version to produce a modified Combined Work, in the + manner specified by section 6 of the GNU GPL for conveying + Corresponding Source. + + 1) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (a) uses at run time + a copy of the Library already present on the user's computer + system, and (b) will operate properly with a modified version + of the Library that is interface-compatible with the Linked + Version. + + e) Provide Installation Information, but only if you would otherwise + be required to provide such information under section 6 of the + GNU GPL, and only to the extent that such information is + necessary to install and execute a modified version of the + Combined Work produced by recombining or relinking the + Application with a modified version of the Linked Version. (If + you use option 4d0, the Installation Information must accompany + the Minimal Corresponding Source and Corresponding Application + Code. If you use option 4d1, you must provide the Installation + Information in the manner specified by section 6 of the GNU GPL + for conveying Corresponding Source.) + + 5. Combined Libraries. + + You may place library facilities that are a work based on the +Library side by side in a single library together with other library +facilities that are not Applications and are not covered by this +License, and convey such a combined library under terms of your +choice, if you do both of the following: + + a) Accompany the combined library with a copy of the same work based + on the Library, uncombined with any other library facilities, + conveyed under the terms of this License. + + b) Give prominent notice with the combined library that part of it + is a work based on the Library, and explaining where to find the + accompanying uncombined form of the same work. + + 6. Revised Versions of the GNU Lesser General Public License. + + The Free Software Foundation may publish revised and/or new versions +of the GNU Lesser General Public License from time to time. Such new +versions will be similar in spirit to the present version, but may +differ in detail to address new problems or concerns. + + Each version is given a distinguishing version number. If the +Library as you received it specifies that a certain numbered version +of the GNU Lesser General Public License "or any later version" +applies to it, you have the option of following the terms and +conditions either of that published version or of any later version +published by the Free Software Foundation. If the Library as you +received it does not specify a version number of the GNU Lesser +General Public License, you may choose any version of the GNU Lesser +General Public License ever published by the Free Software Foundation. + + If the Library as you received it specifies that a proxy can decide +whether future versions of the GNU Lesser General Public License shall +apply, that proxy's public statement of acceptance of any version is +permanent authorization for you to choose that version for the +Library. diff --git a/xpack-riscv-none-elf-gcc-13.4.0-1/distro-info/licenses/gcc-13.4.0/NEWS b/xpack-riscv-none-elf-gcc-13.4.0-1/distro-info/licenses/gcc-13.4.0/NEWS new file mode 100644 index 0000000..51f8f50 --- /dev/null +++ b/xpack-riscv-none-elf-gcc-13.4.0-1/distro-info/licenses/gcc-13.4.0/NEWS @@ -0,0 +1,24048 @@ +This file contains information about GCC releases which has been generated +automatically from the online release notes. It covers releases of GCC +(and the former EGCS project) since EGCS 1.0, on the line of development +that led to GCC 3. For information on GCC 2.8.1 and older releases of GCC 2, +see ONEWS. + +====================================================================== +http://gcc.gnu.org/gcc-13/index.html + GCC 13 Release Series + + June 5, 2025 + + The GCC developers are pleased to announce the release of GCC 13.4. + + This release is a bug-fix release, containing fixes for regressions in + GCC 13.3 relative to previous releases of GCC. + +Release History + + GCC 13.4 + June 5, 2025 ([1]changes, [2]documentation) + + GCC 13.3 + May 21, 2024 ([3]changes, [4]documentation) + + GCC 13.2 + July 27, 2023 ([5]changes, [6]documentation) + + GCC 13.1 + April 26, 2023 ([7]changes, [8]documentation) + +References and Acknowledgements + + GCC used to stand for the GNU C Compiler, but since the compiler + supports several other languages aside from C, it now stands for the + GNU Compiler Collection. + + The GCC developers would like to thank the numerous people that have + contributed new features, improvements, bug fixes, and other changes as + well as test results to GCC. This [9]amazing group of volunteers is + what makes GCC successful. + + For additional information about GCC please refer to the [10]GCC + project web site or contact the [11]GCC development mailing list. + + To obtain GCC please use [12]our mirror sites or [13]our version + control system. + + + For questions related to the use of GCC, please consult these web + pages and the [14]GCC manuals. If that fails, the + [15]gcc-help@gcc.gnu.org mailing list might help. Comments on these + web pages and the development of GCC are welcome on our developer + list at [16]gcc@gcc.gnu.org. All of [17]our lists have public + archives. + + Copyright (C) [18]Free Software Foundation, Inc. Verbatim copying and + distribution of this entire article is permitted in any medium, + provided this notice is preserved. + + These pages are [19]maintained by the GCC team. Last modified + 2025-06-05. + +References + + 1. https://gcc.gnu.org/gcc-13/changes.html + 2. https://gcc.gnu.org/onlinedocs/13.4.0/ + 3. https://gcc.gnu.org/gcc-13/changes.html + 4. https://gcc.gnu.org/onlinedocs/13.3.0/ + 5. https://gcc.gnu.org/gcc-13/changes.html + 6. https://gcc.gnu.org/onlinedocs/13.2.0/ + 7. https://gcc.gnu.org/gcc-13/changes.html + 8. https://gcc.gnu.org/onlinedocs/13.1.0/ + 9. https://gcc.gnu.org/onlinedocs/gcc-13.1.0/gcc/Contributors.html + 10. https://gcc.gnu.org/index.html + 11. mailto:gcc@gcc.gnu.org + 12. https://gcc.gnu.org/mirrors.html + 13. https://gcc.gnu.org/git.html + 14. https://gcc.gnu.org/onlinedocs/ + 15. mailto:gcc-help@gcc.gnu.org + 16. mailto:gcc@gcc.gnu.org + 17. https://gcc.gnu.org/lists.html + 18. https://www.fsf.org/ + 19. https://gcc.gnu.org/about.html +====================================================================== +http://gcc.gnu.org/gcc-13/changes.html + GCC 13 Release Series + Changes, New Features, and Fixes + + This page is a "brief" summary of some of the huge number of + improvements in GCC 13. You may also want to check out our [1]Porting + to GCC 13 page and the [2]full GCC documentation. + +Caveats + + * OpenMP offloading to Intel MIC has been removed. + * The support for the cr16-elf, tilegx*-linux, tilepro*-linux, + hppa[12]*-*-hpux10*, hppa[12]*-*-hpux11* and m32c-rtems + configurations has been removed. + * Support for Solaris 11.3 (*-*-solaris2.11.3) has been declared + obsolete. The next release of GCC will have corresponding code + permanently removed. Details can be found in the [3]announcement. + * Support for emitting the STABS debugging format (including the + -gstabs and -gxcoff options) has been removed. (This means the dbx + debugger is no longer supported, either.) + * Legacy debug info compression option -gz=zlib-gnu was removed and + the option is ignored right now. + * [4]-Warray-bounds=2 will no longer issue warnings for out of bounds + accesses to trailing struct members of one-element array type + anymore. Instead it diagnoses accesses to trailing arrays according + to [5]-fstrict-flex-arrays. + * [6]-fanalyzer is still only suitable for analyzing C code. In + particular, using it on C++ is unlikely to give meaningful output. + * In the arm port, support for the iWMMXt extensions, enabled through + -mcpu=iwmmxt, has been deprecated and will be removed in a future + release. This includes support for the [7]iWMMXt built-in + functions. + * For C++, construction of the global iostream objects std::cout, + std::cin, etc. is now done inside the standard library, instead of + in every source file that includes the header. This + change improves the start-up performance of C++ programs, but it + means that code compiled with GCC 13.1 will crash if the correct + version of libstdc++.so is not used at run time. See the + [8]documentation about using the right libstdc++.so at run time. + Future GCC releases will mitigate the problem so that the program + cannot be run at all with an older libstdc++.so. + +[9]General Improvements + + * [10]OpenMP + + Reverse offload is now supported with AMD GCN and nvptx + devices. Additionally, the requires handling has been improved + and all clauses are now accepted. If a requirement cannot be + fulfilled for an accessible device, this device is excluded + from the list of available devices. This may imply that the + only device left is the host (the initial device). In + particular, unified_address and unified_shared_memory are + unsupported by all non-host devices. + + OpenMP 5.0: Fortran now supports some non-rectangular loop + nests; for C/C++, the support was added in GCC 11. + + The following OpenMP 5.1 features have been added: the + omp_all_memory reserved locator, the inoutset modifier to the + depend clause, the nowait clause for the taskwait directive + and the omp_target_is_accessible, omp_target_memcpy_async, + omp_target_memcpy_rect_async and omp_get_mapped_ptr API + routines. The assume and assumes directives, the begin/end + declare target syntax in C/C++ and device-specific ICV + settings with environment variables are now supported. + + Initial support for OpenMP 5.2 features has been added: + firstprivate and allocate clauses on the scope construct; the + OpenMP 5.2 syntax of the linear clause; new enum/constants + omp_initial_device and omp_invalid_device; and optionally + omitting the map-type in target enter/exit data. The enter + clause (as alias for to) has been added to the declare target + directive. Also added have been the omp_in_explicit_task + routine and the doacross clause as alias for depend with + source/sink modifier. + + The _ALL suffix to the device-scope environment variables + added in Technical Report (TR11) is already handled. + + For user defined allocators requesting high bandwidth or large + capacity memspaces or interleaved partitioning, the + [11]memkind library is used, if available at run time. + * AddressSanitizer defaults to detect_stack_use_after_return=1 on + GNU/Linux targets. For compatibility, it can be disabled with env + ASAN_OPTIONS=detect_stack_use_after_return=0. + * New debug info compression option value -gz=zstd has been added. + * Link-time optimization improvements: + + LTO supports the newly added jobserver of GNU make jobserver + that uses named pipes (--jobserver-style=fifo) by default. + + If make's jobserver is active, parallel LTO WPA streaming + communicates with it and thus avoids system overcommitting. + * -Ofast, -ffast-math and -funsafe-math-optimizations will no longer + add startup code to alter the floating-point environment when + producing a shared object with -shared. + * GCC can now emit its diagnostics using [12]SARIF. This is a + JSON-based format suited for capturing the results of static + analysis tools (like GCC's [13]-fanalyzer), but it can also be used + to capture other GCC warnings and errors in a machine-readable + format. Specifically, the [14]-fdiagnostics-format= option has been + extended to support these new values: + + -fdiagnostics-format=sarif-stderr + + -fdiagnostics-format=sarif-file + + -fdiagnostics-format=json-stderr, a synonym for the existing + -fdiagnostics-format=json + + -fdiagnostics-format=json-file + where the json-prefixed variants refer to GCC's own JSON diagnostic + format. + * Support for profiling and test coverage in freestanding + environments has been added, see also [15]Profiling and Test + Coverage in Freestanding Environments. + * New options -fharden-compares and -fharden-conditional-branches to + verify compares and conditional branches, to detect some + power-deprivation hardware attacks, using reversed conditions. + +[16]New Languages and Language specific improvements + + [17]Ada + + * Traceback support added in RTEMS for the PPC ELF and ARM + architectures. + * Support for versions older than VxWorks 7 has been removed. + * General improvements to the contracts in the standard libraries. + * Addition of GNAT.Binary_Search. + * Further additions and fixes for the Ada 2022 specification. + * The Pragma SPARK_Mode=>Auto is now accepted. Contract analysis has + been further improved. + * Documentation improvements. + + [18]C family + + * New warnings: + + [19]-Wxor-used-as-pow warns about uses of ^, the exclusive or + operator, where it appears the user meant exponentiation + ([20]PR90885) + * Three new function attributes for documenting int arguments that + are file descriptors: + + [21]__attribute__((fd_arg(N))) + + [22]__attribute__((fd_arg_read(N))) + + [23]__attribute__((fd_arg_write(N))) + These are used by [24]-fanalyzer to detect misuses of file + descriptors. + * A new statement attribute for C++23 [25]P1774R8 Portable + assumptions support also in C or older C++: + [26]__attribute__((assume(EXPR))); + * GCC can now control when to treat the trailing array of a structure + as a flexible array member for the purpose of accessing the + elements of such an array. By default, all trailing arrays in + aggregates are treated as flexible array members. Use the new + command-line option [27]-fstrict-flex-arrays to control which array + members are treated as flexible arrays. + + [28]C + + * Several C23 features have been implemented: + + [29]N3042, Introduce the nullptr constant + + [30]N2963, Enhanced Enumerations (fixed underlying types) + + [31]N2975, Relax requirements for variadic parameter lists + + [32]N3007, Type inference for object definitions (auto) + + [33]N3018, The constexpr specifier for object definitions + + [34]N3038, Introduce storage-class specifiers for compound + literals + + typeof (previously supported as an extension) and + typeof_unqual + + New keywords alignas, alignof, bool, false, static_assert, + thread_local, true + + [35]N2764, The noreturn attribute + + Support for empty initializer braces + + __STDC_VERSION_*_H__ header version macros + + Removal of ATOMIC_VAR_INIT + + unreachable macro in + + Removal of trigraphs + + Removal of unprototyped functions + + printf and scanf format checking with [36]-Wformat for %wN and + %wfN format length modifiers + + [37]N2836, Identifier Syntax using Unicode Standard Annex 31 + * In addition to those C23 features, existing features adopted in C23 + have been adjusted to follow C23 requirements and are not diagnosed + with -std=c2x -Wpedantic. + * New warnings: + + [38]-Wenum-int-mismatch warns about mismatches between an + enumerated type and an integer type ([39]PR105131) + + [40]C++ + + * Excess precision support (which has been available in C since GCC + 4.5) has been implemented for C++ as well. It is enabled by default + in strict standard modes like -std=c++17, where it defaults to + -fexcess-precision=standard, while in GNU standard modes like + -std=gnu++20 it defaults to -fexcess-precision=fast. The option + mainly affects IA-32/x86-64 using x87 math and in some cases on + Motorola 68000, where float and double expressions are evaluated in + long double precision and S/390, System z, IBM z Systems where + float expressions are evaluated in double precision. Also, on + several architectures where std::float16_t or std::bfloat16_t types + are supported those are evaluated in float precision. + -fexcess-precision=fast restores previous behavior. + * Several C++23 features have been implemented: + + [41]P2324R1, Labels at the end of compound statements + ([42]PR103539) + + [43]P2255R2, A type trait to detect reference binding to + temporary ([44]PR104477) + + [45]P2327R1, De-deprecating volatile compound operations + + [46]P2437R1, Support for #warning ([47]PR106646) + + [48]P2290R3, Delimited escape sequences ([49]PR106645) + + [50]P2071R2, Named universal character escapes ([51]PR106648) + + [52]P2513R3, char8_t Compatibility and Portability Fix + ([53]PR106656) + + [54]P1169R4, static operator() ([55]PR106651) + + [56]P2266R3, Simpler implicit move ([57]PR101165) + + [58]P2468R2, The Equality Operator You Are Looking For + ([59]PR106644) + + [60]P2362R3, Remove non-encodable + wide character literals and multicharacter wide character lite + rals ([61]PR106647) + + [62]P2448R2, Relaxing some constexpr restrictions + ([63]PR106649) + + [64]P1467R9, Extended floating-point types and standard names + ([65]PR106652) + + [66]P1774R8, Portable assumptions ([67]PR106654) + + [68]P2295R6, Support for + UTF-8 as a portable source file encoding ([69]PR106655) + + [70]P2589R1, static operator[] ([71]PR107684) + * New warnings: + + [72]-Wself-move warns when a value is moved to itself with + std::move ([73]PR81159) + + [74]-Wdangling-reference warns when a reference is bound to a + temporary whose lifetime has ended ([75]PR106393) + * The [76]-Wpessimizing-move and [77]-Wredundant-move warnings have + been extended to warn in more contexts. + * The [78]-nostdlib++ option has been added, to enable linking with + g++ without implicitly linking in the C++ standard library. + + [79]Runtime Library (libstdc++) + + * Improved experimental support for C++20, including: + + header and std::format. + + std::chrono::utc_clock and other clocks, time zones, and + std::format support in the header. + * Improved experimental support for C++23, including: + + Additions to the header: views::zip, + views::zip_transform, views::adjacent, + views::adjacent_transform views::pairwise, views::slide, + views::chunk, views::chunk_by, views::repeat, views::chunk_by, + views::cartesian_product, views::as_rvalue, views::enumerate, + views::as_const. + + Additions to the header: ranges::contains, + ranges::contains_subrange, ranges::iota, ranges::find_last, + ranges::find_last_if, ranges::find_last_if_not, + ranges::fold_left, ranges::fold_left_first, + ranges::fold_right, ranges::fold_right_last, + ranges::fold_left_with_iter, + ranges::fold_left_first_with_iter. + + Monadic operations for std::expected. + + Constexpr std::bitset, std::to_chars and std::from_chars. + + Library support for extended floating-point types. + * Support for the header from v3 of the Library + Fundamentals Technical Specification. + * Support for the header from v2 of + the Concurrency Technical Specification. + * Support for many previously unavailable features in freestanding + mode, thanks to Arsen Arsenović. For example, std::tuple is now + available for freestanding compilation. The freestanding subset + contains all the components made freestanding by [80]P1642, and + libstdc++ adds more components such as std::array and + std::string_view. Additionally, libstdc++ now respects the + -ffreestanding compiler option and so it is not necessary to build + a separate freestanding installation of libstdc++. Compiling with + -ffreestanding restricts the available features to the freestanding + subset, even if libstdc++ was built as a full, hosted + implementation. + + [81]D + + * Support for the D programming language has been updated to version + 2.103.1 of the language and run-time library. Full changelog for + this release and previous releases can be found on the + [82]dlang.org website. + * The following GCC attributes are now recognized and available from + the gcc.attributes module with short-hand aliases for convenience: + + @attribute("no_sanitize", arguments) or + @no_sanitize(arguments). + + @attribute("register") or @register. + + @attribute("simd") or @simd. + + @attribute("simd_clones", mask) or @simd_clones(mask). + + @attribute("visibility", arguments) or @visibility(arguments). + * New aliases have been added to gcc.attributes for compatibility + with ldc.attributes. + + The @hidden attribute is an alias for @attribute("visibility", + "hidden"). + + The @noSanitize attribute is an alias for + @attribute("no_sanitize"). + * Vector operation intrinsics prefetch, loadUnaligned, + storeUnaligned, shuffle, shufflevector, extractelement, + insertelement, convertvector, and blendvector have been added to + the gcc.simd module. + * New warnings: + + [83]-Wbuiltin-declaration-mismatch= warns when a built-in + function is declared with the wrong signature. + + [84]-Wmismatched-special-enum warns when a special enum is + declared with the wrong base type. + * New version identifier D_Optimized is now predefined when the -O + option, or any higher optimization level is used. + * The predefinition of version D_Exceptions can now by controlled by + the option -fexception. + * The predefinition of version D_TypeInfo can now by controlled by + the option -frtti. + * The -fdebug= and -fversion= compiler switches no longer accept an + integer argument. + + [85]Fortran + + * Finalization is now fully supported. + + [86]Go + + * GCC 13, like GCC 12, provides a complete implementation of the Go + 1.18 user packages. + * Although Go 1.18 includes support for generic programming, that + support is not yet available in GCC. + + [87]Modula-2 + + * Support for the language Modula-2 has been added. This includes + support for the ISO/IEC 10514-1, PIM2, PIM3, PIM4 dialects together + with a complete set of ISO/IEC 10514-1 and PIM libraries. + * The <* noreturn *> attribute is supported with the -Wreturn-type + [88]option. + +[89]New Targets and Target Specific Improvements + + [90]AArch64 + + * The AArch64 target now supports Decimal Floating-point in the BID + format through the libbid library. + * A number of new CPUs are supported through the -mcpu and -mtune + options (GCC identifiers in parentheses). + + Ampere-1A (ampere1a). + + Arm Cortex-A715 (cortex-a715). + + Arm Cortex-X1C (cortex-x1c). + + Arm Cortex-X3 (cortex-x3). + + Arm Neoverse V2 (neoverse-v2). + * Support has been added for the armv9.1-a, armv9.2-a and armv9.3-a + arguments to the -march= option. + * The FEAT_LRCPC feature is now supported by generating the LDAPR + instructions for C and C++ atomic loads with an acquire memory + model. This is enabled when compiling with the +rcpc extension to + -march or a CPU target that supports this feature. + * The FEAT_CSSC feature from the 2022 Arm Architecture extensions is + supported through the +cssc extension option. When enabled, scalar + operations like integer minimum, maximum, absolute value, count + trailing zeroes (__builtin_ctz), population count + (__builtin_popcount) can be implemented in a single instruction. + * The FEAT_LSE2 feature is now supported through libatomic and + provides lockless 16-byte atomics on systems that implement it. + + [91]AMD Radeon (GCN) + + * Support for the Instinct MI200 series devices ([92] gfx90a) has + been added. + * SIMD vectorization support has been improved; this and + stack-handling changes [93]require newlib 4.3.0 (or newer). + + [94]arm + + * A number of new CPUs are supported through the -mcpu and -mtune + options (GCC identifiers in parentheses). + + STAR-MC1 (star-mc1). + + Arm Cortex-X1C (cortex-x1c). + + Arm Cortex-M85 (cortex-m85). + * Support has been added for the M-profile PACBTI extension that can + help harden the generated code against return-oriented and + jump-oriented attacks. It can be enabled through the + -mbranch-protection= option. + + [95]AVR + + * Support for the following devices has been added in v13.3: + + ATtiny102, ATtiny104, ATtiny424, ATtiny426, ATtiny427, + ATtiny824, ATtiny826, ATtiny827, ATtiny1624, ATtiny1626, + ATtiny1627, ATtiny3224, ATtiny3226, ATtiny3227, AVR32DD14, + AVR32DD20, AVR32DD28, AVR32DD32, AVR32DU14, AVR32DU20, + AVR32DU28, AVR32DU32, AVR32EA28, AVR32EA32, AVR32EA48, + AVR64DD14, AVR64DD20, AVR64DD28, AVR64DD32, AVR64DU28, + AVR64DU32, AVR64EA28, AVR64EA32, AVR64EA48, ATA5787, ATA5835, + ATA5700M322. + * Support for the following devices has been added in v13.4: + + AVR32SD20, AVR32SD28, AVR32SD32, AVR64SD28, AVR64SD32, + AVR64SD48. + + [96]IA-32/x86-64 + + * For both C and C++ the __bf16 type is supported on x86 systems with + SSE2 and above enabled. + * Use this __bf16 type for AVX512BF16 intrinsics instead of + __bfloat16 which is typedef for short. __bf16 is now part of the + x86 psABI. Users need to adjust their AVX512BF16-related source + code when upgrading to GCC 13. + * New ISA extension support for Intel AMX-COMPLEX was added. + AMX-COMPLEX intrinsics are available via the -mamx-complex compiler + switch. + * New ISA extension support for Intel AMX-FP16 was added. AMX-FP16 + intrinsics are available via the -mamx-fp16 compiler switch. + * New ISA extension support for Intel AVX-IFMA was added. AVX-IFMA + intrinsics are available via the -mavxifma compiler switch. + * New ISA extension support for Intel AVX-NE-CONVERT was added. + AVX-NE-CONVERT intrinsics are available via the -mavxneconvert + compiler switch. + * New ISA extension support for Intel AVX-VNNI-INT8 was added. + AVX-VNNI-INT8 intrinsics are available via the -mavxvnniint8 + compiler switch. + * New ISA extension support for Intel CMPccXADD was added. CMPccXADD + intrinsics are available via the -mcmpccxadd compiler switch. + * New ISA extension support for Intel PREFETCHI was added. PREFETCHI + intrinsics are available via the -mprefetchi compiler switch. + * New ISA extension support for Intel RAO-INT was added. RAO-INT + intrinsics are available via the -mraoint compiler switch. + * GCC now supports the Intel CPU named Raptor Lake through + -march=raptorlake. Raptor Lake is based on Alder Lake. + * GCC now supports the Intel CPU named Meteor Lake through + -march=meteorlake. Meteor Lake is based on Alder Lake. + * GCC now supports the Intel CPU named Sierra Forest through + -march=sierraforest. Based on ISA extensions enabled on Alder Lake, + the switch further enables the AVX-IFMA, AVX-NE-CONVERT, + AVX-VNNI-INT8, CMPccXADD, ENQCMD and UINTR ISA extensions. + * GCC now supports the Intel CPU named Grand Ridge through + -march=grandridge. Grand Ridge is based on Sierra Forest. + * GCC now supports the Intel CPU named Emerald Rapids through + -march=emeraldrapids. Emerald Rapids is based on Sapphire Rapids. + * GCC now supports the Intel CPU named Granite Rapids through + -march=graniterapids. Based on Sapphire Rapids, the switch further + enables the AMX-FP16 and PREFETCHI ISA extensions. + * GCC now supports the Intel CPU named Granite Rapids D through + -march=graniterapids-d. Based on Granite Rapids, the switch further + enables the AMX-COMPLEX ISA extensions. + * GCC now supports AMD CPUs based on the znver4 core via + -march=znver4. The switch makes GCC consider using 512-bit vectors + when auto-vectorizing. + + [97]LoongArch + + * New features + + The new command-line option -mexplicit-relocs decides whether + to use the assembler relocation operator when dealing with + symbolic addresses. It is enabled by default if a compatible + assembler (binutils 2.40 or later) is present at GCC build + time. + + The new command-line option -mdirect-extern-access can be used + to prevent accessing external symbols through GOT. + + The new variable attribute [98]model has been added. + * Built-in functions + + The rint and copysign mathematical builtins (and their float + variants) are now implemented as inline LoongArch intrinsics. + + The lrint, logb, scalbln, scalbn and ldexp mathematical + builtins (and their float variants) are now implemented as + inline LoongArch intrinsics when using -fno-math-errno. + + The lceil and lfloor mathematical builtins (and their float + variants) are now implemented as inline LoongArch intrinsics + when using -ffp-int-builtin-inexact. + * Subprojects Support + + libvtv now supports LoongArch. + + libitm now supports LoongArch. + + Address sanitizers other than HWASan and TSan are now + supported on LoongArch. + + [99]NVPTX + + * The default value for the [100]-march option can be now changed + when [101]building GCC using the [102]--with-arch= configure + option. GCC's target libraries are then build both with sm_30 and + the specified target architecture. If not specified, GCC defaults + to sm_30. + + [103]RISC-V + + * Support for vector intrinsics as specified in [104]version 0.11 of + the RISC-V vector intrinsic specification, thanks Ju-Zhe Zhong from + [105]RiVAI for contributing most of implementation. + * Support for the following standard extensions has been added: + + Zawrs + + Zbkb + + Zbkc + + Zbkx + + Zdinx + + Zfinx + + Zfh + + Zfhmin + + Zhinx + + Zhinxmin + + Zicbom + + Zicbop + + Zicboz + + Zknd + + Zkne + + Zksed + + Zksh + + Zmmul + * Support for the following vendor extensions has been added: + + XTheadBa + + XTheadBb + + XTheadBs + + XTheadCmo + + XTheadCondMov + + XTheadFMemIdx + + XTheadFmv + + XTheadInt + + XTheadMac + + XTheadMemIdx + + XTheadMemPair + + XTheadSync + * The following new CPUs are supported through the -mcpu option (GCC + identifiers in parentheses). + + T-Head's XuanTie C906 (thead-c906). + * Improves the multi-lib selection mechanism for the bare-metal + toolchain (riscv*-elf*). GCC will now automatically select the + best-fit multi-lib candidate instead of requiring all possible + reuse rules to be listed at build time. + +[106]Operating Systems + + [107]Windows + + * The GNU threads library used by the win32 thread model has been + reimplemented using direct Win32 API calls, except for the + Objective-C specific subset. It requires Windows XP/Server 2003 or + later. The new implementation also adds the support needed for the + C++11 threads, using again direct Win32 API calls; this additional + layer requires Windows Vista/Server 2008 or later. It is + recommended to use a recent version of MinGW-W64 in conjunction + with the win32 thread model. + +[108]Improvements to Static Analyzer + + * The analyzer has gained 20 new warnings: + + [109]-Wanalyzer-allocation-size + + [110]-Wanalyzer-deref-before-check + + [111]-Wanalyzer-exposure-through-uninit-copy + + Seven new warnings relating to misuse of file descriptors: + o [112]-Wanalyzer-fd-access-mode-mismatch + o [113]-Wanalyzer-fd-double-close + o [114]-Wanalyzer-fd-leak + o [115]-Wanalyzer-fd-phase-mismatch (e.g. calling accept on + a socket before calling listen on it) + o [116]-Wanalyzer-fd-type-mismatch (e.g. using a stream + socket operation on a datagram socket) + o [117]-Wanalyzer-fd-use-after-close + o [118]-Wanalyzer-fd-use-without-check + along with special-casing handling of the behavior of open, + close, creat, dup, dup2, dup3, pipe, pipe2, read, and write. + + [119]-Wanalyzer-imprecise-fp-arithmetic + + [120]-Wanalyzer-infinite-recursion + + [121]-Wanalyzer-jump-through-null + + [122]-Wanalyzer-out-of-bounds + + [123]-Wanalyzer-putenv-of-auto-var + + [124]-Wanalyzer-tainted-assertion + + Four new warnings for misuses of : + o [125]-Wanalyzer-va-list-leak for complaining about + missing va_end after a va_start or va_copy + o [126]-Wanalyzer-va-list-use-after-va-end for complaining + about va_arg or va_copy used on a va_list that's had + va_end called on it + o [127]-Wanalyzer-va-arg-type-mismatch for type-checking of + va_arg usage in interprocedural execution paths against + the types of the parameters that were actually passed to + the variadic call + o [128]-Wanalyzer-va-list-exhausted for complaining in + interprocedural execution paths if va_arg is used too + many times on a va_list + along with numerous other improvements. + +[129]Improvements for plugin authors + + * GCC diagnostics can now be [130]associated with rules such as from + coding standards documents, or specifications. Such rules have a + code name and can have a URL, which GCC can print in text form or + capture in its [131]SARIF output when emitting diagnostics. + +Other significant improvements + +[132]GCC 13.1 + + This is the [133]list of problem reports (PRs) from GCC's bug tracking + system that are known to be fixed in the 13.1 release. This list might + not be complete (that is, it is possible that some PRs that have been + fixed are not listed here). + +[134]GCC 13.2 + + This is the [135]list of problem reports (PRs) from GCC's bug tracking + system that are known to be fixed in the 13.2 release. This list might + not be complete (that is, it is possible that some PRs that have been + fixed are not listed here). + +[136]GCC 13.3 + + This is the [137]list of problem reports (PRs) from GCC's bug tracking + system that are known to be fixed in the 13.3 release. This list might + not be complete (that is, it is possible that some PRs that have been + fixed are not listed here). + + Language Specific Changes + + C++ + + * The libstdc++exp.a library now includes all the Filesystem TS + symbols from the libstdc++fs.a library, and the experimental + symbols for the C++23 std::stacktrace class from the + libstdc++_libbacktrace.a library. This means that -lstdc++exp is + the only library needed for all experimental libstdc++ features. + +[138]GCC 13.4 + + This is the [139]list of problem reports (PRs) from GCC's bug tracking + system that are known to be fixed in the 13.4 release. This list might + not be complete (that is, it is possible that some PRs that have been + fixed are not listed here). + + + For questions related to the use of GCC, please consult these web + pages and the [140]GCC manuals. If that fails, the + [141]gcc-help@gcc.gnu.org mailing list might help. Comments on these + web pages and the development of GCC are welcome on our developer + list at [142]gcc@gcc.gnu.org. All of [143]our lists have public + archives. + + Copyright (C) [144]Free Software Foundation, Inc. Verbatim copying and + distribution of this entire article is permitted in any medium, + provided this notice is preserved. + + These pages are [145]maintained by the GCC team. Last modified + 2025-06-05. + +References + + 1. https://gcc.gnu.org/gcc-13/porting_to.html + 2. https://gcc.gnu.org/onlinedocs/index.html#current + 3. https://gcc.gnu.org/pipermail/gcc/2022-December/240322.html + 4. https://gcc.gnu.org/onlinedocs/gcc-13.1.0/gcc/Warning-Options.html#index-Warray-bounds + 5. https://gcc.gnu.org/onlinedocs/gcc-13.1.0/gcc/C-Dialect-Options.html#index-fstrict-flex-arrays + 6. https://gcc.gnu.org/onlinedocs/gcc-13.1.0/gcc/Static-Analyzer-Options.html + 7. https://gcc.gnu.org/onlinedocs/gcc-13.1.0/gcc/ARM-iWMMXt-Built-in-Functions.html + 8. https://gcc.gnu.org/onlinedocs/libstdc++/manual/using_dynamic_or_shared.html#manual.intro.using.linkage.dynamic + 9. https://gcc.gnu.org/gcc-13/changes.html#general + 10. https://gcc.gnu.org/projects/gomp/ + 11. http://memkind.github.io/memkind/ + 12. https://sarifweb.azurewebsites.net/ + 13. https://gcc.gnu.org/onlinedocs/gcc-13.1.0/gcc/Static-Analyzer-Options.html + 14. https://gcc.gnu.org/onlinedocs/gcc-13.1.0/gcc/Diagnostic-Message-Formatting-Options.html#index-fdiagnostics-format + 15. https://gcc.gnu.org/onlinedocs/gcc/Freestanding-Environments.html + 16. https://gcc.gnu.org/gcc-13/changes.html#languages + 17. https://gcc.gnu.org/gcc-13/changes.html#ada + 18. https://gcc.gnu.org/gcc-13/changes.html#c-family + 19. https://gcc.gnu.org/onlinedocs/gcc-13.1.0/gcc/Warning-Options.html#index-Wxor-used-as-pow + 20. https://gcc.gnu.org/PR90885 + 21. https://gcc.gnu.org/onlinedocs/gcc-13.1.0/gcc/Common-Function-Attributes.html#index-fd_005farg-function-attribute + 22. https://gcc.gnu.org/onlinedocs/gcc-13.1.0/gcc/Common-Function-Attributes.html#index-fd_005farg_005fread-function-attribute + 23. https://gcc.gnu.org/onlinedocs/gcc-13.1.0/gcc/Common-Function-Attributes.html#index-fd_005farg_005fwrite-function-attribute + 24. https://gcc.gnu.org/onlinedocs/gcc-13.1.0/gcc/Static-Analyzer-Options.html + 25. https://wg21.link/p1774r8 + 26. https://gcc.gnu.org/onlinedocs/gcc-13.1.0/gcc/Statement-Attributes.html#index-assume-statement-attribute + 27. https://gcc.gnu.org/onlinedocs/gcc-13.1.0/gcc/C-Dialect-Options.html#index-fstrict-flex-arrays + 28. https://gcc.gnu.org/gcc-13/changes.html#c + 29. https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3042.htm + 30. https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2963.htm + 31. https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2975.pdf + 32. https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3007.htm + 33. https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3018.htm + 34. https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3038.htm + 35. https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2764.pdf + 36. https://gcc.gnu.org/onlinedocs/gcc-13.1.0/gcc/Warning-Options.html#index-Wformat + 37. https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2836.pdf + 38. https://gcc.gnu.org/onlinedocs/gcc-13.1.0/gcc/Warning-Options.html#index-Wenum-int-mismatch + 39. https://gcc.gnu.org/PR105131 + 40. https://gcc.gnu.org/gcc-13/changes.html#cxx + 41. https://wg21.link/p2324 + 42. https://gcc.gnu.org/PR103539 + 43. https://wg21.link/p2255 + 44. https://gcc.gnu.org/PR104477 + 45. https://wg21.link/p2327 + 46. https://wg21.link/p2437 + 47. https://gcc.gnu.org/PR106646 + 48. https://wg21.link/p2290 + 49. https://gcc.gnu.org/PR106645 + 50. https://wg21.link/p2071 + 51. https://gcc.gnu.org/PR106648 + 52. https://wg21.link/p2513 + 53. https://gcc.gnu.org/PR106656 + 54. https://wg21.link/p1169r4 + 55. https://gcc.gnu.org/PR106651 + 56. https://wg21.link/p2266r3 + 57. https://gcc.gnu.org/PR101165 + 58. https://wg21.link/p2468r2 + 59. https://gcc.gnu.org/PR106644 + 60. https://wg21.link/p2362r3 + 61. https://gcc.gnu.org/PR106647 + 62. https://wg21.link/p2448r2 + 63. https://gcc.gnu.org/PR106649 + 64. https://wg21.link/p1467r9 + 65. https://gcc.gnu.org/PR106652 + 66. https://wg21.link/p1774r8 + 67. https://gcc.gnu.org/PR106654 + 68. https://wg21.link/p2295r6 + 69. https://gcc.gnu.org/PR106655 + 70. https://wg21.link/p2589r1 + 71. https://gcc.gnu.org/PR107684 + 72. https://gcc.gnu.org/onlinedocs/gcc-13.1.0/gcc/Warning-Options.html#index-Wself-move + 73. https://gcc.gnu.org/PR81159 + 74. https://gcc.gnu.org/onlinedocs/gcc-13.1.0/gcc/C_002b_002b-Dialect-Options.html#index-Wdangling-reference + 75. https://gcc.gnu.org/PR106393 + 76. https://gcc.gnu.org/onlinedocs/gcc-13.1.0/gcc/C_002b_002b-Dialect-Options.html#index-Wpessimizing-move + 77. https://gcc.gnu.org/onlinedocs/gcc-13.1.0/gcc/C_002b_002b-Dialect-Options.html#index-Wredundant-move + 78. https://gcc.gnu.org/onlinedocs/gcc-13.1.0/gcc/Link-Options.html#index-nostdlib_002b_002b + 79. https://gcc.gnu.org/gcc-13/changes.html#libstdcxx + 80. https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2022/p1642r11.html + 81. https://gcc.gnu.org/gcc-13/changes.html#d + 82. https://dlang.org/changelog/2.103.1.html + 83. https://gcc.gnu.org/onlinedocs/gcc-13.1.0/gdc/Warnings.html#index-Wno-builtin-declaration-mismatch + 84. https://gcc.gnu.org/onlinedocs/gcc-13.2.0/gdc/Warnings.html#index-Wmismatched-special-enum + 85. https://gcc.gnu.org/gcc-13/changes.html#fortran + 86. https://gcc.gnu.org/gcc-13/changes.html#go + 87. https://gcc.gnu.org/gcc-13/changes.html#modula2 + 88. https://gcc.gnu.org/onlinedocs/gcc-13.1.0/gm2/Compiler-options.html + 89. https://gcc.gnu.org/gcc-13/changes.html#targets + 90. https://gcc.gnu.org/gcc-13/changes.html#aarch64 + 91. https://gcc.gnu.org/gcc-13/changes.html#amdgcn + 92. https://gcc.gnu.org/onlinedocs/gcc-13.1.0/gcc/AMD-GCN-Options.html + 93. https://gcc.gnu.org/install/specific.html#amdgcn-x-amdhsa + 94. https://gcc.gnu.org/gcc-13/changes.html#arm + 95. https://gcc.gnu.org/gcc-13/changes.html#avr + 96. https://gcc.gnu.org/gcc-13/changes.html#x86 + 97. https://gcc.gnu.org/gcc-13/changes.html#loongarch + 98. https://gcc.gnu.org/onlinedocs/gcc-13.1.0/gcc/LoongArch-Variable-Attributes.html#LoongArch-Variable-Attributes + 99. https://gcc.gnu.org/gcc-13/changes.html#nvptx + 100. https://gcc.gnu.org/onlinedocs/gcc-13.1.0/gcc/Nvidia-PTX-Options.html + 101. https://gcc.gnu.org/install/ + 102. https://gcc.gnu.org/install/specific.html#nvptx-x-none + 103. https://gcc.gnu.org/gcc-13/changes.html#riscv + 104. https://github.com/riscv-non-isa/rvv-intrinsic-doc/tree/v0.11.x + 105. https://rivai-ic.com.cn/ + 106. https://gcc.gnu.org/gcc-13/changes.html#os + 107. https://gcc.gnu.org/gcc-13/changes.html#windows + 108. https://gcc.gnu.org/gcc-13/changes.html#analyzer + 109. https://gcc.gnu.org/onlinedocs/gcc-13.1.0/gcc/Static-Analyzer-Options.html#index-Wanalyzer-allocation-size + 110. https://gcc.gnu.org/onlinedocs/gcc-13.1.0/gcc/Static-Analyzer-Options.html#index-Wanalyzer-deref-before-check + 111. https://gcc.gnu.org/onlinedocs/gcc-13.1.0/gcc/Static-Analyzer-Options.html#index-Wanalyzer-exposure-through-uninit-copy + 112. https://gcc.gnu.org/onlinedocs/gcc-13.1.0/gcc/Static-Analyzer-Options.html#index-Wanalyzer-fd-access-mode-mismatch + 113. https://gcc.gnu.org/onlinedocs/gcc-13.1.0/gcc/Static-Analyzer-Options.html#index-Wanalyzer-fd-double-close + 114. https://gcc.gnu.org/onlinedocs/gcc-13.1.0/gcc/Static-Analyzer-Options.html#index-Wanalyzer-fd-leak + 115. https://gcc.gnu.org/onlinedocs/gcc-13.1.0/gcc/Static-Analyzer-Options.html#index-Wanalyzer-fd-phase-mismatch + 116. https://gcc.gnu.org/onlinedocs/gcc-13.1.0/gcc/Static-Analyzer-Options.html#index-Wanalyzer-fd-type-mismatch + 117. https://gcc.gnu.org/onlinedocs/gcc-13.1.0/gcc/Static-Analyzer-Options.html#index-Wanalyzer-fd-use-after-close + 118. https://gcc.gnu.org/onlinedocs/gcc-13.1.0/gcc/Static-Analyzer-Options.html#index-Wanalyzer-fd-use-without-check + 119. https://gcc.gnu.org/onlinedocs/gcc-13.1.0/gcc/Static-Analyzer-Options.html#index-Wanalyzer-imprecise-fp-arithmetic + 120. https://gcc.gnu.org/onlinedocs/gcc-13.1.0/gcc/Static-Analyzer-Options.html#index-Wanalyzer-infinite-recursion + 121. https://gcc.gnu.org/onlinedocs/gcc-13.1.0/gcc/Static-Analyzer-Options.html#index-Wanalyzer-jump-through-null + 122. https://gcc.gnu.org/onlinedocs/gcc-13.1.0/gcc/Static-Analyzer-Options.html#index-Wanalyzer-out-of-bounds + 123. https://gcc.gnu.org/onlinedocs/gcc-13.1.0/gcc/Static-Analyzer-Options.html#index-Wanalyzer-putenv-of-auto-var + 124. https://gcc.gnu.org/onlinedocs/gcc-13.1.0/gcc/Static-Analyzer-Options.html#index-Wanalyzer-tainted-assertion + 125. https://gcc.gnu.org/onlinedocs/gcc-13.1.0/gcc/Static-Analyzer-Options.html#index-Wanalyzer-va-list-leak + 126. https://gcc.gnu.org/onlinedocs/gcc-13.1.0/gcc/Static-Analyzer-Options.html#index-Wanalyzer-va-list-use-after-va-end + 127. https://gcc.gnu.org/onlinedocs/gcc-13.1.0/gcc/Static-Analyzer-Options.html#index-Wanalyzer-va-arg-type-mismatch + 128. https://gcc.gnu.org/onlinedocs/gcc-13.1.0/gcc/Static-Analyzer-Options.html#index-Wanalyzer-va-list-exhausted + 129. https://gcc.gnu.org/gcc-13/changes.html#plugins + 130. https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=0b14f590e3e9d95b8211b77d992589d5ab4c25f0 + 131. https://gcc.gnu.org/onlinedocs/gcc-13.1.0/gcc/Diagnostic-Message-Formatting-Options.html#index-fdiagnostics-format + 132. https://gcc.gnu.org/gcc-13/changes.html#13.1 + 133. https://gcc.gnu.org/bugzilla/buglist.cgi?bug_status=RESOLVED&resolution=FIXED&target_milestone=13.0 + 134. https://gcc.gnu.org/gcc-13/changes.html#13.2 + 135. https://gcc.gnu.org/bugzilla/buglist.cgi?bug_status=RESOLVED&resolution=FIXED&target_milestone=13.2 + 136. https://gcc.gnu.org/gcc-13/changes.html#13.3 + 137. https://gcc.gnu.org/bugzilla/buglist.cgi?bug_status=RESOLVED&resolution=FIXED&target_milestone=13.3 + 138. https://gcc.gnu.org/gcc-13/changes.html#13.4 + 139. https://gcc.gnu.org/bugzilla/buglist.cgi?bug_status=RESOLVED&resolution=FIXED&target_milestone=13.4 + 140. https://gcc.gnu.org/onlinedocs/ + 141. mailto:gcc-help@gcc.gnu.org + 142. mailto:gcc@gcc.gnu.org + 143. https://gcc.gnu.org/lists.html + 144. https://www.fsf.org/ + 145. https://gcc.gnu.org/about.html +====================================================================== +http://gcc.gnu.org/gcc-12/index.html + GCC 12 Release Series + + Jun 20, 2024 + + The GCC developers are pleased to announce the release of GCC 12.4. + + This release is a bug-fix release, containing fixes for regressions in + GCC 12.3 relative to previous releases of GCC. + +Release History + + GCC 12.4 + Jun 20, 2024 ([1]changes, [2]documentation) + + GCC 12.3 + May 8, 2023 ([3]changes, [4]documentation) + + GCC 12.2 + Aug 19, 2022 ([5]changes, [6]documentation) + + GCC 12.1 + May 6, 2022 ([7]changes, [8]documentation) + +References and Acknowledgements + + GCC used to stand for the GNU C Compiler, but since the compiler + supports several other languages aside from C, it now stands for the + GNU Compiler Collection. + + The GCC developers would like to thank the numerous people that have + contributed new features, improvements, bug fixes, and other changes as + well as test results to GCC. This [9]amazing group of volunteers is + what makes GCC successful. + + For additional information about GCC please refer to the [10]GCC + project web site or contact the [11]GCC development mailing list. + + To obtain GCC please use [12]our mirror sites or [13]our version + control system. + + + For questions related to the use of GCC, please consult these web + pages and the [14]GCC manuals. If that fails, the + [15]gcc-help@gcc.gnu.org mailing list might help. Comments on these + web pages and the development of GCC are welcome on our developer + list at [16]gcc@gcc.gnu.org. All of [17]our lists have public + archives. + + Copyright (C) [18]Free Software Foundation, Inc. Verbatim copying and + distribution of this entire article is permitted in any medium, + provided this notice is preserved. + + These pages are [19]maintained by the GCC team. Last modified + 2024-06-20. + +References + + 1. https://gcc.gnu.org/gcc-12/changes.html + 2. https://gcc.gnu.org/onlinedocs/12.4.0/ + 3. https://gcc.gnu.org/gcc-12/changes.html + 4. https://gcc.gnu.org/onlinedocs/12.3.0/ + 5. https://gcc.gnu.org/gcc-12/changes.html + 6. https://gcc.gnu.org/onlinedocs/12.2.0/ + 7. https://gcc.gnu.org/gcc-12/changes.html + 8. https://gcc.gnu.org/onlinedocs/12.1.0/ + 9. https://gcc.gnu.org/onlinedocs/gcc-12.1.0/gcc/Contributors.html + 10. https://gcc.gnu.org/index.html + 11. mailto:gcc@gcc.gnu.org + 12. https://gcc.gnu.org/mirrors.html + 13. https://gcc.gnu.org/git.html + 14. https://gcc.gnu.org/onlinedocs/ + 15. mailto:gcc-help@gcc.gnu.org + 16. mailto:gcc@gcc.gnu.org + 17. https://gcc.gnu.org/lists.html + 18. https://www.fsf.org/ + 19. https://gcc.gnu.org/about.html +====================================================================== +http://gcc.gnu.org/gcc-12/changes.html + GCC 12 Release Series + Changes, New Features, and Fixes + + This page is a "brief" summary of some of the huge number of + improvements in GCC 12. You may also want to check out our [1]Porting + to GCC 12 page and the [2]full GCC documentation. + +Caveats + + * An ABI incompatibility between C and C++ when passing or returning + by value certain aggregates containing zero width bit-fields has + been discovered on various targets. As mentioned in [3]PR102024, + since the [4]PR42217 fix in GCC 4.5 the C++ front-end has been + removing zero width bit-fields from the internal representation of + the aggregates after the layout of those aggregates, but the C + front-end kept them, so passing e.g. struct S { float a; int : 0; + float b; } or struct T { float c; int : 0; } by value could differ + between C and C++. Starting with GCC 12 the C++ front-end no longer + removes those bit-fields from the internal representation and per + clarified psABI some targets have been changed, so that they either + ignore those bit-fields in the argument passing by value decisions + in both C and C++, or they always take them into account. x86-64, + ARM and AArch64 will always ignore them (so there is a C ABI + incompatibility between GCC 11 and earlier with GCC 12 or later), + PowerPC64 ELFv2 and S/390 always take them into account (so there + is a C++ ABI incompatibility, GCC 4.4 and earlier compatible with + GCC 12 or later, incompatible with GCC 4.5 through GCC 11). RISC-V + has changed the handling of these already starting with GCC 10. As + the ABI requires, MIPS takes them into account handling function + return values so there is a C++ ABI incompatibility with GCC 4.5 + through 11. For function arguments on MIPS, refer to [5]the MIPS + specific entry. GCC 12 on the above targets will report such + incompatibilities as warnings or other diagnostics unless + -Wno-psabi is used. + * C: Computed gotos require a pointer type now. + * C++: Two non-standard std::pair constructors have been deprecated. + These allowed the use of an rvalue and a literal 0 to construct a + pair containing a move-only type and a pointer. The nullptr keyword + should be used to initialize the pointer member instead of a + literal 0, as this is portable to other C++ implementations. + * The configuration option --enable-libstdcxx-allocator no longer + supports the bitmap, mt, and pool arguments. Those configurations + had been broken for some time. + * D: Building and bootstrapping GDC, the D compiler, now requires a + working GDC (GCC version 9.1 or later) and D runtime library, + libphobos, as the D front end is written in D. On some targets, + libphobos isn't enabled by default, but compiles and works if + --enable-libphobos is used. Other targets may require a more recent + version of GCC to bootstrap. Specifics are documented for affected + targets in the [6]Installing GCC manual. + * Fortran: OpenMP code using the omp_lib.h include file can no longer + be compiled with -std=f95 but now requires at least -std=f2003. + Alternatively, use the omp_lib module, which still supports + -std=f95 and is recommended to be used instead in general. + * OpenMP offloading to Intel MIC has been deprecated and will be + removed in a future release. + * The cr16 target with the cr16-*-* configuration has been obsoleted + and will be removed in a future release. + * The hppa[12]*-*-hpux10* and hppa[12]*-*-hpux11* configurations + targeting 32-bit PA-RISC with HP-UX have been obsoleted and will be + removed in a future release. + * The m32c*-*-rtems* configuration has been obsoleted and will be + removed in a future release. + * The support for the m32r-*-linux*, m32rle-*-linux*, + m68k*-*-openbsd* and vax-*-openbsd* configurations has been + removed. + * STABS: Support for emitting the STABS debugging format is + deprecated and will be removed in the next release. All ports now + default to emit DWARF (version 2 or later) debugging info or are + obsoleted. + * The optimization level -Ofast now implies + -fno-semantic-interposition. + +[7]General Improvements + + * Vectorization is enabled at -O2 which is now equivalent to what + would have been -O2 -ftree-vectorize -fvect-cost-model=very-cheap + in the past. Note that the default vectorizer cost model has been + changed; it used to behave as if -fvect-cost-model=cheap had been + specified. + * GCC now supports the [8]ShadowCallStack sanitizer, which can be + enabled using the command-line option + [9]-fsanitize=shadow-call-stack. This sanitizer currently only + works on AArch64 targets and it requires an environment in which + all code has been compiled with -ffixed-r18. Its primary initial + user is the Linux kernel. + +[10]New Languages and Language specific improvements + + * OpenMP + + OpenMP 5.0 support has been extended: The close map modifier + and the affinity clause are now supported. In addition, + Fortran gained the following features which were available in + C and C++ before: declare variant is now available, depobj, + mutexinoutset and iterator can now also be used with the + depend clause, defaultmap has been updated for OpenMP 5.0, and + the loop directive and combined directives involving the + master directive have been added. + + The following OpenMP 5.1 features have been added: support for + expressing OpenMP directives as C++ 11 attributes, the masked + and scope constructs, the nothing and error directives, and + using primary with the proc_bind clause and OMP_PROC_BIND + environment variable, the reproducible and unconstrained + modifiers to the order clause, and, for C/C++ only, the align + and allocator modifiers to the allocate clause and the atomic + extensions are now available. The OMP_PLACE environment + variable supports the OpenMP 5.1 features. In addition, the + OMP_NUM_TEAMS and OMP_TEAMS_THREAD_LIMIT environment variables + and their associated API routines are now supported as well as + the memory-allocation routines added for Fortran and extended + for C/C++ in OpenMP 5.1. In Fortran code, strictly structured + blocks can be used. + + The [11]OpenMP Implementation Status can be found in the + libgomp manual. + * Version 2.6 of the [12]OpenACC specification continues to be + maintained and improved in the C, C++ and Fortran compilers. See + the [13]implementation status section on the OpenACC wiki page and + the [14]run-time library documentation for further information. In + addition to general performance tuning and bug fixing, new features + include: + + OpenACC worker parallelism for [15]AMD GPUs (already for a + long time supported for [16]Nvidia GPUs). + + Data privatization/sharing at the OpenACC gang level. + + Considerable improvements for the experimental OpenACC + 'kernels' decomposition ([17]--param + openacc-kernels=decompose). + + A new warning flag [18]-Wopenacc-parallelism to warn about + potentially suboptimal choices related to OpenACC parallelism. + * The offload target code generation for OpenMP and OpenACC can now + be better adjusted using the new [19]-foffload-options= flag and + the pre-existing but now documented [20]-foffload= flag. + + [21]Ada + + * Ada 2022 + + Added the -gnat2022 flag to indicate strict Ada 2022 + compliance. The old -gnat2020 flag is now deprecated. + + Support for Big Numbers (Annex G) has seen continuous + improvements. It is now considered complete. It is compatible + with SPARK, i.e. can be used from SPARK code. + + Continuous improvements to the Ada 2022 standard since GCC 11. + + Greatly improved compile time support. More functions can now + have the with Static aspect and can be used in more contexts. + * Ada 2022 extensions. The use of the -gnatX flag is necessary to + access these features as they are not considered stable or + standard. + + Fixed lower bound for unconstrained arrays. + o type Matrix is array (Natural range 0 .. <>, Natural + range 0 .. <>) of Integer; is now valid. + o Subtypes can also specify a lower bound: subtype String_1 + is String (1 .. <>);. Boundaries from slices will "slide" + to the correct lower bound of the subtype. + + Generalized Object.Operand notation. The following code is now + valid V.Add_Element(42);, with V being a vector, for example. + + Additional when constructs. Keywords return, goto and raise + can now use when in addition to the existing exit when. The + following expression is therefore now valid raise + Constraint_Error with "Element is null" when Element = null; + + Pattern matching + o The case statement has been extended to cover records and + arrays as well as finer grained casing on scalar types. + In the future it is expected to provide more compile time + guarantees when accessing discriminated fields. Case + exhaustion is supported for pattern matching. An example + would be +type Sign is (Neg, Zero, Pos); + +function Multiply (S1, S2 : Sign) return Sign is + (case (S1, S2) is + when (Neg, Neg) | (Pos, Pos) => Pos, + when (Zero, <>) | (<>, Zero) => Zero, + when (Neg, Pos) | (Pos, Neg) => Neg); + + * gnatfind and gnatxref, which were already deprecated, have been + removed. + * Greatly expanded code covered by contracts. Thanks to this work, + there are now several Ada standard libraries fully proven in SPARK + which means they have no runtime nor logical errors. They are + mostly numeric and string handling libraries. + * Enable return-slot optimization for Pure functions. + * General optimizations, improvements and additions to the standard + library. Performance, correctness and in some cases stability was + improved. Memory pools have also seen some minor enhancements. + * Improvements to embedded-RTOS targets such as RTEMS, VxWorks and + QNX. Older targets were removed or cleaned. + * Added some [22]hardening features. + + [23]C family + + * Support for __builtin_shufflevector compatible with the clang + language extension was added. + * Support for attribute unavailable was added. + * A new built-in function, __builtin_assoc_barrier, was added. It can + be used to inhibit re-association of floating-point expressions. + * Support for __builtin_dynamic_object_size compatible with the clang + language extension was added. + * New warnings: + + [24]-Wbidi-chars warns about potentially misleading UTF-8 + bidirectional control characters. The default is + -Wbidi-chars=unpaired ([25]PR103026) + + [26]-Warray-compare warns about comparisons between two + operands of array type ([27]PR97573) + * Enhancements to existing warnings: + + [28]-Wattributes has been extended so that it's possible to + use -Wno-attributes=ns::attr or -Wno-attributes=ns:: to + suppress warnings about unknown scoped attributes (in C++11 + and C2X). Similarly, #pragma GCC diagnostic ignored_attributes + "vendor::attr" can be used to achieve the same effect + ([29]PR101940) + + [30]C + + * Some new features from the upcoming C2X revision of the ISO C + standard are supported with -std=c2x and -std=gnu2x. Some of these + features are also supported as extensions when compiling for older + language versions. In addition to the features listed, some + features previously supported as extensions and now added to the C + standard are enabled by default in C2X mode and not diagnosed with + -std=c2x -Wpedantic. + + Digit separators (as in C++) are supported for C2X. + + The #elifdef and #elifndef preprocessing directives are now + supported. + + The printf and scanf format checking with [31]-Wformat now + supports the %b format specified by C2X for binary integers, + and the %B format recommended by C2X for printf. + + [32]C++ + + * Several C++23 features have been implemented: + + [33]P1938R3, if consteval ([34]PR100974) + + [35]P0849R8, auto(x): decay-copy in the language + ([36]PR103049) + + [37]P2242R3, Non-literal variables (and labels and gotos) in + constexpr functions ([38]PR102612) + + [39]P2334R1, Support for preprocessing directives elifdef and + elifndef ([40]PR102616) + + [41]P2360R0, Extend init-statement to allow alias-declaration + ([42]PR102617) + + [43]P2128R6, Multidimensional subscript operator + + [44]DR 2397, auto specifier for pointers and references to + arrays ([45]PR100975) + * Several C++ Defect Reports have been resolved, e.g.: + + [46]DR 960, Covariant functions and lvalue/rvalue references + + [47]DR 1227, Mixing immediate and non-immediate contexts in + deduction failure + + [48]DR 1315, Restrictions on non-type template arguments in + partial specializations + + [49]DR 2082, Referring to parameters in unevaluated operands + of default arguments + + [50]DR 2351, void{} + + [51]DR 2374, Overly permissive specification of enum + direct-list-initialization + + [52]DR 2397, auto specifier for pointers and references to + arrays + + [53]DR 2446, Questionable type-dependency of concept-ids + * New command-line option -fimplicit-constexpr can be used to make + inline functions implicitly constexpr ([54]git) + * New command-line option -ffold-simple-inlines can be used to fold + calls to certain trivial inline functions (currently std::move, + std::forward, std::addressof and std::as_const). In contrast to + inlining such calls, folding means that no intermediate code or + debug information will be generated for them; this minimizes the + abstraction penalty incurred for using these functions versus using + the fundamental operations from which they're defined (e.g. + std::move versus static_cast). This flag is enabled by default when + -fno-inline is not active. + * Deduction guides can be declared at class scope ([55]PR79501) + * [56]-Wuninitialized warns about using uninitialized variables in + member initializer lists ([57]PR19808) + * [58]-Wint-in-bool-context is now disabled when instantiating a + template ([59]git) + * Stricter checking of attributes on friend declarations: if a friend + declaration has an attribute, that declaration must be a + definition. Moreover, a C++11 attribute cannot appear in the middle + of the decl-specifier-seq. ([60]PR99032) + * New warning options for C++ language mismatches: + -Wc++11-extensions, -Wc++14-extensions, -Wc++17-extensions, + -Wc++20-extensions, and -Wc++23-extensions. They are enabled by + default and can be used to control existing pedwarns about + occurrences of new C++ constructs in code using an old C++ standard + dialect. + * New warning [61]-Wmissing-requires warns about missing requires + ([62]git) + * The existing std::is_constant_evaluated in if warning was extended + to warn in more cases ([63]PR100995) + * [64]-Waddress has been enhanced so that it now warns about, for + instance, comparing the address of a nonstatic member function to + null ([65]PR102103) + * Errors about narrowing are no longer hidden if they occur in system + headers + * Ordered comparison of null pointers is now rejected ([66]PR99701) + * Anonymous structs with bases are now rejected ([67]git) + * The compiler rejects taking the address of an immediate member + function ([68]PR102753) + * The compiler has support for C++20 + __cpp_lib_is_pointer_interconvertible and + __cpp_lib_is_layout_compatible to help the C++ library implement + [69]P0466, Layout-compatibility and Pointer-interconvertibility + Traits ([70]PR101539) + * Memory usage of constraint subsumption has been improved + ([71]PR100828) + * constinit thread_local variables are optimized better + ([72]PR101786) + * Support for C++17 std::hardware_destructive_interference_size was + added, along with the [73]-Winterference-size warning ([74]git) + * Many bugs in the CTAD handling have been fixed ([75]PR101344, + [76]PR101883, [77]PR89062, [78]PR101233, [79]PR88252, [80]PR86439, + [81]PR98832, [82]PR102933 ...) + * Two-stage name lookup for dependent operator expressions has been + corrected ([83]PR51577) + * Several issues with constrained variable templates have been fixed + ([84]PR98486) + * The compiler performs less instantiating when doing speculative + constant evaluation ([85]git) + * Various diagnostic improvements; e.g., a more precise caret + location for pointer-to-member expressions + * The new -fconstexpr-fp-except flag allows IEC559 floating point + exceptions in constant-expressions. + + [86]Runtime Library (libstdc++) + + * Improved experimental C++20 support, including: + + std::vector, std::basic_string, std::optional, and + std::variant can be used in constexpr functions. + + std::make_shared for arrays with default initialization, and + std::atomic>. + + Layout-compatibility and pointer-interconvertibility traits. + * Improved experimental C++23 support, including: + + Monadic operations for std::optional. + + std::expected + + std::move_only_function + + + + std::basic_string::resize_and_overwrite + + std::unique_ptr can be used in constexpr functions. + + (not built by default, requires linking to an + extra library). + + + + std::invoke_r + + constexpr std::type_info::operator== + + [87]D + + * New features: + + Support for the D programming language has been updated to + version 2.100.1 of the language and run-time library. Full + changelog for this release and previous releases can be found + on the [88]dlang.org website. + + On supported targets, the __traits(compiles) expression can + now be used to determine whether a target-specific built-in is + available without error during CTFE ([89]PR101127). + + Functions annotated with pragma(inline, true) are now compiled + into every module where they are used from ([90]PR106563). + + Partial support for directly importing C99 sources into a D + compilation ([91]ImportC) has been added to the language. A + notable missing feature is support for preprocessing C + imports, which can be worked around by preprocessing all C + sources used for importing ahead of time. + * New language options: + + -fcheck=, enables or disables the code generation of specific + run-time contract checks. + + -fcheckaction=, controls the run-time behavior on an assert, + array bounds check, or final switch contract failure. The + default is -fcheckaction=throw. + + -fdump-c++-spec=, dumps all compiled extern(C++) declarations + as C++ code to the given file. The supplementary option + -fdump-c++-spec-verbose turns on emission of comments for + ignored declarations in the generated spec. + + -fextern-std=, controls which C++ standard extern(C++) + declarations are compiled to be compatible with. The default + is -fextern-std=c++17. + + -fpreview=, added to enable upcoming D language features in + the compiler. + + -frevert=, added to revert D language changes to support older + D codebases that need more time to transition. + + -fsave-mixins=, saves mixins expanded at compile-time to a + file. + * Deprecated and removed features: + + The -Wtemplates compiler switch has been removed, as it had + been superceded by -ftransition=templates, which more + accurately reports on which templates have been instantiated. + + The -ftransition=dip25 and -ftransition=dip1000 compiler + switches have been renamed to -fpreview=dip25 and + -fpreview=dip1000. + + [92]Fortran + + * WG5/N1942, "TS 29113 Further Interoperability of Fortran with C", + is now fully supported. In addition to implementing previously + missing functionality, such as support for character arguments of + length greater than one in functions marked bind(c) and gaps in the + handling for assumed-rank arrays, numerous other bugs have been + fixed, and an extensive set of new conformance test cases has been + added. + * GCC 12 now uses OPERATION as the name of the function to the + CO_REDUCE intrinsic for the pairwise reduction, thus conforming to + the Fortran 2018 standard. Previous versions used OPERATOR which + conforms to TS 18508. + * On POWER systems which support it, the -mabi=ieeelongdouble option + now selects the IEEE 128-bit floating point format for + REAL(KIND=16). R16_IBM and R16_IEEE have been added to the + -fconvert option, the CONVERT specifier of the OPEN statement and + the GFORTRAN_CONVERT_UNIT environment variable. + + [93]Go + + * GCC 12 provides a complete implementation of the Go 1.18 user + packages. + * Although Go 1.18 includes support for generic programming, that + support is not yet available in GCC. + +[94]libgccjit + + * The libgccjit API gained 30 new entry points: + + 17 new "reflection" entry points for querying functions and + types ([95]LIBGCCJIT_ABI_16) + + [96]gcc_jit_lvalue_set_tls_model for supporting thread-local + variables ([97]LIBGCCJIT_ABI_17) + + [98]gcc_jit_lvalue_set_link_section for setting the link + section of global variables, analogous to + [99]__attribute__((section(".section"))) + ([100]LIBGCCJIT_ABI_18) + + 4 new entry points for initializing global variables and + creating constructors for rvalues ([101]LIBGCCJIT_ABI_19) + + Support for sized integer types, including 128-bit integers + and helper functions for such types ([102]LIBGCCJIT_ABI_20) + + [103]gcc_jit_context_new_bitcast for reinterpreting the bits + of an rvalue as a different type ([104]LIBGCCJIT_ABI_21) + + [105]gcc_jit_lvalue_set_register_name for setting a specific + register for a variable ([106]LIBGCCJIT_ABI_22) + + [107]gcc_jit_context_set_bool_print_errors_to_stderr + ([108]LIBGCCJIT_ABI_23) + + 2 new entry points for setting the alignment of a variable + ([109]LIBGCCJIT_ABI_24) + * libgccjit has gained support for the use of various atomic builtins + ([110]PR96066, [111]PR96067) + * [112]gcc_jit_context_new_cast is now able to handle truncation and + extension between different integer types ([113]PR95498) + +[114]New Targets and Target Specific Improvements + + [115]AArch64 & arm + + * Newer revisions of the Arm Architecture are supported as arguments + to the -march option: armv8.7-a, armv8.8-a, armv9-a. + * The Arm Cortex-A510 CPU is now supported through the cortex-a510 + argument to the -mcpu and -mtune options. + * GCC can now auto-vectorize operations performing sign-differing + dot-product operations, taking advantage of instructions in the + Advanced SIMD (AArch64/AArch32) and SVE (AArch64) instruction sets. + + [116]AArch64 + + * A number of new CPUs are supported through the -mcpu and -mtune + options (GCC identifiers in parentheses). + + Ampere-1 (ampere1). + + Arm Cortex-A710 (cortex-a710). + + Arm Cortex-X2 (cortex-x2). + * The 64-byte atomic load/store intrinsics to accelerator memory from + the [117]2020 Arm Architecture extensions are supported through the + +ls64 option extension. + * Initial code generation support is supported for hardware + instructions used to accelerate the memcpy,memmove and memset + standard functions. These instructions can be generated when + compiling with the +mopsoption extension. + * The ACLE Advanced SIMD intrinsics accessible through the arm_neon.h + header have been significantly reimplemented and generate + higher-performing code than previous GCC versions. + * The option -mtune=neoverse-512tvb is added to tune for Arm Neoverse + cores that have a total vector bandwidth of 512 bits. Please refer + to the documentation for more details. + + [118]AMD Radeon (GCN) + + * Debug experience with ROCGDB has been improved. + * Support for the type __int128_t/integer(kind=16) was added. + * For offloading, the limitation of using only one wavefront per + compute unit (CU) has been lifted. Up to 40 workgroups per CU and + 16 wavefronts per workgroup are supported (up to a limit of 40 + wavefronts in total, per CU). Additionally, the number of used + wavefronts and workgroups was tuned for performance. + + [119]arm + + * Support is added for accessing the stack canary value via the TLS + register through the -fstack-protector-guard=tls and + -mstack-protector-guard-offset= options. This intended for use in + Linux kernel development. Please refer to the documentation for + more details. + + [120]BPF + + * Support for CO-RE (compile-once, run-everywhere) has been added to + the BPF back end. CO-RE allows to compile portable BPF programs + that are able to run among different versions of the Linux kernel. + + [121]IA-32/x86-64 + + * New ISA extension support for Intel AVX512-FP16 was added. + AVX512-FP16 intrinsics are available via the -mavx512fp16 compiler + switch. + * For both C and C++ the _Float16 type is supported on x86 systems + with SSE2 enabled. Without {-mavx512fp16}, all operations will be + emulated in software and float instructions. + * Mitigation against straight line speculation (SLS) for function + return and indirect jump is supported via + -mharden-sls=[none|all|return|indirect-jmp]. + * Add CS prefix to call and jmp to indirect thunk with branch target + in r8-r15 registers via -mindirect-branch-cs-prefix. + * Always use global offset table (GOT) to access external data and + function symbols when the new -mno-direct-extern-access + command-line option is specified. + + [122]LoongArch + + * Support for the LoongArch architecture instruction set has been + added. + * The Loongson CPU codename LA464 and LoongArch 64-bit generic CPU + codename loongarch64 are supported through the -march= and -mtune= + options (GCC identifiers in parentheses). + + Loongson LA464 core (la464). + + LoongArch 64-bit generic core (loongarch64). + + [123]MIPS + + * The ABI passing arguments containing zero-width fields (for + example, C/C++ zero-width bit-fields, GNU C/C++ zero-length arrays, + and GNU C empty structs) has changed. Now a zero-width field will + not prevent an aligned 64-bit floating-point field next to it from + being passed through FPR. This is compatible with LLVM, but + incompatible with previous GCC releases. GCC 12 on MIPS will report + such incompatibilities as an inform unless -Wno-psabi is used. + * The ABI returning values containing C++17 empty bases has changed. + Now an empty base will not prevent an aggregate containing only one + or two floating-point fields from being returned through FPR. This + is compatible with GCC 6 and earlier, but incompatible with GCC 7 + through 11. GCC 12 on MIPS will report such incompatibilities as an + inform unless -Wno-psabi is used. + + [124]NVPTX + + * The -march flag has been added. The -misa flag is now considered an + alias of the -march flag. + * Support for PTX ISA target architectures sm_53, sm_70, sm_75 and + sm_80 has been added. These can be specified using the -march flag. + * The default PTX ISA target architecture has been set back to sm_30, + to fix support for sm_30 boards. + * The -march-map flag has been added. The -march-map value will be + mapped to an valid -march flag value. For instance, + -march-map=sm_50 maps to -march=sm_35. This can be used to specify + that generated code is to be executed on a board with at least some + specific compute capability, without having to know the valid + values for the -march flag. + * The -mptx flag has been added to specify the PTX ISA version for + the generated code; permitted values are 3.1 (matches previous GCC + versions), 6.0, 6.3, and 7.0. If not specified, the used version is + the minimal version required for -march but at least 6.0. + * An mptx-3.1 multilib was added. This allows using older drivers + which do not support PTX ISA version 6.0. + * The new __PTX_SM__ predefined macro allows code to check the PTX + ISA target architecture being targeted by the compiler. + * The new __PTX_ISA_VERSION_MAJOR__ and __PTX_ISA_VERSION_MINOR__ + predefined macros allows code to check the PTX ISA version being + targeted by the compiler. + + [125]PowerPC / PowerPC64 / RS6000 + + * The internal implementation of Power's target-specific built-in + functions has been rewritten to be easier and less error-prone to + maintain. Every attempt has been made to ensure that the new + behavior matches the old behavior, but inevitably some bugs can be + expected. Please [126]report any problems. + * The built-in functions __builtin_get_texasr, __builtin_get_texasru, + __builtin_get_tfhar, __builtin_get_tfiar, __builtin_set_texasr, + __builtin_set_texasru, __builtin_set_tfhar, and __builtin_set_tfiar + now behave as documented in all supported configurations. On prior + releases, the arguments and return values of these functions were + treated as unsigned long long instead of as unsigned long, when the + options -m32 -mpowerpc64 were in effect. + * The overloaded built-in functions vec_cntlz_lsbb and vec_cnttz_lsbb + now behave as documented. On prior releases, these built-in + functions had incorrect semantics on little-endian targets. + + [127]PRU + + * The [128]__regio_symbol variable qualifier has been added. It + allows easier access in C programs to the __R30 and __R31 CPU I/O + registers. + + [129]RISC-V + + * The default ISA spec version was bumped to 20191213; see [130]this + announcement for details. + * New ISA extension support for zba, zbb, zbc, zbs was added. + * New ISA extension support for vector and scalar crypto was added, + only support architecture testing macro and -march= parsing. + * The option -mtune=thead-c906 is added to tune for T-HEAD c906 + cores. + * libstdc++ no longer attempts to detect built-in atomics. + Distributions that have out-of-tree workarounds for -latomic should + check their ABIs again. + +[131]Operating Systems + +[132]Improvements to Static Analyzer + + * The analyzer has gained a + [133]-Wanalyzer-use-of-uninitialized-value warning, similar to + [134]-Wuninitialized and [135]-Wmaybe-uninitialized, but based on + an interprocedural path-sensitive analysis ([136]PR95006). + Such warnings are not disabled by the new + [137]-ftrivial-auto-var-init (see below), as the latter is + considered a mitigation option. + * [138]-Wanalyzer-write-to-const and + [139]-Wanalyzer-write-to-string-literal will now check for + [140]__attribute__ ((access, ....)) on calls to externally-defined + functions, and complain about read-only regions pointed to by + arguments marked with a write_only or read_write attribute + ([141]PR104793). + * The analyzer's "taint" mode, activated by + [142]-fanalyzer-checker=taint (in addition to [143]-fanalyzer), has + gained four new taint-based warnings: + + [144]-Wanalyzer-tainted-allocation-size for e.g. + attacker-controlled malloc and alloca, + + [145]-Wanalyzer-tainted-divisor for detecting where an + attacker can inject a divide-by-zero, + + [146]-Wanalyzer-tainted-offset for attacker-controlled pointer + offsets, + + [147]-Wanalyzer-tainted-size for attacker-controlled values + being used as a size parameter to calls to memset or to + functions marked with [148]__attribute__ ((access, ....)). + The existing [149]-Wanalyzer-tainted-array-index has been reworded + to talk about "attacker-controlled" rather than "tainted" values, + for consistency with the new warnings. + A new [150]__attribute__ ((tainted_args)) has been added to the C + and C++ front ends, usable on functions, and on function pointer + callback fields in structs. The analyzer's taint mode will treat + all parameters and buffers pointed to by parameters of such + functions as being attacker-controlled, such as for annotating + system calls in an operating system kernel as being an "attack + surface". + * The analyzer now respects [151]__attribute__((const)): it will + treat such functions as returning the same value when given the + same inputs ([152]PR104434), and as having no side effects + ([153]PR104576). + * The analyzer is now able to split its analysis into multiple + execution paths in places where there isn't a split in the control + flow graph. For example, it now handles realloc calls by splitting + the execution path into three possible outcomes for the call: + + failure, returning NULL + + success, growing the buffer in-place without moving it + + success, allocating a new buffer, copying the content of the + old buffer to it, and freeing the old buffer + * The analyzer's interprocedural path exploration logic is now able + to track calls through function pointers. + * The analyzer now makes the assumption that if we know PTR is + non-NULL, then (PTR + OFFSET) is also non-NULL. This isn't strictly + true, but eliminates false positives in practice ([154]PR101962). + * The analyzer has gained some initial support for inline assembler + code. This is extremely limited, and is purely to help suppress + false positives when analyzing the Linux kernel, which makes heavy + use of inline assembler ([155]PR101570). + * The way the analyzer tracks the state of memory along an execution + path has been improved in various ways for GCC 12: + + An optimization for representing bulk updates to memory (e.g. + zero fills) has been removed as it never worked well. In GCC + 12 it has been replaced with a simpler and more accurate + approach, eliminating many false positives ([156]PR95006). + + Various optimizations have been added, speeding up the + analysis on a particularly problematic source file from 4 + minutes down to 17 seconds ([157]PR104943, [158]PR104954, and + [159]PR104955). + + The analyzer now tracks the sizes of dynamically-allocated + regions, both on the heap (via malloc etc) and stack (via + alloca), though none of the analyzer warnings make use of this + yet in GCC 12. + * The analyzer's handling of switch statements has been rewritten, + fixing various bugs. + +Other significant improvements + + [160]Eliminating uninitialized variables + + * GCC can now [161]initialize all stack variables implicitly, + including padding. This is intended to eliminate all classes of + uninitialized stack variable flaws. Lack of explicit initialization + will still warn when [162]-Wuninitialized is active. For best + debugging, use of the new command-line option + [163]-ftrivial-auto-var-init=pattern can be used to fill variables + with a repeated 0xFE pattern, which tends to illuminate many bugs + (e.g. pointers receive invalid addresses, sizes and indices are + very large). For best production results, the new command-line + option [164]-ftrivial-auto-var-init=zero can be used to fill + variables with 0x00, which tends to provide a safer state for bugs + (e.g. pointers are NULL, strings are NUL filled, and sizes and + indices are 0). + + [165]Debugging formats + + * GCC can now generate debugging information in [166]CTF, a + lightweight debugging format that provides information about C + types and the association between functions and data symbols and + types. This format is designed to be embedded in ELF files and to + be very compact and simple. A new command-line option -gctf enables + the generation of CTF. + * GCC can now generate debugging information in BTF. This is a + debugging format mainly used in BPF programs and the Linux kernel. + The compiler can generate BTF for any target, when enabled with the + command-line option -gbtf + +[167]GCC 12.1 + + This is the [168]list of problem reports (PRs) from GCC's bug tracking + system that are known to be fixed in the 12.1 release. This list might + not be complete (that is, it is possible that some PRs that have been + fixed are not listed here). + +[169]GCC 12.2 + + This is the [170]list of problem reports (PRs) from GCC's bug tracking + system that are known to be fixed in the 12.2 release. This list might + not be complete (that is, it is possible that some PRs that have been + fixed are not listed here). + + Target Specific Changes + + LoongArch + + * The default setting of -m[check|no-check]-zero-division is changed + for optimized code. Now -mno-check-zero-division is the default for + all optimization levels but -O0 and -Og. The old behavior can be + obtained by explicitly passing -mcheck-zero-division to GCC. + +[171]GCC 12.3 + + Target Specific Changes + + x86-64 + + * GCC now supports AMD CPUs based on the znver4 core via + -march=znver4. The switch makes GCC consider using 512-bit vectors + when auto-vectorizing. + + This is the [172]list of problem reports (PRs) from GCC's bug tracking + system that are known to be fixed in the 12.3 release. This list might + not be complete (that is, it is possible that some PRs that have been + fixed are not listed here). + +[173]GCC 12.4 + + This is the [174]list of problem reports (PRs) from GCC's bug tracking + system that are known to be fixed in the 12.4 release. This list might + not be complete (that is, it is possible that some PRs that have been + fixed are not listed here). + + + For questions related to the use of GCC, please consult these web + pages and the [175]GCC manuals. If that fails, the + [176]gcc-help@gcc.gnu.org mailing list might help. Comments on these + web pages and the development of GCC are welcome on our developer + list at [177]gcc@gcc.gnu.org. All of [178]our lists have public + archives. + + Copyright (C) [179]Free Software Foundation, Inc. Verbatim copying and + distribution of this entire article is permitted in any medium, + provided this notice is preserved. + + These pages are [180]maintained by the GCC team. Last modified + 2025-01-31. + +References + + 1. https://gcc.gnu.org/gcc-12/porting_to.html + 2. https://gcc.gnu.org/onlinedocs/index.html#current + 3. https://gcc.gnu.org/PR102024 + 4. https://gcc.gnu.org/PR42217 + 5. https://gcc.gnu.org/gcc-12/changes.html#mips_zero_width_fields + 6. https://gcc.gnu.org/install/specific.html + 7. https://gcc.gnu.org/gcc-12/changes.html#general + 8. https://clang.llvm.org/docs/ShadowCallStack.html + 9. https://gcc.gnu.org/onlinedocs/gcc-12.1.0/gcc/Instrumentation-Options.html#index-fsanitize_003dshadow-call-stack + 10. https://gcc.gnu.org/gcc-12/changes.html#languages + 11. https://gcc.gnu.org/onlinedocs/gcc-12.1.0/libgomp/OpenMP-Implementation-Status.html + 12. https://www.openacc.org/ + 13. https://gcc.gnu.org/wiki/OpenACC/Implementation Status#status-12 + 14. https://gcc.gnu.org/onlinedocs/gcc-12.1.0/libgomp/Enabling-OpenACC.html + 15. https://gcc.gnu.org/gcc-12/changes.html#amdgcn + 16. https://gcc.gnu.org/gcc-12/changes.html#nvptx + 17. https://gcc.gnu.org/onlinedocs/gcc-12.1.0/gcc/Optimize-Options.html#index-param + 18. https://gcc.gnu.org/onlinedocs/gcc-12.1.0/gcc/Warning-Options.html#index-Wopenacc-parallelism + 19. https://gcc.gnu.org/onlinedocs/gcc-12.1.0/gcc/C-Dialect-Options.html#index-foffload-options + 20. https://gcc.gnu.org/onlinedocs/gcc-12.1.0/gcc/C-Dialect-Options.html#index-foffload + 21. https://gcc.gnu.org/gcc-12/changes.html#ada + 22. https://gcc.gnu.org/onlinedocs/gcc-12.1.0/gnat_rm/Security-Hardening-Features.html#Security-Hardening-Features + 23. https://gcc.gnu.org/gcc-12/changes.html#c-family + 24. https://gcc.gnu.org/onlinedocs/gcc-12.1.0/gcc/Warning-Options.html#index-Wbidi-chars + 25. https://gcc.gnu.org/PR103026 + 26. https://gcc.gnu.org/onlinedocs/gcc-12.1.0/gcc/Warning-Options.html#index-Warray-compare + 27. https://gcc.gnu.org/PR97573 + 28. https://gcc.gnu.org/onlinedocs/gcc-12.1.0/gcc/Warning-Options.html#index-Wattributes + 29. https://gcc.gnu.org/PR101940 + 30. https://gcc.gnu.org/gcc-12/changes.html#c + 31. https://gcc.gnu.org/onlinedocs/gcc-12.1.0/gcc/Warning-Options.html#index-Wformat + 32. https://gcc.gnu.org/gcc-12/changes.html#cxx + 33. https://wg21.link/p1938 + 34. https://gcc.gnu.org/PR100974 + 35. https://wg21.link/p0849 + 36. https://gcc.gnu.org/PR103049 + 37. https://wg21.link/p2242 + 38. https://gcc.gnu.org/PR102612 + 39. https://wg21.link/p2334 + 40. https://gcc.gnu.org/PR102616 + 41. https://wg21.link/p2360 + 42. https://gcc.gnu.org/PR102617 + 43. https://wg21.link/p2128 + 44. https://wg21.link/cwg2397 + 45. https://gcc.gnu.org/PR100975 + 46. https://wg21.link/cwg960 + 47. https://wg21.link/cwg1227 + 48. https://wg21.link/cwg1315 + 49. https://wg21.link/cwg2082 + 50. https://wg21.link/cwg2351 + 51. https://wg21.link/cwg2374 + 52. https://wg21.link/cwg2397 + 53. https://wg21.link/cwg2446 + 54. https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=87c2080b + 55. https://gcc.gnu.org/PR79501 + 56. https://gcc.gnu.org/onlinedocs/gcc-12.1.0/gcc/Warning-Options.html#index-Wuninitialized + 57. https://gcc.gnu.org/PR19808 + 58. https://gcc.gnu.org/onlinedocs/gcc-12.1.0/gcc/Warning-Options.html#index-Wint-in-bool-context + 59. https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=3a2b12bc + 60. https://gcc.gnu.org/PR99032 + 61. https://gcc.gnu.org/onlinedocs/gcc-12.1.0/gcc/Warning-Options.html#index-Wmissing-requires + 62. https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=e18e56c7 + 63. https://gcc.gnu.org/PR100995 + 64. https://gcc.gnu.org/onlinedocs/gcc-12.1.0/gcc/Warning-Options.html#index-Waddress + 65. https://gcc.gnu.org/PR102103 + 66. https://gcc.gnu.org/PR99701 + 67. https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=3ead06c1 + 68. https://gcc.gnu.org/PR102753 + 69. https://wg21.link/p0466 + 70. https://gcc.gnu.org/PR101539 + 71. https://gcc.gnu.org/PR100828 + 72. https://gcc.gnu.org/PR101786 + 73. https://gcc.gnu.org/onlinedocs/gcc-12.1.0/gcc/Warning-Options.html#index-Winterference-size + 74. https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=76b75018 + 75. https://gcc.gnu.org/PR101344 + 76. https://gcc.gnu.org/PR101883 + 77. https://gcc.gnu.org/PR89062 + 78. https://gcc.gnu.org/PR101233 + 79. https://gcc.gnu.org/PR88252 + 80. https://gcc.gnu.org/PR86439 + 81. https://gcc.gnu.org/PR98832 + 82. https://gcc.gnu.org/PR102933 + 83. https://gcc.gnu.org/PR51577 + 84. https://gcc.gnu.org/PR98486 + 85. https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=1595fe44 + 86. https://gcc.gnu.org/gcc-12/changes.html#libstdcxx + 87. https://gcc.gnu.org/gcc-12/changes.html#d + 88. https://dlang.org/changelog/2.100.1.html + 89. https://gcc.gnu.org/PR101127 + 90. https://gcc.gnu.org/PR106563 + 91. https://dlang.org/spec/importc.html + 92. https://gcc.gnu.org/gcc-12/changes.html#fortran + 93. https://gcc.gnu.org/gcc-12/changes.html#go + 94. https://gcc.gnu.org/gcc-12/changes.html#jit + 95. https://gcc.gnu.org/onlinedocs/gcc-12.1.0/jit/topics/compatibility.html#libgccjit-abi-16 + 96. https://gcc.gnu.org/onlinedocs/gcc-12.1.0/jit/topics/expressions.html#c.gcc_jit_lvalue_set_tls_model + 97. https://gcc.gnu.org/onlinedocs/gcc-12.1.0/jit/topics/compatibility.html#libgccjit-abi-17 + 98. https://gcc.gnu.org/onlinedocs/gcc-12.1.0/jit/topics/expressions.html#c.gcc_jit_lvalue_set_link_section + 99. https://gcc.gnu.org/onlinedocs/gcc-12.1.0/gcc/Common-Variable-Attributes.html#index-section-variable-attribute + 100. https://gcc.gnu.org/onlinedocs/gcc-12.1.0/jit/topics/compatibility.html#libgccjit-abi-18 + 101. https://gcc.gnu.org/onlinedocs/gcc-12.1.0/jit/topics/compatibility.html#libgccjit-abi-19 + 102. https://gcc.gnu.org/onlinedocs/gcc-12.1.0/jit/topics/compatibility.html#libgccjit-abi-20 + 103. https://gcc.gnu.org/onlinedocs/gcc-12.1.0/jit/topics/expressions.html#c.gcc_jit_context_new_bitcast + 104. https://gcc.gnu.org/onlinedocs/gcc-12.1.0/jit/topics/compatibility.html#libgccjit-abi-21 + 105. https://gcc.gnu.org/onlinedocs/gcc-12.1.0/jit/topics/expressions.html#c.gcc_jit_lvalue_set_register_name + 106. https://gcc.gnu.org/onlinedocs/gcc-12.1.0/jit/topics/compatibility.html#libgccjit-abi-22 + 107. https://gcc.gnu.org/onlinedocs/gcc-12.1.0/jit/topics/contexts.html#c.gcc_jit_context_set_bool_print_errors_to_stderr + 108. https://gcc.gnu.org/onlinedocs/gcc-12.1.0/jit/topics/compatibility.html#libgccjit-abi-23 + 109. https://gcc.gnu.org/onlinedocs/gcc-12.1.0/jit/topics/compatibility.html#libgccjit-abi-24 + 110. https://gcc.gnu.org/PR96066 + 111. https://gcc.gnu.org/PR96067 + 112. https://gcc.gnu.org/onlinedocs/gcc-12.1.0/jit/topics/expressions.html#c.gcc_jit_context_new_cast + 113. https://gcc.gnu.org/PR95498 + 114. https://gcc.gnu.org/gcc-12/changes.html#targets + 115. https://gcc.gnu.org/gcc-12/changes.html#arm-targets + 116. https://gcc.gnu.org/gcc-12/changes.html#aarch64 + 117. https://community.arm.com/arm-community-blogs/b/architectures-and-processors-blog/posts/arm-a-profile-architecture-developments-2020 + 118. https://gcc.gnu.org/gcc-12/changes.html#amdgcn + 119. https://gcc.gnu.org/gcc-12/changes.html#arm + 120. https://gcc.gnu.org/gcc-12/changes.html#bpf + 121. https://gcc.gnu.org/gcc-12/changes.html#x86 + 122. https://gcc.gnu.org/gcc-12/changes.html#loongarch + 123. https://gcc.gnu.org/gcc-12/changes.html#mips + 124. https://gcc.gnu.org/gcc-12/changes.html#nvptx + 125. https://gcc.gnu.org/gcc-12/changes.html#powerpc + 126. https://gcc.gnu.org/bugs/ + 127. https://gcc.gnu.org/gcc-12/changes.html#pru + 128. https://gcc.gnu.org/onlinedocs/gcc-12.1.0/gcc/Named-Address-Spaces.html#PRU-Named-Address-Spaces + 129. https://gcc.gnu.org/gcc-12/changes.html#riscv + 130. https://groups.google.com/a/groups.riscv.org/g/sw-dev/c/aE1ZeHHCYf4 + 131. https://gcc.gnu.org/gcc-12/changes.html#os + 132. https://gcc.gnu.org/gcc-12/changes.html#analyzer + 133. https://gcc.gnu.org/onlinedocs/gcc-12.1.0/gcc/Static-Analyzer-Options.html#index-Wanalyzer-use-of-uninitialized-value + 134. https://gcc.gnu.org/onlinedocs/gcc-12.1.0/gcc/Warning-Options.html#index-Wuninitialized + 135. https://gcc.gnu.org/onlinedocs/gcc-12.1.0/gcc/Warning-Options.html#index-Wmaybe-uninitialized + 136. https://gcc.gnu.org/PR95006 + 137. https://gcc.gnu.org/onlinedocs/gcc-12.1.0/gcc/Optimize-Options.html#index-ftrivial-auto-var-init + 138. https://gcc.gnu.org/onlinedocs/gcc-12.1.0/gcc/Static-Analyzer-Options.html#index-Wanalyzer-write-to-const + 139. https://gcc.gnu.org/onlinedocs/gcc-12.1.0/gcc/Static-Analyzer-Options.html#index-Wanalyzer-write-to-string-literal + 140. https://gcc.gnu.org/onlinedocs/gcc-12.1.0/gcc/Common-Function-Attributes.html + 141. https://gcc.gnu.org/PR104793 + 142. https://gcc.gnu.org/onlinedocs/gcc-12.1.0/gcc/Static-Analyzer-Options.html#index-fanalyzer-checker + 143. https://gcc.gnu.org/onlinedocs/gcc-12.1.0/gcc/Static-Analyzer-Options.html#index-fanalyzer + 144. https://gcc.gnu.org/onlinedocs/gcc-12.1.0/gcc/Static-Analyzer-Options.html#index-Wanalyzer-tainted-allocation-size + 145. https://gcc.gnu.org/onlinedocs/gcc-12.1.0/gcc/Static-Analyzer-Options.html#index-Wanalyzer-tainted-divisor + 146. https://gcc.gnu.org/onlinedocs/gcc-12.1.0/gcc/Static-Analyzer-Options.html#index-Wanalyzer-tainted-offset + 147. https://gcc.gnu.org/onlinedocs/gcc-12.1.0/gcc/Static-Analyzer-Options.html#index-Wanalyzer-tainted-size + 148. https://gcc.gnu.org/onlinedocs/gcc-12.1.0/gcc/Common-Function-Attributes.html + 149. https://gcc.gnu.org/onlinedocs/gcc-12.1.0/gcc/Static-Analyzer-Options.html#index-Wanalyzer-tainted-array-index + 150. https://gcc.gnu.org/onlinedocs/gcc-12.1.0/gcc/Common-Function-Attributes.html#index-tainted_005fargs-function-attribute + 151. https://gcc.gnu.org/onlinedocs/gcc-12.1.0/gcc/Common-Function-Attributes.html#index-const-function-attribute + 152. https://gcc.gnu.org/PR104434 + 153. https://gcc.gnu.org/PR104576 + 154. https://gcc.gnu.org/PR101962 + 155. https://gcc.gnu.org/PR101570 + 156. https://gcc.gnu.org/PR95006 + 157. https://gcc.gnu.org/PR104943 + 158. https://gcc.gnu.org/PR104954 + 159. https://gcc.gnu.org/PR104955 + 160. https://gcc.gnu.org/gcc-12/changes.html#uninitialized + 161. https://gcc.gnu.org/onlinedocs/gcc-12.1.0/gcc/Optimize-Options.html#index-ftrivial-auto-var-init + 162. https://gcc.gnu.org/onlinedocs/gcc-12.1.0/gcc/Warning-Options.html#index-Wuninitialized + 163. https://gcc.gnu.org/onlinedocs/gcc-12.1.0/gcc/Optimize-Options.html#index-ftrivial-auto-var-init + 164. https://gcc.gnu.org/onlinedocs/gcc-12.1.0/gcc/Optimize-Options.html#index-ftrivial-auto-var-init + 165. https://gcc.gnu.org/gcc-12/changes.html#debug + 166. https://ctfstd.org/ + 167. https://gcc.gnu.org/gcc-12/changes.html#12.1 + 168. https://gcc.gnu.org/bugzilla/buglist.cgi?bug_status=RESOLVED&resolution=FIXED&target_milestone=12.0 + 169. https://gcc.gnu.org/gcc-12/changes.html#12.2 + 170. https://gcc.gnu.org/bugzilla/buglist.cgi?bug_status=RESOLVED&resolution=FIXED&target_milestone=12.2 + 171. https://gcc.gnu.org/gcc-12/changes.html#12.3 + 172. https://gcc.gnu.org/bugzilla/buglist.cgi?bug_status=RESOLVED&resolution=FIXED&target_milestone=12.3 + 173. https://gcc.gnu.org/gcc-12/changes.html#12.4 + 174. https://gcc.gnu.org/bugzilla/buglist.cgi?bug_status=RESOLVED&resolution=FIXED&target_milestone=12.4 + 175. https://gcc.gnu.org/onlinedocs/ + 176. mailto:gcc-help@gcc.gnu.org + 177. mailto:gcc@gcc.gnu.org + 178. https://gcc.gnu.org/lists.html + 179. https://www.fsf.org/ + 180. https://gcc.gnu.org/about.html +====================================================================== +http://gcc.gnu.org/gcc-11/index.html + GCC 11 Release Series + + July 19, 2024 + + The GCC developers are pleased to announce the release of GCC 11.5. + + This release is a bug-fix release, containing fixes for regressions in + GCC 11.4 relative to previous releases of GCC. + +Release History + + GCC 11.5 + July 19, 2024 ([1]changes, [2]documentation) + + GCC 11.4 + May 29, 2023 ([3]changes, [4]documentation) + + GCC 11.3 + April 21, 2022 ([5]changes, [6]documentation) + + GCC 11.2 + July 28, 2021 ([7]changes, [8]documentation) + + GCC 11.1 + April 27, 2021 ([9]changes, [10]documentation) + +References and Acknowledgements + + GCC used to stand for the GNU C Compiler, but since the compiler + supports several other languages aside from C, it now stands for the + GNU Compiler Collection. + + The GCC developers would like to thank the numerous people that have + contributed new features, improvements, bug fixes, and other changes as + well as test results to GCC. This [11]amazing group of volunteers is + what makes GCC successful. + + For additional information about GCC please refer to the [12]GCC + project web site or contact the [13]GCC development mailing list. + + To obtain GCC please use [14]our mirror sites or [15]our version + control system. + + + For questions related to the use of GCC, please consult these web + pages and the [16]GCC manuals. If that fails, the + [17]gcc-help@gcc.gnu.org mailing list might help. Comments on these + web pages and the development of GCC are welcome on our developer + list at [18]gcc@gcc.gnu.org. All of [19]our lists have public + archives. + + Copyright (C) [20]Free Software Foundation, Inc. Verbatim copying and + distribution of this entire article is permitted in any medium, + provided this notice is preserved. + + These pages are [21]maintained by the GCC team. Last modified + 2024-07-19. + +References + + 1. https://gcc.gnu.org/gcc-11/changes.html + 2. https://gcc.gnu.org/onlinedocs/11.5.0/ + 3. https://gcc.gnu.org/gcc-11/changes.html + 4. https://gcc.gnu.org/onlinedocs/11.4.0/ + 5. https://gcc.gnu.org/gcc-11/changes.html + 6. https://gcc.gnu.org/onlinedocs/11.3.0/ + 7. https://gcc.gnu.org/gcc-11/changes.html + 8. https://gcc.gnu.org/onlinedocs/11.2.0/ + 9. https://gcc.gnu.org/gcc-11/changes.html + 10. https://gcc.gnu.org/onlinedocs/11.1.0/ + 11. https://gcc.gnu.org/onlinedocs/gcc-11.1.0/gcc/Contributors.html + 12. https://gcc.gnu.org/index.html + 13. mailto:gcc@gcc.gnu.org + 14. https://gcc.gnu.org/mirrors.html + 15. https://gcc.gnu.org/git.html + 16. https://gcc.gnu.org/onlinedocs/ + 17. mailto:gcc-help@gcc.gnu.org + 18. mailto:gcc@gcc.gnu.org + 19. https://gcc.gnu.org/lists.html + 20. https://www.fsf.org/ + 21. https://gcc.gnu.org/about.html +====================================================================== +http://gcc.gnu.org/gcc-11/changes.html + GCC 11 Release Series + Changes, New Features, and Fixes + + This page is a "brief" summary of some of the huge number of + improvements in GCC 11. You may also want to check out our [1]Porting + to GCC 11 page and the [2]full GCC documentation. + +Caveats + + * The default mode for C++ is now -std=gnu++17 instead of + -std=gnu++14. Note that [3]C++17 changes to template template + parameter matching can be disabled independently of other features + with -fno-new-ttp-matching. + * When building GCC itself, the host compiler must now support C++11, + rather than C++98. In particular bootstrapping GCC 11 using an + older version of GCC requires a binary of GCC 4.8 or later, rather + than of GCC 3.4 or later as was the case for bootstrapping GCC 10. + * Naming and location of auxiliary and dump output files changed. If + you compile multiple input files in a single command, if you enable + Link Time Optimization, or if you use -dumpbase, -dumpdir, + -save-temps=*, and you expect any file other than the primary + output file(s) to be created as a side effect, watch out for + improvements and a few surprises. See [4]the patch, particularly + its textual description, for more details about the changes. + * -gsplit-dwarf no longer enables debug info generation on its own + but requires a separate -g for this. + * The libstdc++ configure option --enable-cheaders=c_std is + deprecated and will be removed in a future release. It should be + possible to use --enable-cheaders=c_global (the default) with no + change in behaviour. + * The front end for compiling BRIG format of Heterogeneous System + Architecture Intermediate Language (HSAIL) has been deprecated and + will likely be removed in a future release. + * Some short options of the gcov tool have been renamed: -i to -j and + -j to -H. + +[5]General Improvements + + * [6]ThreadSanitizer improvements to support alternative runtimes and + environments. The [7]Linux Kernel Concurrency Sanitizer (KCSAN) is + now supported. + + Add --param tsan-distinguish-volatile to optionally emit + instrumentation distinguishing volatile accesses. + + Add --param tsan-instrument-func-entry-exit to optionally + control if function entries and exits should be instrumented. + * In previous releases of GCC, the "column numbers" emitted in + diagnostics were actually a count of bytes from the start of the + source line. This could be problematic, both because of: + + multibyte characters (requiring more than one byte to encode), + and + + multicolumn characters (requiring more than one column to + display in a monospace font) + For example, the character Ï€ ("GREEK SMALL LETTER PI (U+03C0)") + occupies one column, and its UTF-8 encoding requires two bytes; the + character 🙂 ("SLIGHTLY SMILING FACE (U+1F642)") occupies two + columns, and its UTF-8 encoding requires four bytes. + In GCC 11 the column numbers default to being column numbers, + respecting multi-column characters. The old behavior can be + restored using a new option [8]-fdiagnostics-column-unit=byte. + There is also a new option [9]-fdiagnostics-column-origin=, + allowing the pre-existing default of the left-hand column being + column 1 to be overridden if desired (e.g. for 0-based columns). + The output of [10]-fdiagnostics-format=json has been extended to + supply both byte counts and column numbers for all source + locations. + Additionally, in previous releases of GCC, tab characters in the + source would be emitted verbatim when quoting source code, but be + prefixed with whitespace or line number information, leading to + misalignments in the resulting output when compared with the actual + source. Tab characters are now printed as an appropriate number of + spaces, using the [11]-ftabstop option (which defaults to 8 spaces + per tab stop). + * Introduce [12]Hardware-assisted AddressSanitizer support. This + sanitizer currently only works for the AArch64 target. It helps + debug address problems similarly to [13]AddressSanitizer but is + based on partial hardware assistance and provides probabilistic + protection to use less RAM at run time. [14]Hardware-assisted + AddressSanitizer is not production-ready for user space, and is + provided mainly for use compiling the Linux Kernel. + To use this sanitizer the command line arguments are: + + -fsanitize=hwaddress to instrument userspace code. + + -fsanitize=kernel-hwaddress to instrument kernel code. + * For targets that produce DWARF debugging information GCC now + defaults to [15]DWARF version 5 (with the exception of VxWorks and + Darwin/Mac OS X which default to version 2 and AIX which defaults + to version 4). This can produce up to 25% more compact debug + information compared to earlier versions. + To take full advantage of DWARF version 5 GCC needs to be built + against binutils version 2.35.2 or higher. When GCC is built + against earlier versions of binutils GCC will still emit DWARF + version 5 for most debuginfo data, but will generate version 4 + debug line tables (even when explicitly given -gdwarf-5). + The following debug information consumers can process DWARF version + 5: + + GDB 8.0, or higher + + valgrind 3.17.0 + + elfutils 0.172, or higher (for use with systemtap, + dwarves/pahole, perf and libabigail) + + dwz 0.14 + Programs embedding libbacktrace are urged to upgrade to the version + shipping with GCC 11. + To make GCC 11 generate an older DWARF version use -g together with + -gdwarf-2, -gdwarf-3 or -gdwarf-4. + * Vectorizer improvements: + + The straight-line code vectorizer now considers the whole + function when vectorizing and can handle opportunities + crossing CFG merges and backedges. + * A series of conditional expressions that compare the same variable + can be transformed into a switch statement if each of them contains + a comparison expression. Example: + int IsHTMLWhitespace(int aChar) { + return aChar == 0x0009 || aChar == 0x000A || + aChar == 0x000C || aChar == 0x000D || + aChar == 0x0020; + } + + This statement can be transformed into a switch statement and then + expanded into a bit-test. + * New command-line options: + + [16]-fbit-tests, enabled by default, can be used to enable or + disable switch expansion using bit-tests. + * Inter-procedural optimization improvements: + + A new IPA-modref pass was added to track side effects of + function calls and improve precision of points-to-analysis. + The pass can be controlled by the [17]-fipa-modref option. + + The identical code folding pass (controlled by [18]-fipa-icf) + was significantly improved to increase the number of unified + functions and to reduce compile-time memory use. + + IPA-CP (Interprocedural constant propagation) heuristics + improved its estimation of potential usefulness of known loop + bounds and strides by taking the estimated frequency of these + loops into account. + * Link-time optimization improvements: + + The LTO bytecode format was optimized for smaller object files + and faster streaming. + + Memory allocation of the linking stage was improved to reduce + peak memory use. + * Profile driven optimization improvements: + + Using [19]-fprofile-values, was improved by tracking more + target values for e.g. indirect calls. + + GCOV data file format outputs smaller files by representing + zero counters in a more compact way. + +[20]New Languages and Language specific improvements + + * GCC 11 adds support for non-rectangular loop nests in OpenMP + constructs and the allocator routines of [21]OpenMP 5.0, including + initial allocate clause support in C/C++. The OMP_TARGET_OFFLOAD + environment variable and the active-levels routines are now + supported. For C/C++, the declare variant and map support has been + extended. For Fortran, OpenMP 4.5 is now fully supported and OpenMP + 5.0 support has been extended, including the following features + which were before only available in C and C++: order(concurrent), + device_type, memorder-clauses for flush, lastprivate with + conditional modifier, atomic construct and reduction clause + extensions of OpenMP 5.0, if clause with simd and cancel modifiers, + target data without map clause, and limited support for the + requires construct. + * Version 2.6 of the [22]OpenACC specification continues to be + maintained and improved in the C, C++ and Fortran compilers. See + the [23]implementation status section on the OpenACC wiki page and + the [24]run-time library documentation for further information. + + [25]C family + + * New attributes: + + The [26]no_stack_protector attribute has been added to mark + functions which should not be instrumented with stack + protection (-fstack-protector). + + The existing [27]malloc attribute has been extended so that it + can be used to identify allocator/deallocator API pairs. A + pair of new [28]-Wmismatched-dealloc and + [29]-Wmismatched-new-delete warnings will complain about + mismatched calls, and [30]-Wfree-nonheap-object about + deallocation calls with pointers not obtained from allocation + functions. Additionally, the static analyzer will use these + attributes when checking for leaks, double-frees, + use-after-frees, and similar issues. + * New warnings: + + [31]-Wmismatched-dealloc, enabled by default, warns about + calls to deallocation functions with pointers returned from + mismatched allocation functions. + + [32]-Wsizeof-array-div, enabled by -Wall, warns about + divisions of two sizeof operators when the first one is + applied to an array and the divisor does not equal the size of + the array element. + + [33]-Wstringop-overread, enabled by default, warns about calls + to string functions reading past the end of the arrays passed + to them as arguments. In prior GCC releases most instances of + his warning are diagnosed by -Wstringop-overflow. + + [34]-Wtsan, enabled by default, warns about unsupported + features in ThreadSanitizer (currently + std::atomic_thread_fence). + * Enhancements to existing warnings: + + [35]-Wfree-nonheap-object detects many more instances of calls + to deallocation functions with pointers not returned from a + dynamic memory allocation function. + + [36]-Wmaybe-uninitialized diagnoses passing pointers or + references to uninitialized memory to functions taking + const-qualified arguments. + + [37]-Wuninitialized detects reads from uninitialized + dynamically allocated memory. + * For ELF targets that support the GNU or FreeBSD OSABIs, the used + attribute will now save the symbol declaration it is applied to + from linker garbage collection. + To support this behavior, used symbols that have not been placed in + specific sections (e.g. with the section attribute, or the + -f{function,data}-sections options) will be placed in new, unique + sections. + This functionality requires Binutils version 2.36 or later. + + [38]C + + * Several new features from the upcoming C2X revision of the ISO C + standard are supported with -std=c2x and -std=gnu2x. Some of these + features are also supported as extensions when compiling for older + language versions. In addition to the features listed, some + features previously supported as extensions and now added to the C + standard are enabled by default in C2X mode and not diagnosed with + -std=c2x -Wpedantic. + + The BOOL_MAX and BOOL_WIDTH macros are provided in . + + As in C++, function definitions no longer need to give names + for unused function parameters. + + The expansions of the true and false macros in + have changed so that they have type bool. + + The [[nodiscard]] standard attribute is now supported. + + The __has_c_attribute preprocessor operator is now supported. + + Macros INFINITY, NAN, FLT_SNAN, DBL_SNAN, LDBL_SNAN, + DEC_INFINITY, DEC_NAN, and corresponding signaling NaN macros + for _FloatN, _FloatNx and _DecimalN types, are provided in + . There are also corresponding built-in functions + __builtin_nansdN for decimal signaling NaNs. + + Macros FLT_IS_IEC_60559, DBL_IS_IEC_60559 and + LDBL_IS_IEC_60559 are provided in . + + The feature test macro __STDC_WANT_IEC_60559_EXT__ is + supported by . + + Labels may appear before declarations and at the end of a + compound statement. + * New warnings: + + [39]-Warray-parameter, enabled by -Wall, warns about + redeclarations of functions with ordinary array arguments + declared using inconsistent forms. The warning also enables + the detection of the likely out of bounds accesses in calls to + such functions with smaller arrays. + + [40]-Wvla-parameter, enabled by -Wall, warns redeclarations of + functions with variable length array arguments declared using + inconsistent forms or with mismatched bounds. The warning also + enables the detection of the likely out of bounds accesses in + calls to such functions with smaller arrays. + + [41]C++ + + * The default mode has been changed to -std=gnu++17. + * Several C++20 features have been implemented: + + the compiler now supports consteval virtual functions + + P2082R1, Fixing CTAD for aggregates + + P0593R6, Pseudo-destructors end object lifetimes + + P1907R1, Inconsistencies with non-type template parameters + (complete implementation) + + P1975R0, Fixing the wording of parenthesized + aggregate-initialization + + P1009R2, Array size deduction in new-expressions + + P1099R5, using enum + + Modules, Requires -fmodules-ts and some aspects are + incomplete. Refer to [42]C++ 20 Status + * The C++ front end has experimental support for some of the upcoming + C++23 draft features with the -std=c++23, -std=gnu++23, -std=c++2b + or -std=gnu++2b flags, including + + P0330R8, Literal Suffix for (signed) size_t. + For a full list of new features, see [43]the C++ status page. + * Several C++ Defect Reports have been resolved, e.g.: + + DR 625, Use of auto as a template-argument + + DR 1512, Pointer comparison vs qualification conversions + + DR 1722, Should lambda to function pointer conversion function + be noexcept? + + DR 1914, Duplicate standard attributes + + DR 2032, Default template-arguments of variable templates + + DR 2289, Uniqueness of decomposition declaration names + + DR 2237, Can a template-id name a constructor? + + DR 2303, Partial ordering and recursive variadic inheritance + + DR 2369, Ordering between constraints and substitution + + DR 2450, braced-init-list as a template-argument + * G++ now performs better access checking in templates ([44]PR41437). + * reinterpret_casts in constexpr evaluation are now checked more + completely ([45]PR95307). + * The diagnostic for static_assert has been improved: the compiler + now shows the expression including its template arguments (if there + were any), and can point to the failing clause if the condition + comprised of any logical AND operators ([46]PR97518). + * New warnings: + + [47]-Wctad-maybe-unsupported, disabled by default, warns about + performing class template argument deduction on a type with no + deduction guides. + + [48]-Wrange-loop-construct, enabled by -Wall, warns when a + range-based for-loop is creating unnecessary and expensive + copies. + + [49]-Wdeprecated-enum-enum-conversion, enabled by default in + C++20, warns about deprecated arithmetic conversions on + operands of enumeration types, as outlined in + [depr.arith.conv.enum]. + + [50]-Wdeprecated-enum-float-conversion, enabled by default in + C++20, warns about deprecated arithmetic conversions on + operands where one is of enumeration type and the other is of + a floating-point type, as outlined in [depr.arith.conv.enum]. + + [51]-Wmismatched-new-delete, enabled by -Wall, warns about + calls to C++ operator delete with pointers returned from + mismatched forms of operator new or from other mismatched + allocation functions. + + [52]-Wvexing-parse, enabled by default, warns about the most + vexing parse rule: the cases when a declaration looks like a + variable definition, but the C++ language requires it to be + interpreted as a function declaration. + * Enhancements to existing warnings: + + [53]-Wnonnull considers the implicit this argument of every + C++ nonstatic member function to have been implicitly declared + with attribute nonnull and triggers warnings for calls where + the pointer is null. + + [54]Runtime Library (libstdc++) + + * Improved C++17 support, including: + + std::from_chars and std::to_chars for floating-point types. + * Improved experimental C++20 support, including: + + Calendar additions to . Thanks to Cassio Neri for + optimizations. + + std::bit_cast + + std::source_location + + Atomic wait and notify operations. + + , , and + + + + Efficient access to basic_stringbuf's buffer. + + Heterogeneous lookup in unordered containers. + * Experimental C++23 support, including: + + contains member functions for strings, thanks to Paul Fee. + + std::to_underlying, std::is_scoped_enum + * Experimental support for Data-Parallel Types (simd) from the + Parallelism 2 TS, thanks to Matthias Kretz. + * Faster std::uniform_int_distribution, thanks to Daniel Lemire. + + [55]D + + * New features: + + A new bottom type typeof(*null) has been added to represent + run-time errors and non-terminating functions. This also + introduces a new standard alias for the type named noreturn, + and is implicitly imported into every module. + + Printf-like and scanf-like functions are now detected by + prefixing them with pragma(printf) for printf-like functions + or pragma(scanf) for scanf-like functions. + + The __traits() expression now supports the extensions + isDeprecated, isDisabled, isFuture, isModule, isPackage, + child, isReturnOnStack, isZeroInit, getTargetInfo, + getLocation, hasPostblit, isCopyable, getVisibility, and + totype. + + An expression-based contract syntax has been added to the + language. + + Function literals can now return a value by reference with the + ref keyword. + + A new syntax is available to declare aliases to function types + using the alias syntax based on the assignment operator. + + New types __c_complex_float, __c_complex_double, + __c_complex_real, and __c_wchar_t have been added for + interfacing with C and C++ code, and are available from the + core.stdc.config module. + + User-defined attributes can now be used to annotate enum + members, alias declarations, and function parameters. + + Template alias parameters can now be instantiated with basic + types such as int or void function(). + + The mixin construct can now be used as types in the form + mixin(string) var. + + The mixin construct can now take an argument list, same as + pragma(msg). + * New intrinsics: + + Bitwise rotate intrinsics core.bitop.rol and core.bitop.ror + have been added. + + Byte swap intrinsic core.bitop.byteswap for swapping bytes in + a 2-byte ushort has been added. + + Math intrinsics available from core.math now have overloads + for float and double types. + + Volatile intrinsics core.volatile.volatileLoad and + core.volatile.volatileStore have been moved from the + core.bitop module. + * New attributes: + + The following GCC attributes are now recognized and available + from the gcc.attributes module with short-hand aliases for + convenience: + o @attribute("alloc_size", arguments) or + @alloc_size(arguments). + o @attribute("always_inline") or @always_inline. + o @attribute("used") or @used. + o @attribute("optimize", arguments) or + @optimize(arguments). + o @attribute("cold") or @cold. + o @attribute("noplt") or @noplt. + o @attribute("target_clones", arguments) or + @target_clones(arguments). + o @attribute("no_icf") or @no_icf. + o @attribute("noipa") or @noipa. + o @attribute("symver", arguments) or @symver(arguments). + + New aliases have been added to gcc.attributes for + compatibility with ldc.attributes. + o The @allocSize(arguments) attribute is the same as + @alloc_size(arguments), but uses a 0-based index for + function arguments. + o The @assumeUsed attribute is an alias for + @attribute("used"). + o The @fastmath attribute is an alias for + @optimize("Ofast"). + o The @naked attribute is an alias for @attribute("naked"). + This attribute may not be available on all targets. + o The @restrict attribute has been added to specify that a + function parameter is to be restrict-qualified in the C99 + sense of the term. + o The @optStrategy(strategy) attribute is an alias for + @optimize("O0") when the strategy is "none", otherwise + @optimize("Os") for the "optsize" and "minsize" + strategies. + o The @polly attribute is an alias for + @optimize("loop-parallelize-all"). + o The @section(name) attribute is an alias for + @attribute("section", name). + o The @target(arguments) attribute is an alias for + attribute("target", arguments). + o The @weak attribute is an alias for @attribute("weak"). + * New language options: + + -fweak-templates, added to control whether declarations that + can be defined in multiple objects should be emitted as weak + symbols. The default is to emit all symbols with extern + linkage as weak, unless the target lacks support for weak + symbols. + + -Wdeprecated, this option is now enabled by default. + + -Wextra, this option now turns on all warnings that are not + part of the core D language front-end - -Waddress, + -Wcast-result, -Wunknown-pragmas. + + -Wvarargs, added to turn on warnings about questionable usage + of the va_start intrinsic. + * Deprecated and removed features: + + Compiler-recognized attributes are now made available from the + gcc.attributes module, the former module gcc.attribute has + been deprecated and will be removed in a future release. + + The @attribute("alias") attribute has been removed, as it had + been superseded by pragma(mangle). + + The @attribute("forceinline") attribute has been removed and + renamed to @always_inline. + + __vector types that are not supported in hardware are now + rejected at compile-time. Previously all vector types were + accepted by the compiler and emulated when target support was + absent. + + The extern(Pascal) linkage attribute has been removed. + + The deprecation phase for -ftransition=import and + -ftransition=checkimports is finished. These switches no + longer have an effect and are now removed. Symbols that are + not visible in a particular scope will no longer be found by + the compiler. + + It is now an error to use private variables selectively + imported from other modules. Due to a bug, some imported + private members were visible from other modules, violating the + specification. + + The -fweak compiler switch has been removed, as it existed + only for testing. + + [56]Fortran + + * Added DEPRECATED to !GCC$'s attributes directive. + + [57]Go + + * GCC 11 provides a complete implementation of the Go 1.16.3 user + packages. + +[58]libgccjit + + * libgccjit was marked as merely "Alpha" quality when [59]originally + added in GCC 5. Given that we have maintained [60]API and ABI + compatibility since then and it is in use by various projects, we + have removed that caveat. + * libgccjit can now be built for MinGW + * The libgccjit API gained 10 new entry points: + + [61]gcc_jit_global_set_initializer + + 9 entrypoints for [62]directly embedding asm statements into a + compile, analogous to inline asm in the C front end + +[63]New Targets and Target Specific Improvements + + [64]AArch64 & arm + + * A number of new CPUs are supported through arguments to the -mcpu + and -mtune options in both the arm and aarch64 back ends (GCC + identifiers in parentheses): + + Arm Cortex-A78 (cortex-a78). + + Arm Cortex-A78AE (cortex-a78ae). + + Arm Cortex-A78C (cortex-a78c). + + Arm Cortex-X1 (cortex-x1). + + Arm Neoverse V1 (neoverse-v1). + + Arm Neoverse N2 (neoverse-n2). + * GCC can now auto-vectorize operations performing addition, + subtraction, multiplication and the accumulate/subtract variants on + complex numbers, taking advantage of the Advanced SIMD instructions + in the Armv8.3-a (AArch64/AArch32), SVE (AArch64), SVE2 (AArch64) + and MVE (AArch32 M-profile) instruction sets. + + [65]AArch64 + + * In addition to the above, the following AArch64-only CPUs are now + supported: + + Fujitsu A64FX (a64fx). + + Arm Cortex-R82 (cortex-r82). + * The AArch64 Armv8-R architecture is now supported through the + -march=armv8-r option. + * Mitigation against the [66]Straight-line Speculation vulnerability + is supported with the -mharden-sls= option. Please refer to the + documentation for usage instructions. + * The availability of Advanced SIMD intrinsics available through the + arm_neon.h header is improved and GCC 11 supports the full set of + intrinsics defined by ACLE Q3 2020. + + [67]AMD Radeon (GCN) + + * Initial support for gfx908 GPUs has been added. + + [68]arm + + * Initial auto-vectorization is now available when targeting the MVE + instruction set. + * GCC can now make use of the Low Overhead Branch instruction in + Armv8.1-M to optimize loop counters and checks. + * The -mcpu=cortex-m55 option now supports the extensions +nomve and + +nomve.fp to control generation of MVE and MVE floating-point + instructions. + + [69]IA-32/x86-64 + + * New ISA extension support for Intel TSXLDTRK was added to GCC. + TSXLDTRK intrinsics are available via the -mtsxldtrk compiler + switch. + * New ISA extension support for Intel SERIALIZE was added to GCC. + SERIALIZE intrinsics are available via the -mserialize compiler + switch. + * New ISA extension support for Intel HRESET was added to GCC. HRESET + intrinsics are available via the -mhreset compiler switch. + * New ISA extension support for Intel UINTR was added to GCC. UINTR + intrinsics are available via the -muintr compiler switch. + * New ISA extension support for Intel KEYLOCKER was added to GCC. + KEYLOCKER intrinsics are available via the -mkeylocker compiler + switch. + * New ISA extension support for Intel AMX-TILE, AMX-INT8, AMX-BF16 + was added to GCC. AMX-TILE, AMX-INT8, AMX-BF16 intrinsics are + available via the -mamx-tile, -mamx-int8, -mamx-bf16 compiler + switches. + * New ISA extension support for Intel AVX-VNNI was added to GCC. + AVX-VNNI intrinsics are available via the -mavxvnni compiler + switch. + * GCC now supports the Intel CPU named Sapphire Rapids through + -march=sapphirerapids. The switch enables the MOVDIRI, MOVDIR64B, + AVX512VP2INTERSECT, ENQCMD, CLDEMOTE, SERIALIZE, PTWRITE, WAITPKG, + TSXLDTRK, AMT-TILE, AMX-INT8, AMX-BF16, and AVX-VNNI ISA + extensions. + * GCC now supports the Intel CPU named Alderlake through + -march=alderlake. The switch enables the CLDEMOTE, PTWRITE, + WAITPKG, SERIALIZE, KEYLOCKER, AVX-VNNI, and HRESET ISA extensions. + * GCC now supports the Intel CPU named Rocketlake through + -march=rocketlake. Rocket Lake is based on Icelake client and minus + SGX. + * GCC now supports AMD CPUs based on the znver3 core via + -march=znver3. + * GCC now supports micro-architecture levels defined in the x86-64 + psABI via -march=x86-64-v2, -march=x86-64-v3 and -march=x86-64-v4. + + [70]Nios II + + * The options -mcustom-insn=N no longer produce compiler warnings if + the custom instruction is not generated due to missing optimization + options such as -fno-math-errno, -ffinite-math-only, or + -funsafe-math-optimizations. These warnings were not consistently + emitted for all custom instructions. + * The -mcustom-fpu-cfg=fph2 option has been added to enable the + custom instructions supported by the Nios II Floating Point + Hardware 2 Component. + + [71]NVPTX + + * The -misa default has changed from sm_30 to sm_35. + * The -m32 compiler switch has been removed. + * The -msoft-stack-reserve-local format has been fixed. Previously, + it accepted -msoft-stack-reserve-local. It now accepts + -msoft-stack-reserve-local=. + + [72]S/390, System z, IBM Z Systems + + * The behavior when compiling with -fexcess-precision=standard (e.g., + implied by -std=c99) on s390(x) targets can now be controlled at + configure time with the flag --enable-s390-excess-float-precision. + When enabled, GCC will maintain previous behavior and evaluate + float expressions in double precision, which aligns with the + definition of float_t as double. With the flag disabled, GCC will + always evaluate float expressions in single precision. In native + builds and cross compiles that have target libc headers, GCC will + by default match the definition of float_t in the installed glibc. + + [73]RISC-V + + * Support address sanitizer for RISC-V. + * Support big-endian for RISC-V, thanks to Marcus Comstedt. + * Implement new style of architecture extension test macros: each + architecture extension has a corresponding feature test macro, + which can be used to test its existence and version information. + * Legacy architecture extension test macros like __riscv_atomic are + deprecated, but will still be supported for at least 2 release + cycles. + * Support IFUNC for riscv*-*-linux*. + * Add new option -misa-spec=* to control ISA spec version. This + controls the default version of each extensions. It defaults to + 2.2. + * Introduce the --with-multilib-generator configure time option. This + allows for flexible config multi-lib settings. Its syntax is the + same as RISC-V's multilib-generator. + * Extend the sytax for multilib-generator, support expansion operator + * to reduce the complexity of complicated multi-lib re-use rules. + * Support -mcpu=* option aligned with RISC-V clang/LLVM. It sets the + pipeline model and architecture extensions, like -mtune=* plus + -march=*. + * Support for TLS stack protector canary access, thanks to Cooper Qu. + * Support __builtin_thread_pointer for RISC-V. + * Introduce shorten_memrefs optimization, which reduces the code size + for memory access, thanks to Craig Blackmore. + +[74]Operating Systems + + [75]AIX + + * GCC for AIX can be built as a 64-bit application and the runtime is + built as FAT libraries containing both 32-bit and 64-bit objects. + * Support AIX Vector Extended ABI with -mabi=vec-extabi. + * Thread-Local uninitiated data placed in local common section. + * Use thread-safe access in ctype. + * Link with libc128.a when long-double-128 enabled. + +[76]Improvements to Static Analyzer + + * The implementation of how program state is tracked within + [77]-fanalyzer has been completely rewritten for GCC 11, fixing + numerous bugs, and allowing for the analyzer to scale to larger C + source files. + * The analysis of allocations and deallocations has been generalized + beyond malloc and free. + + As preliminary work towards eventually supporting C++, the + malloc/free checking will also check new/delete and + new[]/delete[]. However, C++ is not yet properly supported by + [78]-fanalyzer (for example, exception-handling is + unimplemented). + + As noted above, the existing [79]malloc attribute has been + extended so that it can be used to identify + allocator/deallocator API pairs. The analyzer will use these + attributes when checking for leaks, double-frees, + use-after-frees, and similar issues. + + A new [80]-Wanalyzer-mismatching-deallocation warning has been + added, covering such mismatches as using scalar delete rather + vector delete[]. + * The analyzer has gained warnings + [81]-Wanalyzer-shift-count-negative, + [82]-Wanalyzer-shift-count-overflow, [83]-Wanalyzer-write-to-const, + and [84]-Wanalyzer-write-to-string-literal, all enabled by default + when [85]-fanalyzer is enabled. + * The analyzer can now be extended by GCC plugins, allowing for + domain-specific path-sensitive warnings. An example of using a + [86]GCC plugin to check for misuses of CPython's global interpreter + lock can be seen in the test suite + * The analyzer has gained new debugging options + [87]-fdump-analyzer-json and [88]-fno-analyzer-feasibility. + +Other significant improvements + + * GCC has gained a new environment variable + [89]GCC_EXTRA_DIAGNOSTIC_OUTPUT which can be used by IDEs to + request machine-readable fix-it hints without needing to adjust + build flags. + +[90]GCC 11.1 + + This is the [91]list of problem reports (PRs) from GCC's bug tracking + system that are known to be fixed in the 11.1 release. This list might + not be complete (that is, it is possible that some PRs that have been + fixed are not listed here). + +[92]GCC 11.2 + + This is the [93]list of problem reports (PRs) from GCC's bug tracking + system that are known to be fixed in the 11.2 release. This list might + not be complete (that is, it is possible that some PRs that have been + fixed are not listed here). + +[94]GCC 11.3 + + This is the [95]list of problem reports (PRs) from GCC's bug tracking + system that are known to be fixed in the 11.3 release. This list might + not be complete (that is, it is possible that some PRs that have been + fixed are not listed here). + +[96]GCC 11.4 + + This is the [97]list of problem reports (PRs) from GCC's bug tracking + system that are known to be fixed in the 11.4 release. This list might + not be complete (that is, it is possible that some PRs that have been + fixed are not listed here). + + Target Specific Changes + + x86-64 + + * The x86-64 ABI of passing and returning structure with a 64-bit + single precision vector changed in GCC 11.1 when 3DNOW is disabled. + Disabling 3DNOW no longer changes how they are passed nor returned. + This ABI change is now diagnosed with -Wpsabi. + * Mitigation against straight line speculation (SLS) for function + return and indirect jump is supported via + -mharden-sls=[none|all|return|indirect-jmp]. + * Add CS prefix to call and jmp to indirect thunk with branch target + in r8-r15 registers via -mindirect-branch-cs-prefix. + +[98]GCC 11.5 + + This is the [99]list of problem reports (PRs) from GCC's bug tracking + system that are known to be fixed in the 11.5 release. This list might + not be complete (that is, it is possible that some PRs that have been + fixed are not listed here). + + Caveats + + aarch64 + + * Due to a bug introduced a few weeks before the 11.5.0 release if + the compiler is configured without explicit --with-arch=, + --with=cpu= and/or --with-tune= configure options the compiler + without explicit -march= etc. options might act as if asked for + cortex-a34. This can be fixed by applying manually the + [100]r12-8060 commit patch on top of GCC 11.5.0. See [101]PR116029 + for more details. GCC 11.4.0 or earlier releases are not affected. + + + For questions related to the use of GCC, please consult these web + pages and the [102]GCC manuals. If that fails, the + [103]gcc-help@gcc.gnu.org mailing list might help. Comments on these + web pages and the development of GCC are welcome on our developer + list at [104]gcc@gcc.gnu.org. All of [105]our lists have public + archives. + + Copyright (C) [106]Free Software Foundation, Inc. Verbatim copying and + distribution of this entire article is permitted in any medium, + provided this notice is preserved. + + These pages are [107]maintained by the GCC team. Last modified + 2025-01-31. + +References + + 1. https://gcc.gnu.org/gcc-11/porting_to.html + 2. https://gcc.gnu.org/onlinedocs/index.html#current + 3. https://wg21.link/p0522r0 + 4. https://gcc.gnu.org/pipermail/gcc-patches/2020-May/546494.html + 5. https://gcc.gnu.org/gcc-11/changes.html#general + 6. https://github.com/google/sanitizers/wiki/ThreadSanitizerCppManual + 7. https://www.kernel.org/doc/html/latest/dev-tools/kcsan.html + 8. https://gcc.gnu.org/onlinedocs/gcc-11.1.0/gcc/Diagnostic-Message-Formatting-Options.html#index-fdiagnostics-column-unit + 9. https://gcc.gnu.org/onlinedocs/gcc-11.1.0/gcc/Diagnostic-Message-Formatting-Options.html#index-fdiagnostics-column-origin + 10. https://gcc.gnu.org/onlinedocs/gcc-11.1.0/gcc/Diagnostic-Message-Formatting-Options.html#index-fdiagnostics-format + 11. https://gcc.gnu.org/onlinedocs/gcc-11.1.0/gcc/Preprocessor-Options.html#index-ftabstop + 12. https://clang.llvm.org/docs/HardwareAssistedAddressSanitizerDesign.html + 13. https://github.com/google/sanitizers/wiki/AddressSanitizer + 14. https://clang.llvm.org/docs/HardwareAssistedAddressSanitizerDesign.html + 15. https://dwarfstd.org/doc/DWARF5.pdf + 16. https://gcc.gnu.org/onlinedocs/gcc-11.1.0/gcc/Code-Gen-Options.html#index-fno-bit-tests + 17. https://gcc.gnu.org/onlinedocs/gcc-11.1.0/gcc/Optimize-Options.html#index-fipa-modref + 18. https://gcc.gnu.org/onlinedocs/gcc-11.1.0/gcc/Optimize-Options.html#index-fipa-ocf + 19. https://gcc.gnu.org/onlinedocs/gcc-11.1.0/gcc/Optimize-Options.html#index-fprofile-values + 20. https://gcc.gnu.org/gcc-11/changes.html#languages + 21. https://www.openmp.org/specifications/ + 22. https://www.openacc.org/ + 23. https://gcc.gnu.org/wiki/OpenACC/Implementation Status#status-11 + 24. https://gcc.gnu.org/onlinedocs/gcc-11.1.0/libgomp/Enabling-OpenACC.html + 25. https://gcc.gnu.org/gcc-11/changes.html#c-family + 26. https://gcc.gnu.org/onlinedocs/gcc-11.1.0/gcc/Common-Function-Attributes.html#index-no_005fstack_005fprotector-function-attribute + 27. https://gcc.gnu.org/onlinedocs/gcc-11.1.0/gcc/Common-Function-Attributes.html#index-malloc-function-attribute + 28. https://gcc.gnu.org/onlinedocs/gcc-11.1.0/gcc/Warning-Options.html#index-Wmismatched-dealloc + 29. https://gcc.gnu.org/onlinedocs/gcc-11.1.0/gcc/C_002b_002b-Dialect-Options.html#index-Wmismatched-new-delete + 30. https://gcc.gnu.org/onlinedocs/gcc-11.1.0/gcc/Warning-Options.html#index-Wfree-nonheap-object + 31. https://gcc.gnu.org/onlinedocs/gcc-11.1.0/gcc/Warning-Options.html#index-Wmismatched-dealloc + 32. https://gcc.gnu.org/onlinedocs/gcc-11.1.0/gcc/Warning-Options.html#index-Wsizeof-array-div + 33. https://gcc.gnu.org/onlinedocs/gcc-11.1.0/gcc/Warning-Options.html#index-Wstringop-overread + 34. https://gcc.gnu.org/onlinedocs/gcc-11.1.0/gcc/Warning-Options.html#index-Wtsan + 35. https://gcc.gnu.org/onlinedocs/gcc-11.1.0/gcc/Warning-Options.html#index-Wfree-nonheap-object + 36. https://gcc.gnu.org/onlinedocs/gcc-11.1.0/gcc/Warning-Options.html#index-Wmaybe-uninitialized + 37. https://gcc.gnu.org/onlinedocs/gcc-11.1.0/gcc/Warning-Options.html#index-Wuninitialized + 38. https://gcc.gnu.org/gcc-11/changes.html#c + 39. https://gcc.gnu.org/onlinedocs/gcc-11.1.0/gcc/Warning-Options.html#index-Warray-parameter + 40. https://gcc.gnu.org/onlinedocs/gcc-11.1.0/gcc/Warning-Options.html#index-Wvla-parameter + 41. https://gcc.gnu.org/gcc-11/changes.html#cxx + 42. https://gcc.gnu.org/projects/cxx-status.html#cxx20 + 43. https://gcc.gnu.org/projects/cxx-status.html#cxx23 + 44. https://gcc.gnu.org/PR41437 + 45. https://gcc.gnu.org/PR95307 + 46. https://gcc.gnu.org/PR97518 + 47. https://gcc.gnu.org/onlinedocs/gcc-11.1.0/gcc/C_002b_002b-Dialect-Options.html#index-Wctad-maybe-unsupported + 48. https://gcc.gnu.org/onlinedocs/gcc-11.1.0/gcc/C_002b_002b-Dialect-Options.html#index-Wrange-loop-construct + 49. https://gcc.gnu.org/onlinedocs/gcc-11.1.0/gcc/C_002b_002b-Dialect-Options.html#index-Wdeprecated-enum-enum-conversion + 50. https://gcc.gnu.org/onlinedocs/gcc-11.1.0/gcc/C_002b_002b-Dialect-Options.html#index-Wdeprecated-enum-float-conversion + 51. https://gcc.gnu.org/onlinedocs/gcc-11.1.0/gcc/C_002b_002b-Dialect-Options.html#index-Wmismatched-new-delete + 52. https://gcc.gnu.org/onlinedocs/gcc-11.1.0/gcc/C_002b_002b-Dialect-Options.html#index-Wvexing-parse + 53. https://gcc.gnu.org/onlinedocs/gcc-11.1.0/gcc/Warning-Options.html#index-Wnonnull + 54. https://gcc.gnu.org/gcc-11/changes.html#libstdcxx + 55. https://gcc.gnu.org/gcc-11/changes.html#d + 56. https://gcc.gnu.org/gcc-11/changes.html#fortran + 57. https://gcc.gnu.org/gcc-11/changes.html#go + 58. https://gcc.gnu.org/gcc-11/changes.html#jit + 59. https://gcc.gnu.org/gcc-5/changes.html#jit + 60. https://gcc.gnu.org/onlinedocs/gcc-11.1.0/jit/topics/compatibility.html + 61. https://gcc.gnu.org/onlinedocs/gcc-11.1.0/jit/topics/expressions.html#c.gcc_jit_global_set_initializer + 62. https://gcc.gnu.org/onlinedocs/gcc-11.1.0/jit/topics/asm.html + 63. https://gcc.gnu.org/gcc-11/changes.html#targets + 64. https://gcc.gnu.org/gcc-11/changes.html#arm-targets + 65. https://gcc.gnu.org/gcc-11/changes.html#aarch64 + 66. https://developer.arm.com/documentation/102587/0102/Straight-line-speculation-frequently-asked-questions + 67. https://gcc.gnu.org/gcc-11/changes.html#amdgcn + 68. https://gcc.gnu.org/gcc-11/changes.html#arm + 69. https://gcc.gnu.org/gcc-11/changes.html#x86 + 70. https://gcc.gnu.org/gcc-11/changes.html#nios2 + 71. https://gcc.gnu.org/gcc-11/changes.html#nvptx + 72. https://gcc.gnu.org/gcc-11/changes.html#s390 + 73. https://gcc.gnu.org/gcc-11/changes.html#riscv + 74. https://gcc.gnu.org/gcc-11/changes.html#os + 75. https://gcc.gnu.org/gcc-11/changes.html#aix + 76. https://gcc.gnu.org/gcc-11/changes.html#analyzer + 77. https://gcc.gnu.org/onlinedocs/gcc-11.1.0/gcc/Static-Analyzer-Options.html + 78. https://gcc.gnu.org/onlinedocs/gcc-11.1.0/gcc/Static-Analyzer-Options.html + 79. https://gcc.gnu.org/onlinedocs/gcc-11.1.0/gcc/Common-Function-Attributes.html#index-malloc-function-attribute + 80. https://gcc.gnu.org/onlinedocs/gcc-11.1.0/gcc/Static-Analyzer-Options.html#index-Wanalyzer-mismatching-deallocation + 81. https://gcc.gnu.org/onlinedocs/gcc-11.1.0/gcc/Static-Analyzer-Options.html#index-Wanalyzer-shift-count-negative + 82. https://gcc.gnu.org/onlinedocs/gcc-11.1.0/gcc/Static-Analyzer-Options.html#index-Wanalyzer-shift-count-overflow + 83. https://gcc.gnu.org/onlinedocs/gcc-11.1.0/gcc/Static-Analyzer-Options.html#index-Wanalyzer-write-to-const + 84. https://gcc.gnu.org/onlinedocs/gcc-11.1.0/gcc/Static-Analyzer-Options.html#index-Wanalyzer-write-to-string-literal + 85. https://gcc.gnu.org/onlinedocs/gcc-11.1.0/gcc/Static-Analyzer-Options.html + 86. https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=66dde7bc64b75d4a338266333c9c490b12d49825 + 87. https://gcc.gnu.org/onlinedocs/gcc-11.1.0/gcc/Static-Analyzer-Options.html#index-fdump-analyzer-json + 88. https://gcc.gnu.org/onlinedocs/gcc-11.1.0/gcc/Static-Analyzer-Options.html#index-fno-analyzer-feasibility + 89. https://gcc.gnu.org/onlinedocs/gcc-11.1.0/gcc/Environment-Variables.html#index-GCC_005fEXTRA_005fDIAGNOSTIC_005fOUTPUT + 90. https://gcc.gnu.org/gcc-11/changes.html#11.1 + 91. https://gcc.gnu.org/bugzilla/buglist.cgi?bug_status=RESOLVED&resolution=FIXED&target_milestone=11.0 + 92. https://gcc.gnu.org/gcc-11/changes.html#11.2 + 93. https://gcc.gnu.org/bugzilla/buglist.cgi?bug_status=RESOLVED&resolution=FIXED&target_milestone=11.2 + 94. https://gcc.gnu.org/gcc-11/changes.html#11.3 + 95. https://gcc.gnu.org/bugzilla/buglist.cgi?bug_status=RESOLVED&resolution=FIXED&target_milestone=11.3 + 96. https://gcc.gnu.org/gcc-11/changes.html#11.4 + 97. https://gcc.gnu.org/bugzilla/buglist.cgi?bug_status=RESOLVED&resolution=FIXED&target_milestone=11.4 + 98. https://gcc.gnu.org/gcc-11/changes.html#11.5 + 99. https://gcc.gnu.org/bugzilla/buglist.cgi?bug_status=RESOLVED&resolution=FIXED&target_milestone=11.5 + 100. https://gcc.gnu.org/r12-8060 + 101. https://gcc.gnu.org/PR116029 + 102. https://gcc.gnu.org/onlinedocs/ + 103. mailto:gcc-help@gcc.gnu.org + 104. mailto:gcc@gcc.gnu.org + 105. https://gcc.gnu.org/lists.html + 106. https://www.fsf.org/ + 107. https://gcc.gnu.org/about.html +====================================================================== +http://gcc.gnu.org/gcc-10/index.html + GCC 10 Release Series + + (This release series is no longer supported.) + + July, 7, 2023 + + The [1]GNU project and the GCC developers are pleased to announce the + release of GCC 10.5. + + This release is a bug-fix release, containing fixes for regressions in + GCC 10.4 relative to previous releases of GCC. + +Release History + + GCC 10.5 + July 7, 2023 ([2]changes, [3]documentation) + + GCC 10.4 + June 28, 2022 ([4]changes, [5]documentation) + + GCC 10.3 + April 8, 2021 ([6]changes, [7]documentation) + + GCC 10.2 + July 23, 2020 ([8]changes, [9]documentation) + + GCC 10.1 + May 7, 2020 ([10]changes, [11]documentation) + +References and Acknowledgements + + GCC used to stand for the GNU C Compiler, but since the compiler + supports several other languages aside from C, it now stands for the + GNU Compiler Collection. + + The GCC developers would like to thank the numerous people that have + contributed new features, improvements, bug fixes, and other changes as + well as test results to GCC. This [12]amazing group of volunteers is + what makes GCC successful. + + For additional information about GCC please refer to the [13]GCC + project web site or contact the [14]GCC development mailing list. + + To obtain GCC please use [15]our mirror sites or [16]our version + control system. + + + For questions related to the use of GCC, please consult these web + pages and the [17]GCC manuals. If that fails, the + [18]gcc-help@gcc.gnu.org mailing list might help. Comments on these + web pages and the development of GCC are welcome on our developer + list at [19]gcc@gcc.gnu.org. All of [20]our lists have public + archives. + + Copyright (C) [21]Free Software Foundation, Inc. Verbatim copying and + distribution of this entire article is permitted in any medium, + provided this notice is preserved. + + These pages are [22]maintained by the GCC team. Last modified + 2024-05-30. + +References + + 1. http://www.gnu.org/ + 2. https://gcc.gnu.org/gcc-10/changes.html + 3. https://gcc.gnu.org/onlinedocs/10.5.0/ + 4. https://gcc.gnu.org/gcc-10/changes.html + 5. https://gcc.gnu.org/onlinedocs/10.4.0/ + 6. https://gcc.gnu.org/gcc-10/changes.html + 7. https://gcc.gnu.org/onlinedocs/10.3.0/ + 8. https://gcc.gnu.org/gcc-10/changes.html + 9. https://gcc.gnu.org/onlinedocs/10.2.0/ + 10. https://gcc.gnu.org/gcc-10/changes.html + 11. https://gcc.gnu.org/onlinedocs/10.1.0/ + 12. https://gcc.gnu.org/onlinedocs/gcc-10.1.0/gcc/Contributors.html + 13. https://gcc.gnu.org/index.html + 14. mailto:gcc@gcc.gnu.org + 15. https://gcc.gnu.org/mirrors.html + 16. https://gcc.gnu.org/git.html + 17. https://gcc.gnu.org/onlinedocs/ + 18. mailto:gcc-help@gcc.gnu.org + 19. mailto:gcc@gcc.gnu.org + 20. https://gcc.gnu.org/lists.html + 21. https://www.fsf.org/ + 22. https://gcc.gnu.org/about.html +====================================================================== +http://gcc.gnu.org/gcc-10/changes.html + GCC 10 Release Series + Changes, New Features, and Fixes + + This page is a "brief" summary of some of the huge number of + improvements in GCC 10. You may also want to check out our [1]Porting + to GCC 10 page and the [2]full GCC documentation. + +Caveats + + * An ABI incompatibility between C++14 and C++17 has been fixed. On + some targets a class with a zero-sized subobject would be passed + incorrectly when compiled as C++17 or C++20. See the [3]C++ notes + below for more details. + * The deprecated Profile Mode and array_allocator extensions have + been removed from libstdc++. + * The non-standard std::__is_nullptr_t type trait is deprecated and + will be removed from libstdc++ in a future release. The standard + trait std::is_null_pointer should be instead. + * The minimum version of the [4]MPFR library required for building + GCC has been increased to version 3.1.0 (released 2011-10-03). + * The automatic template instantiation at link time (-frepo) has been + removed. + * The --param allow-store-data-races internal parameter has been + removed in favor of a new official option -fallow-store-data-races. + While default behavior is unchanged and the new option allows to + correctly maintain a per compilation unit setting across link-time + optimization, alteration of the default via --param + allow-store-data-races will now be diagnosed and build systems have + to be adjusted accordingly. + * Offloading to Heterogeneous System Architecture Intermediate + Language (HSAIL) has been deprecated and will likely be removed in + a future release. + * The type of the std::iterator base class of + std::istreambuf_iterator was changed in C++98 mode to be consistent + with C++11 and later standards. See the [5]libstdc++ notes below + for more details. + * GCC 10.5 does not bootstrap with a C++98 compiler; if you need to + start from C++98, you should build 10.4 or 9.5 instead. + +[6]General Improvements + + * New built-in functions: + + The [7]__has_builtin built-in preprocessor operator can be + used to query support for built-in functions provided by GCC + and other compilers that support it. + + __builtin_roundeven for the corresponding function from + ISO/IEC TS 18661. + * New command-line options: + + [8]-fallocation-dce removes unneeded pairs of new and delete + operators. + + [9]-fprofile-partial-training can now be used to inform the + compiler that code paths not covered by the training run + should not be optimized for size. + + [10]-fprofile-reproducible controls level of reproducibility + of profile gathered by [11]-fprofile-generate. This makes it + possible to rebuild program with same outcome which is useful, + for example, for distribution packages. + + [12]-fprofile-prefix-path can be used in combination with + -fprofile-generate=profile_dir and -fprofile-use=profile_dir + to inform GCC where the base directory of build source tree is + in case it differs between instrumentation and optimized + builds. + + [13]-fanalyzer enables a new static analysis pass and + associated warnings. This pass performs a time-consuming + exploration of paths through the code in the hope of detecting + various common errors, such as double-free bugs. This option + should be regarded as experimental in this release. In + particular, analysis of non-C code is unlikely to work. + * Inter-procedural optimization improvements: + + The inter-procedural scalar replacement of aggregates + (IPA-SRA) pass was re-implemented to work at link-time and can + now also remove computing and returning unused return values. + + [14]-finline-functions is now enabled at -O2 and was retuned + for better code size versus runtime performance trade-offs. + Inliner heuristics was also significantly sped up to avoid + negative impact to -flto -O2 compile times. + + Inliner heuristics and function cloning can now use + value-range information to predict effectivity of individual + transformations. + + During link-time optimization the C++ One Definition Rule is + used to increase precision of type based alias analysis. + * Link-time optimization improvements: + + A new binary [15]lto-dump has been added. It dumps various + information about LTO bytecode object files. + + The parallel phase of the LTO can automatically detect a + running make's jobserver or fall back to number of available + cores. + + The LTO bytecode can be compressed with the [16]zstd + algorithm. The configure script automatically detects zstd + support. + + Most --param values can now be specified at translation unit + granularity. This includes all parameters controlling the + inliner and other inter-procedural optimizations. Unlike + earlier releases, GCC 10 will ignore parameters controlling + optimizations specified at link-time and apply parameters + specified at compile-time in the same manner as done for + optimization flags. + * Profile driven optimization improvements: + + Profile maintenance during compilation and hot/cold code + partitioning have been improved. + + Using [17]-fprofile-values, an instrumented binary can track + multiple values (up to 4) for e.g. indirect calls and provide + more precise profile information. + +[18]New Languages and Language-Specific Improvements + + * Version 2.6 of the [19]OpenACC specification is now supported by + the C, C++ and Fortran compilers. See the [20]implementation status + section on the OpenACC wiki page and the [21]run-time library + documentation for further information. + * GCC 10 adds a number of newly implemented [22]OpenMP 5.0 features + such as conditional lastprivate clause, scan and loop directives, + order(concurrent) and use_device_addr clauses support, if clause on + simd construct, and partial support for the declare variant + directive, getting closer to full support of the OpenMP 5.0 + standard. + * OpenMP and OpenACC now support [23]offloading to AMD Radeon (GCN) + GPUs; supported are the third-generation Fiji (fiji) and the + fifth-generation VEGA 10/VEGA 20 (gfx900 or gfx906). + + [24]C family + + * New attributes: + + The access function and type attribute has been added to + describe how a function accesses objects passed to it by + pointer or reference, and to associate such arguments with + integer arguments denoting the objects' sizes. The attribute + is used to enable the detection of invalid accesses by + user-defined functions, such as those diagnosed by + -Wstringop-overflow. + + The symver attribute can be used to bind symbols to specific + version nodes on ELF platforms. This is preferred to using + inline assembly with GNU as symver directive because the + latter is not compatible with link-time optimizations. + * New warnings: + + [25]-Wstring-compare, enabled by -Wextra, warns about equality + and inequality expressions between zero and the result of a + call to either strcmp and strncmp that evaluate to a constant + as a result of the length of one argument being greater than + the size of the array pointed to by the other. + + [26]-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. + * Enhancements to existing warnings: + + [27]-Warray-bounds detects more out-of-bounds accesses to + member arrays as well as accesses to elements of zero-length + arrays. + + [28]-Wformat-overflow makes full use of string length + information computed by the strlen optimization pass. + + [29]-Wrestrict detects overlapping accesses to dynamically + allocated objects. + + [30]-Wreturn-local-addr diagnoses more instances of return + statements returning addresses of automatic variables. + + [31]-Wstringop-overflow detects more out-of-bounds stores to + member arrays including zero-length arrays, dynamically + allocated objects and variable length arrays, as well as more + instances of reads of unterminated character arrays by string + built-in functions. The warning also detects out-of-bounds + accesses by calls to user-defined functions declared with the + new attribute access. + + [32]-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. + * Extended characters in identifiers may now be specified directly in + the input encoding (UTF-8, by default), in addition to the UCN + syntax (\uNNNN or \UNNNNNNNN) that is already supported: + +static const int Ï€ = 3; +int get_naïve_pi() { + return Ï€; +} + + [33]C + + * Several new features from the upcoming C2X revision of the ISO C + standard are supported with -std=c2x and -std=gnu2x. Some of these + features are also supported as extensions when compiling for older + language versions. In addition to the features listed, some + features previously supported as extensions and now added to the C + standard are enabled by default in C2X mode and not diagnosed with + -std=c2x -Wpedantic. + + The [[]] attribute syntax is supported, as in C++. Existing + attributes can be used with this syntax in forms such as + [[gnu::const]]. The standard attributes [[deprecated]], + [[fallthrough]] and [[maybe_unused]] are supported. + + UTF-8 character constants using the u8'' syntax are supported. + + defines macros FLT_NORM_MAX, DBL_NORM_MAX and + LDBL_NORM_MAX. + + When decimal floating-point arithmetic is supported, + defines macros DEC32_TRUE_MIN, DEC64_TRUE_MIN and + DEC128_TRUE_MIN, in addition to the macros that were + previously only defined if __STDC_WANT_DEC_FP__ was defined + before including . + + In C2X mode, empty parentheses in a function definition give + that function a type with a prototype for subsequent calls; + other old-style function definitions are diagnosed by default + in C2X mode. + + The strftime format checking supports the %OB and %Ob formats. + + In C2X mode, -fno-fp-int-builtin-inexact is enabled by + default. + * GCC now defaults to -fno-common. As a result, global variable + accesses are more efficient on various targets. In C, global + variables with multiple tentative definitions now result in linker + errors. With -fcommon such definitions are silently merged during + linking. + + [34]C++ + + * Several C++20 features have been implemented: + + Concepts, including P0734R0, P0857R0, P1084R2, P1141R2, + P0848R3, P1616R1, P1452R2 + + P1668R1, Permitting Unevaluated inline-assembly in constexpr + Functions + + P1161R3, Deprecate a[b,c] + + P0848R3, Conditionally Trivial Special Member Functions + + P1091R3, Extending structured bindings + + P1143R2, Adding the constinit keyword + + P1152R4, Deprecating volatile + + P0388R4, Permit conversions to arrays of unknown bound + + P0784R7, constexpr new + + P1301R4, [[nodiscard("with reason")]] + + P1814R0, class template argument deduction for alias templates + + P1816R0, class template argument deduction for aggregates + + P0960R3, Parenthesized initialization of aggregates + + P1331R2, Allow trivial default initialization in constexpr + contexts + + P1327R1, Allowing dynamic_cast and polymorphic typeid in + constexpr contexts + + P0912R5, Coroutines (requires -fcoroutines) + * Several C++ Defect Reports have been resolved, e.g.: + + DR 1560, lvalue-to-rvalue conversion in ?: + + DR 1813, __is_standard_layout for a class with repeated bases + + DR 2094, volatile scalars are trivially copyable, + + DR 2096, constraints on literal unions + + DR 2413, typename in conversion-function-ids + + DR 2352, Similar types and reference binding + + DR 1601, Promotion of enumeration with fixed underlying type + + DR 330, Qualification conversions and pointers to arrays of + pointers + + DR 1307, Overload resolution based on size of array + initializer-list + + DR 1710, Missing template keyword in class-or-decltype + * New warnings: + + [35]-Wmismatched-tags, disabled by default, warns about + declarations of structs, classes, and class templates and + their specializations with a class-key that does not match + either the definition or the first declaration if no + definition is provided. The option is provided to ease + portability to Windows-based compilers. + + [36]-Wredundant-tags, disabled by default, warns about + redundant class-key and enum-key in contexts where the key can + be eliminated without causing an syntactic ambiguity. + * G++ can now detect modifying constant objects in constexpr + evaluation (which is undefined behavior). + * G++ no longer emits bogus -Wsign-conversion warnings with explicit + casts. + * Narrowing is now detected in more contexts (e.g., case values). + * Memory consumption of the compiler has been reduced in constexpr + evaluation. + * The noexcept-specifier is now properly treated as a complete-class + context as per [class.mem]. + * The attribute deprecated can now be used on namespaces too. + * The ABI of passing and returning certain C++ classes by value + changed on several targets in GCC 10, including [37]AArch64, + [38]ARM, [39]PowerPC ELFv2, [40]S/390 and [41]Itanium. These + changes affect classes with a zero-sized subobject (an empty base + class, or data member with the [[no_unique_address]] attribute) + where all other non-static data members have the same type (this is + called a "homogeneous aggregate" in some ABI specifications, or if + there is only one such member, a "single element"). In -std=c++17 + and -std=c++20 modes, classes with an empty base class were not + considered to have a single element or to be a homogeneous + aggregate, and so could be passed differently (in the wrong + registers or at the wrong stack address). This could make code + compiled with -std=c++17 and -std=c++14 ABI incompatible. This has + been corrected and the empty bases are ignored in those ABI + decisions, so functions compiled with -std=c++14 and -std=c++17 are + now ABI compatible again. Example: struct empty {}; struct S : + empty { float f; }; void f(S);. Similarly, in classes containing + non-static data members with empty class types using the C++20 + [[no_unique_address]] attribute, those members weren't ignored in + the ABI argument passing decisions as they should be. Both of these + ABI changes are now diagnosed with -Wpsabi. + + [42]Runtime Library (libstdc++) + + * Improved experimental C++2a support, including: + + Library concepts in and . + + Constrained algorithms in , , and + (thanks to Patrick Palka). + + New algorithms shift_left and shift_right (thanks to Patrick + Palka). + + std::span (thanks to JeanHeyd Meneide). + + Three-way comparisons in and throughout the library. + + Constexpr support in and elsewhere (thanks to + Edward Smith-Rowland). + + and std::jthread (thanks to Thomas Rodgers). + + std::atomic_ref and std::atomic. + + Integer comparison functions (cmp_equal, cmp_less etc.). + + std::ssize, std::to_array. + + std::construct_at, std::destroy, constexpr std::allocator. + + Mathematical constants in . + * Support for RDSEED in std::random_device. + * Reduced header dependencies, leading to faster compilation for some + code. + * The std::iterator base class of std::istreambuf_iterator was + changed in C++98 mode to be consistent with C++11 and later + standards. This is expected to have no noticeable effect except in + the unlikely case of a class which has potentially overlapping + subobjects of type std::istreambuf_iterator and another iterator + type with a std::iterator base class. + The layout of such a type might change when compiled as C++98. + [43]Bug 92285 has more details and concrete examples. + + [44]D + + * Support for static foreach has been implemented. + * Aliases can now be created directly from any __traits that return + symbols or tuples. Previously, an AliasSeq was necessary in order + to alias their return. + * It is now possible to detect the language ABI specified for a + struct, class, or interface using __traits(getLinkage, ...). + * Support for core.math.toPrec intrinsics has been added. These + intrinsics guarantee the rounding to specific floating-point + precisions at specified points in the code. + * Support for pragma(inline) has been implemented. Previously the + pragma was recognized, but had no effect on the compilation. + * Optional parentheses in asm operands are deprecated and will be + removed in a future release. + * All content imported files are now included in the make dependency + list when compiling with -M. + * Compiler recognized attributes provided by the gcc.attribute module + will now take effect when applied to function prototypes as well as + when applied to full function declarations. + * Added a --enable-libphobos-checking configure option to control + whether run-time checks are compiled into the D runtime library. + * Added a --with-libphobos-druntime-only configure option to indicate + whether to build only the core D runtime library, or both the core + and standard libraries into libphobos. + + [45]Fortran + + * use_device_addr of version 5.0 of the [46]OpenMP specification is + now supported. Note that otherwise OpenMP 4.5 is partially + supported in the Fortran compiler; the largest missing item is + structure element mapping. + * The default buffer size for I/O using unformatted files has been + increased to 1048576. The buffer size for can now be set at runtime + via the environment variables GFORTRAN_FORMATTED_BUFFER_SIZE and + GFORTRAN_UNFORMATTED_BUFFER_SIZE for formatted and unformatted + files, respectively. + * Mismatches between actual and dummy argument lists in a single file + are now rejected with an error. Use the new option + -fallow-argument-mismatch to turn these errors into warnings; this + option is implied with -std=legacy. -Wargument-mismatch has been + removed. + * The handling of a BOZ literal constant has been reworked to provide + better conformance to the Fortran 2008 and 2018 standards. In these + Fortran standards, a BOZ literal constant is a typeless and + kindless entity. As a part of the rework, documented and + undocumented extensions to the Fortran standard now emit errors + during compilation. Some of these extensions are permitted with the + -fallow-invalid-boz option, which degrades the error to a warning + and the code is compiled as with older gfortran. + * At any optimization level except-Os, gfortran now uses inline + packing for arguments instead of calling a library routine. If the + source contains a large number of arguments that need to be + repacked, code size or time for compilation can become excessive. + If that is the case, -fno-inline-arg-packing can be used to disable + inline argument packing. + * Legacy extensions: + + For formatted input/output, if the explicit widths after the + data-edit descriptors I, F and G have been omitted, default + widths are used. + + A blank format item at the end of a format specification, i.e. + nothing following the final comma, is allowed. Use the option + -fdec-blank-format-item; this option is implied with -fdec. + + The existing support for AUTOMATIC and STATIC attributes has + been extended to allow variables with the AUTOMATIC attribute + to be used in EQUIVALENCE statements. Use -fdec-static; this + option is implied by -fdec. + + Allow character literals in assignments and DATA statements + for numeric (INTEGER, REAL, or COMPLEX) or LOGICAL variables. + Use the option -fdec-char-conversions; this option is implied + with -fdec. + + DEC comparisons, i.e. allow Hollerith constants to be used in + comparisons with INTEGER, REAL, COMPLEX and CHARACTER + expressions. Use the option -fdec. + * Character type names in errors and warnings now include len in + addition to kind; * is used for assumed length. The kind is omitted + if it is the default kind. Examples: CHARACTER(12), CHARACTER(6,4). + * CO_BROADCAST now supports derived type variables including objects + with allocatable components. In this case, the optional arguments + STAT= and ERRMSG= are currently ignored. + * The handling of module and submodule names has been reworked to + allow the full 63-character length mandated by the standard. + Previously symbol names were truncated if the combined length of + module, submodule, and function name exceeded 126 characters. This + change therefore breaks the ABI, but only for cases where this 126 + character limit was exceeded. + + [47]Go + + * GCC 10 provides a complete implementation of the Go 1.14.6 user + packages. + +[48]libgccjit + + * The libgccjit API gained four new entry points: + + [49]gcc_jit_version_major, [50]gcc_jit_version_minor, and + [51]gcc_jit_version_patchlevel for programmatically checking + the libgccjit version from client code, and + + [52]gcc_jit_context_new_bitfield + +[53]New Targets and Target Specific Improvements + + [54]AArch64 & arm + + * The AArch64 and arm ports now support condition flag output + constraints in inline assembly, as indicated by the + __GCC_ASM_FLAG_OUTPUTS__. On arm this feature is only available for + A32 and T32 targets. Please refer to the documentation for more + details. + + [55]AArch64 + + * There have been several improvements related to the Scalable Vector + Extension (SVE): + + The SVE ACLE types and intrinsics are now supported. They can + be accessed using the header file arm_sve.h. + + It is now possible to create fixed-length SVE types using the + arm_sve_vector_bits attribute. For example: +#if __ARM_FEATURE_SVE_BITS==512 +typedef svint32_t vec512 __attribute__((arm_sve_vector_bits(512))); +typedef svbool_t pred512 __attribute__((arm_sve_vector_bits(512))); +#endif + + -mlow-precision-div, -mlow-precision-sqrt and + -mlow-precision-recip-sqrt now work for SVE. + + -msve-vector-bits=128 now generates vector-length-specific + code for little-endian targets. It continues to generate + vector-length-agnostic code for big-endian targets, just as + previous releases did for all targets. + + The vectorizer is now able to use extending loads and + truncating stores, including gather loads and scatter stores. + + The vectorizer now compares the cost of vectorizing with SVE + and vectorizing with Advanced SIMD and tries to pick the best + one. Previously it would always use SVE if possible. + + If a vector loop uses Advanced SIMD rather than SVE, the + vectorizer now considers using SVE to vectorize the left-over + elements (the “scalar tail†or “epilogâ€). + + Besides these specific points, there have been many general + improvements to the way that the vectorizer uses SVE. + * The -mbranch-protection=pac-ret option now accepts the optional + argument +b-key extension to perform return address signing with + the B-key instead of the A-key. + * The option -moutline-atomics has been added to aid deployment of + the Large System Extensions (LSE) on GNU/Linux systems built with a + baseline architecture targeting Armv8-A. When the option is + specified code is emitted to detect the presence of LSE + instructions at runtime and use them for standard atomic + operations. For more information please refer to the documentation. + * The Transactional Memory Extension is now supported through ACLE + intrinsics. It can be enabled through the +tme option extension + (for example, -march=armv8.5-a+tme). + * A number of features from Armv8.5-A are now supported through ACLE + intrinsics. These include: + + The random number instructions that can be enabled through the + (already present in GCC 9.1) +rng option extension. + + Floating-point intrinsics to round to integer instructions + from Armv8.5-A when targeting -march=armv8.5-a or later. + + Memory Tagging Extension intrinsics enabled through the + +memtag option extension. + * Similarly, the following Armv8.6-A features are now supported + through ACLE intrinsics: + + The bfloat16 extension. This extension is enabled + automatically when Armv8.6-A is selected (such as by + -march=armv8.6-a). It can also be enabled for Armv8.2-A and + later using the +bf16 option extension. + + The Matrix Multiply extension. This extension is split into + three parts, one for each supported data type: + o Support for 8-bit integer matrix multiply instructions. + This extension is enabled automatically when Armv8.6-A is + selected. It can also be enabled for Armv8.2-A and later + using the +i8mm option extension. + o Support for 32-bit floating-point matrix multiply + instructions. This extension can be enabled using the + +f32mm option extension, which also has the effect of + enabling SVE. + o Support for 64-bit floating-point matrix multiply + instructions. This extension can be enabled using the + +f64mm option extension, which likewise has the effect of + enabling SVE. + * SVE2 is now supported through ACLE intrinsics and (to a limited + extent) through autovectorization. It can be enabled through the + +sve2 option extension (for example, -march=armv8.5-a+sve2). + Additional extensions can be enabled through +sve2-sm4, +sve2-aes, + +sve2-sha3 and +sve2-bitperm. + * Support has been added for the following processors (GCC + identifiers in parentheses): + + Arm Cortex-A77 (cortex-a77). + + Arm Cortex-A76AE (cortex-a76ae). + + Arm Cortex-A65 (cortex-a65). + + Arm Cortex-A65AE (cortex-a65ae). + + Arm Cortex-A34 (cortex-a34). + + Marvell ThunderX3 (thunderx3t110). + The GCC identifiers can be used as arguments to the -mcpu or -mtune + options, for example: -mcpu=cortex-a77 or -mtune=cortex-a65ae or as + arguments to the equivalent target attributes and pragmas. + + [56]arm + + * Support for the FDPIC ABI has been added. It uses 64-bit function + descriptors to represent pointers to functions, and enables code + sharing on MMU-less systems. The corresponding target triple is + arm-uclinuxfdpiceabi, and the C library is uclibc-ng. + * Support has been added for the Arm EABI on NetBSD through the + arm*-*-netbsdelf-*eabi* triplet. + * The handling of 64-bit integer operations has been significantly + reworked and improved leading to improved performance and reduced + stack usage when using 64-bit integral data types. The option + -mneon-for-64bits is now deprecated and will be removed in a future + release. + * Support has been added for the following processors (GCC + identifiers in parentheses): + + Arm Cortex-A77 (cortex-a77). + + Arm Cortex-A76AE (cortex-a76ae). + + Arm Cortex-M35P (cortex-m35p). + + Arm Cortex-M55 (cortex-m55). + The GCC identifiers can be used as arguments to the -mcpu or -mtune + options, for example: -mcpu=cortex-a77 or -mtune=cortex-m35p. + * Support has been extended for the ACLE [57]data-processing + intrinsics to include 32-bit SIMD, saturating arithmetic, 16-bit + multiplication and other related intrinsics aimed at DSP algorithm + optimization. + * Support for -mpure-code in Thumb-1 (v6m) has been added: this + M-profile feature is no longer restricted to targets with MOVT. For + example, -mcpu=cortex-m0 now supports this option. + * Support for the [58]Armv8.1-M Mainline Architecture has been added. + + Armv8.1-M Mainline can be enabled by using the + -march=armv8.1-m.main command-line option. + * Support for the [59]MVE beta ACLE intrinsics has been added. These + intrinsics can be enabled by including the arm_mve.h header file + and passing the +mve or +mve.fp option extensions (for example: + -march=armv8.1-m.main+mve). + * Support for the Custom Datapath Extension beta ACLE [60]intrinsics + has been added. + * Support for Armv8.1-M Mainline Security Extensions architecture has + been added. The -mcmse option, when used in combination with an + Armv8.1-M Mainline architecture (for example: -march=armv8.1-m.main + -mcmse), now leads to the generation of improved code sequences + when changing security states. + + [61]AMD Radeon (GCN) + + * Code generation and in particular vectorization support have been + much improved. + + [62]ARC + + * The interrupt service routine functions save all used registers, + including extension registers and auxiliary registers used by Zero + Overhead Loops. + * Improve code size by using multiple short instructions instead of a + single long mov or ior instruction when its long immediate constant + is known. + * Fix usage of the accumulator register for ARC600. + * Fix issues with uncached attribute. + * Remove -mq-class option. + * Improve 64-bit integer addition and subtraction operations. + + [63]AVR + + * Support for the XMEGA-like devices + + ATtiny202, ATtiny204, ATtiny402, ATtiny404, ATtiny406, ATtiny804, + ATtiny806, ATtiny807, ATtiny1604, ATtiny1606, ATtiny1607, ATmega808, + ATmega809, ATmega1608, ATmega1609, ATmega3208, ATmega3209, + ATmega4808, ATmega4809 + has been added. + * A new command-line option -nodevicespecs has been added. It allows + to provide a custom device-specs file by means of + + avr-gcc -nodevicespecs -specs=my-spec-file + and without the need to provide options -B and -mmcu=. See [64]AVR + command-line options for details. This feature is also available in + GCC 9.3+ and GCC 8.4+. + * New command-line options -mdouble=[32,64] and -mlong-double=[32,64] + have been added. They allow to choose the size (in bits) of the + double and long double types, respectively. Whether or not the + mentioned layouts are available, whether the options act as a + multilib option, and the default for either option are controlled + by the new [65]AVR configure options --with-double= and + --with-long-double=. + * A new configure option --with-libf7= has been added. It controls to + which level avr-libgcc provides 64-bit floating point support by + means of [66]Libf7. + * A new configure option --with-double-comparison= has been added. + It's unlikely you need to set this option by hand. + + [67]IA-32/x86-64 + + * Support to expand __builtin_roundeven into the appropriate SSE 4.1 + instruction has been added. + * New ISA extension support for Intel ENQCMD was added to GCC. ENQCMD + intrinsics are available via the -menqcmd compiler switch. + * GCC now supports the Intel CPU named Cooperlake through + -march=cooperlake. The switch enables the AVX512BF16 ISA + extensions. + * GCC now supports the Intel CPU named Tigerlake through + -march=tigerlake. The switch enables the MOVDIRI MOVDIR64B + AVX512VP2INTERSECT ISA extensions. + + [68]MIPS + + * The mips*-*-linux* targets now mark object files with appropriate + GNU-stack note, facilitating use of non-executable stack hardening + on GNU/Linux. The soft-float targets have this feature enabled by + default, while for hard-float targets it is required for GCC to be + configured with --with-glibc-version=2.31 against glibc 2.31 or + later. + + [69]PowerPC / PowerPC64 / RS6000 + + * Many vector builtins have been listed as deprecated in the + [70]64-Bit ELF V2 ABI Specification for quite a number of years. + The vector builtins listed in Tables A.8 through A.10 are now + deprecated for GCC 10, and will likely be removed from support in + GCC 11. Note that this does not result in any loss of function. + These deprecated builtins generally provide somewhat nonsensical + argument lists (for example, mixing signed, unsigned, and bool + vector arguments arbitrarily), or are duplicate builtins that are + inconsistent with the expected naming scheme. We expect that this + will be unlikely to affect much if any code, and any required code + changes will be trivial. + + [71]PRU + + * A new back end targeting TI PRU I/O processors has been contributed + to GCC. + + [72]RISC-V + + * The riscv*-*-* targets now require GNU binutils version 2.30 or + later, to support new assembly instructions produced by GCC. + + [73]V850 + + * The ABI for V850 nested functions has been changed. Previously the + V850 port used %r20 for the static chain pointer, now the port uses + %r19. This corrects a long standing latent bug in the v850 port + where a call to a nested function would unexpectedly change the + value in %r20. + +[74]Operating Systems + +[75]Improvements for plugin authors + + * GCC diagnostics can now have a chain of events associated with + them, describing a path through the code that triggers the problem. + These can be printed by the diagnostics subsystem in various ways, + controlled by the [76]-fdiagnostics-path-format option, or captured + in JSON form via [77]-fdiagnostics-format=json. + * GCC diagnostics can now be associated with [78]CWE weakness + identifiers, which will appear on the standard error stream, and in + the JSON output from [79]-fdiagnostics-format=json. + +Other significant improvements + + * To allow inline expansion of both memcpy and memmove, the existing + movmem instruction patterns used for non-overlapping memory copies + have been renamed to cpymem. The movmem name is now used for + overlapping memory moves, consistent with the library functions + memcpy and memmove. + * For many releases, when GCC emits a warning it prints the option + controlling that warning. As of GCC 10, that option text is now a + clickable hyperlink for the documentation of that option (assuming + a [80]sufficiently capable terminal). This behavior can be + controlled via a new [81]-fdiagnostics-urls option (along with + various environment variables and heuristics documented with that + option). + +GCC 10.1 + + This is the [82]list of problem reports (PRs) from GCC's bug tracking + system that are known to be fixed in the 10.1 release. This list might + not be complete (that is, it is possible that some PRs that have been + fixed are not listed here). + +[83]GCC 10.2 + + This is the [84]list of problem reports (PRs) from GCC's bug tracking + system that are known to be fixed in the 10.2 release. This list might + not be complete (that is, it is possible that some PRs that have been + fixed are not listed here). + +[85]GCC 10.3 + + This is the [86]list of problem reports (PRs) from GCC's bug tracking + system that are known to be fixed in the 10.3 release. This list might + not be complete (that is, it is possible that some PRs that have been + fixed are not listed here). + + Target Specific Changes + + AArch64 + + * A bug with the Random Number intrinsics in the arm_acle.h header + that resulted in an incorrect status result being returned has been + fixed. + * GCC now supports the Fujitsu A64FX. The associated -mcpu and -mtune + options are -mcpu=a64fx and -mtune=a64fx respectively. In + particular, -mcpu=a64fx generates code for Armv8.2-A with SVE and + tunes the code for the A64FX. This includes tuning the SVE code, + although by default the code is still length-agnostic and so works + for all SVE implementations. Adding -msve-vector-bits=512 makes the + code specific to 512-bit SVE. + + x86-64 + + * GCC 10.3 supports AMD CPUs based on the znver3 core via + -march=znver3. + +[87]GCC 10.4 + + This is the [88]list of problem reports (PRs) from GCC's bug tracking + system that are known to be fixed in the 10.4 release. This list might + not be complete (that is, it is possible that some PRs that have been + fixed are not listed here). + + Target Specific Changes + + x86-64 + + * The x86-64 ABI of passing and returning structures with a 64-bit + integer vector changed in GCC 10.1 when MMX is disabled. Disabling + MMX no longer changes how they are passed nor returned. This ABI + change is now diagnosed with -Wpsabi. + +[89]GCC 10.5 + + This is the [90]list of problem reports (PRs) from GCC's bug tracking + system that are known to be fixed in the 10.5 release. This list might + not be complete (that is, it is possible that some PRs that have been + fixed are not listed here). + + + For questions related to the use of GCC, please consult these web + pages and the [91]GCC manuals. If that fails, the + [92]gcc-help@gcc.gnu.org mailing list might help. Comments on these + web pages and the development of GCC are welcome on our developer + list at [93]gcc@gcc.gnu.org. All of [94]our lists have public + archives. + + Copyright (C) [95]Free Software Foundation, Inc. Verbatim copying and + distribution of this entire article is permitted in any medium, + provided this notice is preserved. + + These pages are [96]maintained by the GCC team. Last modified + 2025-03-21. + +References + + 1. https://gcc.gnu.org/gcc-10/porting_to.html + 2. https://gcc.gnu.org/onlinedocs/index.html#current + 3. https://gcc.gnu.org/gcc-10/changes.html#empty_base + 4. https://www.mpfr.org/ + 5. https://gcc.gnu.org/gcc-10/changes.html#iterator_base + 6. https://gcc.gnu.org/gcc-10/changes.html#general + 7. https://gcc.gnu.org/onlinedocs/gcc-10.1.0/cpp/_005f_005fhas_005fbuiltin.html#g_t_005f_005fhas_005fbuiltin + 8. https://gcc.gnu.org/onlinedocs/gcc-10.1.0/gcc/Optimize-Options.html#index-fno-allocation-dce + 9. https://gcc.gnu.org/onlinedocs/gcc-10.1.0/gcc/Optimize-Options.html#index-fprofile-partial-training + 10. https://gcc.gnu.org/onlinedocs/gcc-10.1.0/gcc/Instrumentation-Options.html#index-fprofile-reproducible + 11. https://gcc.gnu.org/onlinedocs/gcc-10.1.0/gcc/Instrumentation-Options.html#index-fprofile-generate + 12. https://gcc.gnu.org/onlinedocs/gcc-10.1.0/gcc/Instrumentation-Options.html#index-fprofile-prefix-path + 13. https://gcc.gnu.org/onlinedocs/gcc-10.1.0/gcc/Static-Analyzer-Options.html + 14. https://gcc.gnu.org/onlinedocs/gcc-10.1.0/gcc/Optimize-Options.html#index-finline-functions + 15. https://gcc.gnu.org/onlinedocs/gcc-10.1.0/gcc/lto-dump.html + 16. https://facebook.github.io/zstd/ + 17. https://gcc.gnu.org/onlinedocs/gcc-10.1.0/gcc/Optimize-Options.html#index-fprofile-values + 18. https://gcc.gnu.org/gcc-10/changes.html#languages + 19. https://www.openacc.org/ + 20. https://gcc.gnu.org/wiki/OpenACC/Implementation Status#status-10 + 21. https://gcc.gnu.org/onlinedocs/gcc-10.1.0/libgomp/#toc-Enabling-OpenACC-1 + 22. https://www.openmp.org/specifications/ + 23. https://gcc.gnu.org/wiki/Offloading + 24. https://gcc.gnu.org/gcc-10/changes.html#c-family + 25. https://gcc.gnu.org/onlinedocs/gcc-10.1.0/gcc/Warning-Options.html#index-Wstring-compare + 26. https://gcc.gnu.org/onlinedocs/gcc-10.1.0/gcc/Warning-Options.html#index-Wzero-length-bounds + 27. https://gcc.gnu.org/onlinedocs/gcc-10.1.0/gcc/Warning-Options.html#index-Warray-bounds + 28. https://gcc.gnu.org/onlinedocs/gcc-10.1.0/gcc/Warning-Options.html#index-Wformat-overflow + 29. https://gcc.gnu.org/onlinedocs/gcc-10.1.0/gcc/Warning-Options.html#index-Wrestrict + 30. https://gcc.gnu.org/onlinedocs/gcc-10.1.0/gcc/Warning-Options.html#index-Wreturn-local-addr + 31. https://gcc.gnu.org/onlinedocs/gcc-10.1.0/gcc/Warning-Options.html#index-Wstringop-overflow + 32. https://gcc.gnu.org/onlinedocs/gcc-10.1.0/gcc/Warning-Options.html#index-Warith-conversion + 33. https://gcc.gnu.org/gcc-10/changes.html#c + 34. https://gcc.gnu.org/gcc-10/changes.html#cxx + 35. https://gcc.gnu.org/onlinedocs/gcc-10.1.0/gcc/C_002b_002b-Dialect-Options.html#index-Wmismatched-tags + 36. https://gcc.gnu.org/onlinedocs/gcc-10.1.0/gcc/C_002b_002b-Dialect-Options.html#index-Wredundant-tags + 37. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94383 + 38. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94711 + 39. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94707 + 40. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94704 + 41. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94706 + 42. https://gcc.gnu.org/gcc-10/changes.html#libstdcxx + 43. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92285 + 44. https://gcc.gnu.org/gcc-10/changes.html#d + 45. https://gcc.gnu.org/gcc-10/changes.html#fortran + 46. https://www.openmp.org/specifications/ + 47. https://gcc.gnu.org/gcc-10/changes.html#go + 48. https://gcc.gnu.org/gcc-10/changes.html#jit + 49. https://gcc.gnu.org/onlinedocs/jit/topics/compatibility.html#c.gcc_jit_version_major + 50. https://gcc.gnu.org/onlinedocs/jit/topics/compatibility.html#c.gcc_jit_version_minor + 51. https://gcc.gnu.org/onlinedocs/jit/topics/compatibility.html#c.gcc_jit_version_patchlevel + 52. https://gcc.gnu.org/onlinedocs/jit/topics/types.html#c.gcc_jit_context_new_bitfield + 53. https://gcc.gnu.org/gcc-10/changes.html#targets + 54. https://gcc.gnu.org/gcc-10/changes.html#arm-targets + 55. https://gcc.gnu.org/gcc-10/changes.html#aarch64 + 56. https://gcc.gnu.org/gcc-10/changes.html#arm + 57. https://developer.arm.com/documentation/101028/0009/Data-processing-intrinsics + 58. https://developer.arm.com/Architectures/M-Profile Architecture + 59. https://developer.arm.com/architectures/instruction-sets/intrinsics/ + 60. https://developer.arm.com/documentation/101028/0010/Custom-Datapath-Extension + 61. https://gcc.gnu.org/gcc-10/changes.html#amdgcn + 62. https://gcc.gnu.org/gcc-10/changes.html#arc + 63. https://gcc.gnu.org/gcc-10/changes.html#avr + 64. https://gcc.gnu.org/onlinedocs/gcc-10.1.0/gcc/AVR-Options.html#index-nodevicespecs + 65. https://gcc.gnu.org/install/configure.html#avr + 66. https://gcc.gnu.org/wiki/avr-gcc#Libf7 + 67. https://gcc.gnu.org/gcc-10/changes.html#x86 + 68. https://gcc.gnu.org/gcc-10/changes.html#mips + 69. https://gcc.gnu.org/gcc-10/changes.html#powerpc + 70. https://openpowerfoundation.org/?resource_lib=64-bit-elf-v2-abi-specification-power-architecture + 71. https://gcc.gnu.org/gcc-10/changes.html#pru + 72. https://gcc.gnu.org/gcc-10/changes.html#riscv + 73. https://gcc.gnu.org/gcc-10/changes.html#v850 + 74. https://gcc.gnu.org/gcc-10/changes.html#os + 75. https://gcc.gnu.org/gcc-10/changes.html#plugins + 76. https://gcc.gnu.org/onlinedocs/gcc-10.1.0/gcc/Diagnostic-Message-Formatting-Options.html#index-fdiagnostics-path-format + 77. https://gcc.gnu.org/onlinedocs/gcc-10.1.0/gcc/Diagnostic-Message-Formatting-Options.html#index-fdiagnostics-format + 78. https://cwe.mitre.org/ + 79. https://gcc.gnu.org/onlinedocs/gcc-10.1.0/gcc/Diagnostic-Message-Formatting-Options.html#index-fdiagnostics-format + 80. https://gist.github.com/egmontkob/eb114294efbcd5adb1944c9f3cb5feda + 81. https://gcc.gnu.org/onlinedocs/gcc-10.1.0/gcc/Diagnostic-Message-Formatting-Options.html#index-fdiagnostics-urls + 82. https://gcc.gnu.org/bugzilla/buglist.cgi?bug_status=RESOLVED&resolution=FIXED&target_milestone=10.0 + 83. https://gcc.gnu.org/gcc-10/changes.html#GCC10.2 + 84. https://gcc.gnu.org/bugzilla/buglist.cgi?bug_status=RESOLVED&resolution=FIXED&target_milestone=10.2 + 85. https://gcc.gnu.org/gcc-10/changes.html#GCC10.3 + 86. https://gcc.gnu.org/bugzilla/buglist.cgi?bug_status=RESOLVED&resolution=FIXED&target_milestone=10.3 + 87. https://gcc.gnu.org/gcc-10/changes.html#GCC10.4 + 88. https://gcc.gnu.org/bugzilla/buglist.cgi?bug_status=RESOLVED&resolution=FIXED&target_milestone=10.4 + 89. https://gcc.gnu.org/gcc-10/changes.html#GCC10.5 + 90. https://gcc.gnu.org/bugzilla/buglist.cgi?bug_status=RESOLVED&resolution=FIXED&target_milestone=10.5 + 91. https://gcc.gnu.org/onlinedocs/ + 92. mailto:gcc-help@gcc.gnu.org + 93. mailto:gcc@gcc.gnu.org + 94. https://gcc.gnu.org/lists.html + 95. https://www.fsf.org/ + 96. https://gcc.gnu.org/about.html +====================================================================== +http://gcc.gnu.org/gcc-9/index.html + GCC 9 Release Series + + (This release series is no longer supported.) + + May 27, 2022 + + The [1]GNU project and the GCC developers are pleased to announce the + release of GCC 9.5. + + This release is a bug-fix release, containing fixes for regressions in + GCC 9.4 relative to previous releases of GCC. + +Release History + + GCC 9.5 + May 27, 2022 ([2]changes, [3]documentation) + + GCC 9.4 + June 1, 2021 ([4]changes, [5]documentation) + + GCC 9.3 + Mar 12, 2020 ([6]changes, [7]documentation) + + GCC 9.2 + Aug 12, 2019 ([8]changes, [9]documentation) + + GCC 9.1 + May 3, 2019 ([10]changes, [11]documentation) + +References and Acknowledgements + + GCC used to stand for the GNU C Compiler, but since the compiler + supports several other languages aside from C, it now stands for the + GNU Compiler Collection. + + The GCC developers would like to thank the numerous people that have + contributed new features, improvements, bug fixes, and other changes as + well as test results to GCC. This [12]amazing group of volunteers is + what makes GCC successful. + + For additional information about GCC please refer to the [13]GCC + project web site or contact the [14]GCC development mailing list. + + To obtain GCC please use [15]our mirror sites or [16]our version + control system. + + + For questions related to the use of GCC, please consult these web + pages and the [17]GCC manuals. If that fails, the + [18]gcc-help@gcc.gnu.org mailing list might help. Comments on these + web pages and the development of GCC are welcome on our developer + list at [19]gcc@gcc.gnu.org. All of [20]our lists have public + archives. + + Copyright (C) [21]Free Software Foundation, Inc. Verbatim copying and + distribution of this entire article is permitted in any medium, + provided this notice is preserved. + + These pages are [22]maintained by the GCC team. Last modified + 2024-05-30. + +References + + 1. http://www.gnu.org/ + 2. https://gcc.gnu.org/gcc-9/changes.html + 3. https://gcc.gnu.org/onlinedocs/9.5.0/ + 4. https://gcc.gnu.org/gcc-9/changes.html + 5. https://gcc.gnu.org/onlinedocs/9.4.0/ + 6. https://gcc.gnu.org/gcc-9/changes.html + 7. https://gcc.gnu.org/onlinedocs/9.3.0/ + 8. https://gcc.gnu.org/gcc-9/changes.html + 9. https://gcc.gnu.org/onlinedocs/9.2.0/ + 10. https://gcc.gnu.org/gcc-9/changes.html + 11. https://gcc.gnu.org/onlinedocs/9.1.0/ + 12. https://gcc.gnu.org/onlinedocs/gcc-9.1.0/gcc/Contributors.html + 13. https://gcc.gnu.org/index.html + 14. mailto:gcc@gcc.gnu.org + 15. https://gcc.gnu.org/mirrors.html + 16. https://gcc.gnu.org/git.html + 17. https://gcc.gnu.org/onlinedocs/ + 18. mailto:gcc-help@gcc.gnu.org + 19. mailto:gcc@gcc.gnu.org + 20. https://gcc.gnu.org/lists.html + 21. https://www.fsf.org/ + 22. https://gcc.gnu.org/about.html +====================================================================== +http://gcc.gnu.org/gcc-9/changes.html + GCC 9 Release Series + Changes, New Features, and Fixes + + This page is a "brief" summary of some of the huge number of + improvements in GCC 9. You may also want to check out our [1]Porting to + GCC 9 page and the [2]full GCC documentation. + +Caveats + + * On Arm targets (arm*-*-*), [3]a bug in the implementation of the + procedure call standard (AAPCS) in the GCC 6, 7 and 8 releases has + been fixed: a structure containing a bit-field based on a 64-bit + integral type and where no other element in a structure required + 64-bit alignment could be passed incorrectly to functions. This is + an ABI change. If the option -Wpsabi is enabled (on by default) the + compiler will emit a diagnostic note for code that might be + affected. + * Support for a number of older systems and recently unmaintained or + untested target ports of GCC has been declared obsolete in GCC 9. + Unless there is activity to revive them, the next release of GCC + will have their sources permanently removed. + The following ports for individual systems on particular + architectures have been obsoleted: + + Solaris 10 (*-*-solaris2.10). Details can be found in the + [4]announcement. + + Cell Broadband Engine SPU (spu*-*-*). Details can be found in + the [5]announcement. + * A change to the C++ std::rotate algorithm in GCC 9.1.0 can cause + ABI incompatibilities with object files compiled with other + versions of GCC. If the std::rotate algorithm is called with an + empty range then it might cause a divide-by-zero error (as a SIGFPE + signal) and crash. The change has been reverted for GCC 9.2.0 and + future releases. For more details see [6]Bug 90920. The problem can + be avoided by recompiling any objects that might call std::rotate + with an empty range, so that the GCC 9.1.0 definition of + std::rotate is not used. + * The automatic template instantiation at link time ([7]-frepo) has + been deprecated and will be removed in a future release. + * The --with-default-libstdcxx-abi=gcc4-compatible configure option + is broken in the 9.1 and 9.2 releases, producing a shared library + with missing symbols (see [8]Bug 90361). As a workaround, configure + without that option and build GCC as normal, then edit the + installed headers to define the + _GLIBCXX_USE_CXX11_ABI macro to 0. + +[9]General Improvements + + The following GCC command line options have been introduced or + improved. + * All command line options that take a byte-size argument accept + 64-bit integers as well as standard SI and IEC suffixes such as kb + and KiB, MB and MiB, or GB and GiB denoting the corresponding + multiples of bytes. See [10]Invoking GCC for more. + * A new option [11]-flive-patching=[inline-only-static|inline-clone] + generates code suitable for live patching. At the same time it + provides multiple-level control over IPA optimizations. See the + user guide for more details. + * A new option, --completion, has been added to provide more fine + option completion in a shell. It is intended to be used by + Bash-completion. + * GCC's diagnostics now print source code with a left margin showing + line numbers, configurable with + [12]-fno-diagnostics-show-line-numbers. + GCC's diagnostics can also now label regions of the source code to + show pertinent information, such as the types within an expression. +$ g++ t.cc +t.cc: In function 'int test(const shape&, const shape&)': +t.cc:15:4: error: no match for 'operator+' (operand types are 'boxed_value' and 'boxed_value') + 14 | return (width(s1) * height(s1) + | ~~~~~~~~~~~~~~~~~~~~~~ + | | + | boxed_value<[...]> + 15 | + width(s2) * height(s2)); + | ^ ~~~~~~~~~~~~~~~~~~~~~~ + | | + | boxed_value<[...]> + + These labels can be disabled via [13]-fno-diagnostics-show-labels. + * A new option [14]-fdiagnostics-format=json has been introduced for + emitting diagnostics in a machine-readable format. + * The alignment-related options [15]-falign-functions, + [16]-falign-labels, [17]-falign-loops, and [18]-falign-jumps + received support for a secondary alignment (e.g. + -falign-loops=n:m:n2:m2). + * New pair of profiling options ([19]-fprofile-filter-files and + [20]-fprofile-exclude-files) has been added. The options help to + filter which source files are instrumented. + * AddressSanitizer generates more compact redzones for automatic + variables. That helps to reduce memory footprint of a sanitized + binary. + * Numerous improvements have been made to the output of + [21]-fopt-info. + Messages are now prefixed with optimized, missed, or note, rather + than the old behavior of all being prefixed with note. + The output from -fopt-info can now contain information on inlining + decisions: +$ g++ -c inline.cc -O2 -fopt-info-inline-all +inline.cc:24:11: note: Considering inline candidate void foreach(T, T, void (*)( +E)) [with T = char**; E = char*]/2. +inline.cc:24:11: optimized: Inlining void foreach(T, T, void (*)(E)) [with T = +char**; E = char*]/2 into int main(int, char**)/1. +inline.cc:19:12: missed: not inlinable: void inline_me(char*)/0 -> int std::pu +ts(const char*)/3, function body not available +inline.cc:13:8: optimized: Inlined void inline_me(char*)/4 into int main(int, c +har**)/1 which now has time 127.363637 and size 11, net change of +0. +Unit growth for small function inlining: 16->16 (0%) + +Inlined 2 calls, eliminated 1 functions + + + The output from the vectorizer has been rationalized so that failed + attempts to vectorize a loop are displayed in the form + [LOOP-LOCATION]: couldn't vectorize this loop + [PROBLEM-LOCATION]: because of [REASON] + + rather than an exhaustive log of all decisions made by the + vectorizer. For example: +$ gcc -c v.c -O3 -fopt-info-all-vec +v.c:7:3: missed: couldn't vectorize loop +v.c:10:7: missed: statement clobbers memory: __asm__ __volatile__("" : : : "me +mory"); +v.c:3:6: note: vectorized 0 loops in function. +v.c:10:7: missed: statement clobbers memory: __asm__ __volatile__("" : : : "me +mory"); + + The old behavior can be obtained via a new -internals suboption of + -fopt-info. + * A new option, [22]-fsave-optimization-record has been added, which + writes a SRCFILE.opt-record.json.gz file describing the + optimization decisions made by GCC. This is similar to the output + of -fopt-info, but with additional metadata such as the inlining + chain, and profile information (if available). + * Inter-procedural propagation of stack alignment can now be + controlled by [23]-fipa-stack-alignment. + * Propagation of addressability, readonly, and writeonly flags on + static variables can now be controlled by + [24]-fipa-reference-addressable. + + The following built-in functions have been introduced. + * [25]__builtin_expect_with_probability to provide branch prediction + probability hints to the optimizer. + * [26]__builtin_has_attribute determines whether a function, type, or + variable has been declared with some attribute. + * [27]__builtin_speculation_safe_value can be used to help mitigate + against unsafe speculative execution. + + The following attributes have been introduced. + * The [28]copy function attribute has been added. The attribute can + also be applied to type definitions and to variable declarations. + + A large number of improvements to code generation have been made, + including but not limited to the following. + * Switch expansion has been improved by using a different strategy + (jump table, bit test, decision tree) for a subset of switch cases. + * A linear function expression defined as a switch statement can be + transformed by [29]-ftree-switch-conversion. For example: + +int +foo (int how) +{ + switch (how) { + case 2: how = 205; break; + case 3: how = 305; break; + case 4: how = 405; break; + case 5: how = 505; break; + case 6: how = 605; break; + } + return how; +} + + can be transformed into 100 * how + 5 (for values defined in the + switch statement). + * Inter-procedural optimization improvements: + + Inliner defaults were tuned to better suit modern C++ + codebases, especially when built with link time-optimizations. + New parameters max-inline-insns-small, max-inline-insns-size, + uninlined-function-insns, uninlined-function-time, + uninlined-thunk-insns, and uninlined-thunk-time were added. + + Hot/cold partitioning is now more precise and aggressive. + + Improved scalability for very large translation units + (especially when link-time optimizing large programs). + * Profile driven optimization improvements: + + [30]-fprofile-use now enables [31]-fversion-loops-for-strides, + [32]-floop-interchange, [33]-floop-unroll-and-jam, + [34]-ftree-loop-distribution. + + Streaming of counter histograms was removed, which reduces the + size of profile files. Histograms are computed on the fly with + link-time optimization. + + The parameter hot-bb-count-ws-permille was reduced from 999 to + 990 to account for more precise histograms. + * Link-time optimization improvements: + + Types are now simplified prior to streaming resulting in + significant reductions of LTO object file sizes and link-time + memory use as well as improvements of link-time parallelism. + + The default number of partitions (--param lto-partitions) was + increased from 32 to 128 enabling effective use of CPUs with + more than 32 hyperthreads. --param + lto-max-streaming-parallelism can now be used to control the + number of streaming processes. + + Warnings on C++ One Decl Rule violations (-Wodr) are now more + informative and produce fewer redundant results. + Overall compile time of Firefox 66 and LibreOffice 6.2.3 on an + 8-core machine was reduced by about 5% compared to GCC 8.3, and the + size of LTO object files by 7%. LTO link time improves by 11% on an + 8-core machine and scales significantly better for more parallel + build environments. The serial stage of the link-time optimization + is 28% faster consuming 20% less memory. The parallel stage now + scales to up to 128 partitions rather than 32 and reduces memory + use for every worker by 30%. + + The following improvements to the gcov command-line utility have been + made. + * The gcov tool received a new option [35]--use-hotness-colors (-q) + that can provide perf-like coloring of hot functions. + * The gcov tool has changed its intermediate format to a new JSON + format. + +[36]New Languages and Language specific improvements + + [37]OpenACC support in C, C++, and Fortran continues to be maintained + and improved. Most of the OpenACC 2.5 specification is implemented. See + the [38]implementation status section on the OpenACC wiki page for + further information. + + [39]C family + + * Version 5.0 of the [40]OpenMP specification is now partially + supported in the C and C++ compilers. For details which features of + OpenMP 5.0 are and which are not supported in the GCC 9 release see + [41]this mail. + * New extensions: + + [42]__builtin_convertvector built-in for vector conversions + has been added. + * New warnings: + + [43]-Waddress-of-packed-member, enabled by default, warns + about an unaligned pointer value from the address of a packed + member of a struct or union. + * Enhancements to existing warnings: + + [44]-Warray-bounds detects more instances of out-of-bounds + indices. + + [45]-Wattribute-alias also detects attribute mismatches + between alias declarations and their targets, in addition to + mismatches between their types. + + [46]-Wformat-overflow and [47]-Wformat-truncation have been + extended to all formatted input/output functions (where + applicable) and enhanced to detect a subset of instances of + reading past the end of unterminated constant character arrays + in %s directives. + + [48]-Wmissing-attributes detects instances of missing function + attributes on declarations of aliases and weak references. + + [49]-Wstringop-truncation also detects a subset of instances + of reading past the end of unterminated constant character + arrays, + * If a macro is used with the wrong argument count, the C and C++ + front ends now show the definition of that macro via a note. + * The spelling corrector now considers transposed letters, and the + threshold for similarity has been tightened, to avoid nonsensical + suggestions. + + [50]C + + * There is now experimental support for -std=c2x, to select support + for the upcoming C2X revision of the ISO C standard. This standard + is in the early stages of development and the only feature + supported in GCC 9 is _Static_assert with a single argument + (support for _Static_assert with two arguments was added in C11 and + GCC 4.6). There are also new options -std=gnu2x, for C2X with GNU + extensions, and -Wc11-c2x-compat, to warn for uses of features + added in C2X (such warnings are also enabled by use of -Wpedantic + if not using -std=c2x or -std=gnu2x). + * New warnings: + + [51]-Wabsolute-value warns for calls to standard functions + that compute the absolute value of an argument when a more + appropriate standard function is available. For example, + calling abs(3.14) triggers the warning because the appropriate + function to call to compute the absolute value of a double + argument is fabs. The option also triggers warnings when the + argument in a call to such a function has an unsigned type. + This warning can be suppressed with an explicit type cast and + it is also enabled by -Wextra. + + [52]C++ + + * New warnings: + + [53]-Wdeprecated-copy, implied by -Wextra, warns about the + C++11 deprecation of implicitly declared copy constructor and + assignment operator if one of them is user-provided. + -Wdeprecated-copy-dtor also warns if the destructor is + user-provided, as specified in C++11. + + [54]-Winit-list-lifetime, on by default, warns about uses of + std::initializer_list that are likely to result in a dangling + pointer, such as returning or assigning from a temporary list. + + [55]-Wredundant-move, implied by -Wextra, warns about + redundant calls to std::move. + + [56]-Wpessimizing-move, implied by -Wall, warns when a call to + std::move prevents copy elision. + + [57]-Wclass-conversion, on by default, warns when a conversion + function will never be called due to the type it converts to. + * The C++ front end has experimental support for some of the upcoming + C++2a draft features with the -std=c++2a or -std=gnu++2a flags, + including range-based for statements with initializer, default + constructible and assignable stateless lambdas, lambdas in + unevaluated contexts, language support for empty data members, + allowing pack expansion in lambda init-capture, likely and unlikely + attributes, class types in non-type template parameters, allowing + virtual function calls in constant expressions, explicit(bool), + std::is_constant_evaluated, nested inline namespaces, etc. For a + full list of new features, see [58]the C++ status page. + * The C++ front end now preserves source locations for literals, + id-expression, and mem-initializer for longer. For example it is + now able to pin-point the pertinent locations for bad + initializations such as these +$ g++ -c bad-inits.cc +bad-inits.cc:10:14: error: cannot convert 'json' to 'int' in initialization + 10 | { 3, json::object }, + | ~~~~~~^~~~~~ + | | + | json +bad-inits.cc:14:31: error: initializer-string for array of chars is too long [-f +permissive] + 14 | char buffers[3][5] = { "red", "green", "blue" }; + | ^~~~~~~ +bad-inits.cc: In constructor 'X::X()': +bad-inits.cc:17:13: error: invalid conversion from 'int' to 'void*' [-fpermissiv +e] + 17 | X() : one(42), two(42), three(42) + | ^~ + | | + | int + + rather than emitting the error at the final closing parenthesis or + brace. + * Error-reporting of overload resolution has been special-cased to + make the case of a single failed candidate easier to read. For + example: +$ g++ param-type-mismatch.cc +param-type-mismatch.cc: In function 'int test(int, const char*, float)': +param-type-mismatch.cc:8:32: error: cannot convert 'const char*' to 'const char* +*' + 8 | return foo::member_1 (first, second, third); + | ^~~~~~ + | | + | const char* +param-type-mismatch.cc:3:46: note: initializing argument 2 of 'static int foo: +:member_1(int, const char**, float)' + 3 | static int member_1 (int one, const char **two, float three); + | ~~~~~~~~~~~~~^~~ + + highlights both the problematic argument, and the parameter that it + can't be converted to. + * Diagnostics involving binary operators now use color to distinguish + the two operands, and label them separately (as per the example of + source labelling above). + * Diagnostics involving function calls now highlight the pertinent + parameter of the declaration in more places. +$ g++ bad-conversion.cc +bad-conversion.cc: In function 'void caller()': +bad-conversion.cc:9:14: error: cannot convert 'bool' to 'void*' + 9 | callee (0, false, 2); + | ^~~~~ + | | + | bool +bad-conversion.cc:3:19: note: initializing argument 2 of 'void callee(int, voi +d*, int)' + 3 | void callee (int, void *, int) + | ^~~~~~ + + * The C++ front end's implementation of [59]-Wformat now shows + precise locations within string literals, and underlines the + pertinent arguments at bogus call sites (the C front end has been + doing this since GCC 7). For example: +$ g++ -c bad-printf.cc -Wall +bad-printf.cc: In function 'void print_field(const char*, float, long int, long +int)': +bad-printf.cc:6:17: warning: field width specifier '*' expects argument of type +'int', but argument 3 has type 'long int' [-Wformat=] + 6 | printf ("%s: %*ld ", fieldname, column - width, value); + | ~^~~ ~~~~~~~~~~~~~~ + | | | + | int long int +bad-printf.cc:6:19: warning: format '%ld' expects argument of type 'long int', b +ut argument 4 has type 'double' [-Wformat=] + 6 | printf ("%s: %*ld ", fieldname, column - width, value); + | ~~~^ ~~~~~ + | | | + | long int double + | %*f + + * The C++ front end has gained new fix-it hints for forgetting the + return *this; needed by various C++ operators: +$ g++ -c operator.cc +operator.cc: In member function 'boxed_ptr& boxed_ptr::operator=(const boxed_ptr +&)': +operator.cc:7:3: warning: no return statement in function returning non-void [-W +return-type] + 6 | m_ptr = other.m_ptr; + +++ |+ return *this; + 7 | } + | ^ + + for when the compiler needs a typename: +$ g++ -c template.cc +template.cc:3:3: error: need 'typename' before 'Traits::type' because 'Traits' i +s a dependent scope + 3 | Traits::type type; + | ^~~~~~ + | typename + + when trying to use an accessor member as if it were a data member: +$ g++ -c fncall.cc +fncall.cc: In function 'void hangman(const mystring&)': +fncall.cc:12:11: error: invalid use of member function 'int mystring::get_length +() const' (did you forget the '()' ?) + 12 | if (str.get_length > 0) + | ~~~~^~~~~~~~~~ + | () + + for C++11's scoped enums: +$ g++ -c enums.cc +enums.cc: In function 'void json::test(const json::value&)': +enums.cc:12:26: error: 'STRING' was not declared in this scope; did you mean 'js +on::kind::STRING'? + 12 | if (v.get_kind () == STRING) + | ^~~~~~ + | json::kind::STRING +enums.cc:3:44: note: 'json::kind::STRING' declared here + 3 | enum class kind { OBJECT, ARRAY, NUMBER, STRING, TRUE, FALSE, NULL_ }; + | ^~~~~~ + + and a tweak to integrate the suggestions about misspelled members + with that for accessors: +$ g++ -c accessor-fixit.cc +accessor-fixit.cc: In function 'int test(t*)': +accessor-fixit.cc:17:15: error: 'class t' has no member named 'ratio'; did you m +ean 'int t::m_ratio'? (accessible via 'int t::get_ratio() const') + 17 | return ptr->ratio; + | ^~~~~ + | get_ratio() + + In addition, various diagnostics in the C++ front-end have been + streamlined by consolidating the suggestion into the initial error, + rather than emitting a follow-up note: +$ g++ typo.cc +typo.cc:5:13: error: 'BUFSIZE' was not declared in this scope; did you mean 'BUF +_SIZE'? + 5 | uint8_t buf[BUFSIZE]; + | ^~~~~~~ + | BUF_SIZE + + [60]Runtime Library (libstdc++) + + * Improved support for C++17, including: + + The C++17 implementation is no longer experimental. + + Parallel algorithms and (requires [61]Thread + Building Blocks 2018 or newer). + + . + + Using the types and functions in does not require + linking with -lstdc++fs now. + * Improved experimental support for C++2a, including: + + Type traits std::remove_cvref, std::unwrap_reference, + std::unwrap_decay_ref, std::is_nothrow_convertible, and + std::type_identity. + + Headers and . + + Uniform container erasure (std::erase_if). + + contains member of maps and sets. + + String prefix and suffix checking (starts_with, ends_with). + + Functions std::midpoint and std::lerp for interpolation. + + std::bind_front. + + std::visit. + + std::assume_aligned. + + Uses-allocator construction utilities. + + std::pmr::polymorphic_allocator. + + Library support for char8_t type. + + Destroying delete. + + std::is_constant_evaluated() function. + * Support for opening file streams with wide character paths on + Windows + * Incomplete support for the C++17 Filesystem library and the + Filesystem TS on Windows. + * Incomplete, experimental support for the Networking TS. + + [62]D + + * Support for the D programming language has been added to GCC, + implementing version 2.076 of the language and run-time library. + + [63]Fortran + + * Asynchronous I/O is now fully supported. The program needs to be + linked against the pthreads library to use it, otherwise the I/O is + done synchronously. For systems which do not support POSIX + condition variables, such as AIX, all I/O is still done + synchronously. + * The BACK argument for MINLOC and MAXLOC has been implemented. + * The FINDLOC intrinsic function has been implemented. + * The IS_CONTIGUOUS intrinsic function has been implemented. + * Direct access to the real and imaginary parts of a complex variable + via c%re and c%im has been implemented. + * Type parameter inquiry via str%len and a%kind has been implemented. + * C descriptors and the ISO_Fortran_binding.h source file have been + implemented. + * The MAX and MIN intrinsics are no longer guaranteed to return any + particular value in case one of the arguments is a NaN. Note that + this conforms to the Fortran standard and to what other Fortran + compilers do. If there is a need to handle that case in some + specific way, one needs to explicitly check for NaN's before + calling MAX or MIN, e.g. by using the IEEE_IS_NAN function from the + intrinsic module IEEE_ARITHMETIC. + * A new command-line option [64]-fdec-include, set also by the + [65]-fdec option, has been added to increase compatibility with + legacy code. With this option, an INCLUDE directive is also parsed + as a statement, which allows the directive to be spread across + multiple source lines with line continuations. + * A new [66]BUILTIN directive, has been added. The purpose of the + directive is to provide an API between the GCC compiler and the GNU + C Library which would define vector implementations of math + routines. + + [67]Go + + * GCC 9 provides a complete implementation of the Go 1.12.2 user + packages. + +[68]libgccjit + + * The libgccjit API gained a new entry point: + [69]gcc_jit_context_add_driver_option. + +[70]New Targets and Target Specific Improvements + + [71]AArch64 & Arm + + * Support has been added for the following processors (GCC + identifiers in parentheses): + + Arm Cortex-A76 (cortex-a76). + + Arm Cortex-A55/Cortex-A76 DynamIQ big.LITTLE + (cortex-a76.cortex-a55). + + Arm Neoverse N1 (neoverse-n1). + The GCC identifiers can be used as arguments to the -mcpu or -mtune + options, for example: -mcpu=cortex-a76 or + -mtune=cortex-a76.cortex-a55 or as arguments to the equivalent + target attributes and pragmas. + * The Armv8.3-A complex number instructions are now supported via + intrinsics when the option -march=armv8.3-a or equivalent is + specified. For the half-precision floating-point variants of these + instructions use the architecture extension flag +fp16, e.g. + -march=armv8.3-a+fp16. + The intrinsics are defined by the ACLE specification. + * The Armv8.5-A architecture is now supported through the + -march=armv8.5-a option. + * The Armv8.5-A architecture also adds some security features that + are optional to all older architecture versions. These are now + supported and only affect the assembler. + + Speculation Barrier instruction through the -march=armv8-a+sb + option. + + Execution and Data Prediction Restriction instructions through + the -march=armv8-a+predres option. + + Speculative Store Bypass Safe instruction through the + -march=armv8-a+ssbs option. This does not require a compiler + option for Arm and thus -march=armv8-a+ssbs is an + AArch64-specific option. + + AArch64 specific + + * Support has been added for the Arm Neoverse E1 processor + (-mcpu=neoverse-e1). + * The AArch64 port now has support for stack clash protection using + the [72]-fstack-clash-protection option. The probing interval/guard + size can be set by using --param + stack-clash-protection-guard-size=12|16. The value of this + parameter must be in bytes represented as a power of two. The two + supported values for this parameter are 12 (for a 4KiB size, 2^12) + and 16 (for a 64KiB size, 2^16). The default value is 16 (64Kb) and + can be changed at configure time using the flag + --with-stack-clash-protection-guard-size=12|16. + * The option -msign-return-address= has been deprecated. This has + been replaced by the new -mbranch-protection= option. This new + option can now be used to enable the return address signing as well + as the new Branch Target Identification feature of Armv8.5-A + architecture. For more information on the arguments accepted by + this option, please refer to [73]AArch64-Options. + * The following optional extensions to Armv8.5-A architecture are now + supported and only affect the assembler. + + Random Number Generation instructions through the + -march=armv8.5-a+rng option. + + Memory Tagging Extension through the -march=armv8.5-a+memtag + option. + + Arm specific + + * Support for the deprecated Armv2 and Armv3 architectures and their + variants has been removed. Their corresponding -march values and + the -mcpu options that used these architectures have been removed. + * Support for the Armv5 and Armv5E architectures (which have no known + implementations) has been removed. Note that Armv5T, Armv5TE and + Armv5TEJ architectures remain supported. + * Corrected FPU configurations for Cortex-R7 and Cortex-R8 when using + their respective -mcpu options. + + [74]AMD GCN + + * A new back end targeting AMD GCN GPUs has been contributed to GCC. + The implementation is currently limited to compiling + single-threaded, stand-alone programs. Future versions will add + support for offloading multi-threaded kernels via OpenMP and + OpenACC. The following devices are supported (GCC identifiers in + parentheses): + + Fiji (fiji). + + Vega 10 (gfx900). + + [75]ARC + + * LRA is now on by default for the ARC target. This can be controlled + by -mlra. + * Add support for frame code-density and branch-and-index + instructions. + + [76]C-SKY + + * A new back end targeting C-SKY V2 processors has been contributed + to GCC. + + [77]IA-32/x86-64 + + * Support of Intel MPX (Memory Protection Extensions) has been + removed. + * New ISA extension support for Intel PTWRITE was added to GCC. + PTWRITE intrinsics are available via the -mptwrite compiler switch. + * GCC now supports the Intel CPU named Cascade Lake with AVX512 + extensions through -march=cascadelake. The switch enables the + following ISA extensions: AVX512F, AVX512VL, AVX512CD, AVX512BW, + AVX512DQ, AVX512VNNI. + + [78]MIPS + + * The Loongson loongson-mmi and loongson-ext extensions have been + split from loongson3a: + + loongson-mmi contains the Loongson MMI (MultiMedia extensions + Instructions). + + loongson-ext contains the Loongson EXT (EXTensions + instructions). + * The Loongson EXT2 (EXTensions R2 instructions) are now supported. + + loongson-ext2 contains the Loongson EXT2 instructions. + Command-line options-m[no-]loongson-mmi, -m[no-]loongson-ext, and + -m[no-]loongson-ext2 enable or disable those extensions. + * Support has been added for the following processors (GCC + identifiers in parentheses): + + Loongson 3A1000 (gs464) which enables loongson-mmi, + loongson-ext by default. + + Loongson 3A2000/3A3000 (gs464e) which enables loongson-mmi, + loongson-ext, loongson-ext2 by default. + + Loongson 2K1000 (gs264e) which enables loongson-ext, + loongson-ext2, msa by default. + The GCC identifiers can be used as arguments to the -mcpu and + -mtune options (as in -mcpu=gs464 or -mtune=gs464e) or as arguments + to the equivalent target attributes and pragmas. + + [79]OpenRISC + + * A new back end targeting OpenRISC processors has been contributed + to GCC. + + [80]S/390, System z, IBM z Systems + + * Support for the arch13 architecture has been added. When using the + -march=arch13 option, the compiler will generate code making use of + the new instructions introduced with the vector enhancement + facility 2 and the miscellaneous instruction extension facility 2. + The -mtune=arch13 option enables arch13 specific instruction + scheduling without making use of new instructions. + * Builtins for the new vector instructions have been added and can be + enabled using the -mzvector option. + * Support for ESA architecture machines g5 and g6 is deprecated since + GCC 6.1.0 and has been removed now. + * When compiling with -march=z14 or higher GCC emits alignments hints + on the vector load/store instructions (8 or 16 byte). + * Functions now have a default alignment of 16 bytes. This helps with + branch prediction effects. + * -mfentry is now supported. As well as the mcount mechanism the + __fentry__ is called before the function prologue. However, since + just a single instruction is required to call __fentry__ the call + sequence imposes a smaller overhead than mcount (4 instructions). + The produced code is compatible only with newer glibc versions, + which provide the __fentry__ symbol and do not clobber r0 when + resolving lazily bound functions. -mfentry is only supported when + generating 64-bit code and does not work with nested C functions. + * The -mnop-mcount option can be used to emit NOP instructions + instead of an mcount or fentry call stub. + * With the -mrecord-mcount option a __mcount_loc section is generated + containing pointers to each profiling call stub. This is useful for + automatically patching in and out calls. + +[81]Operating Systems + + [82]Solaris + + * g++ now unconditionally enables large file support when compiling + 32-bit code. + * Support for the AddressSanitizer and UndefinedBehaviorSanitizer has + been merged from LLVM. For the moment, this only works for 32-bit + code on both SPARC and x86. + * An initial port of the D runtime library has been completed on + Solaris 11/x86. It requires the use of GNU as. Solaris 11/SPARC + support is still work-in-progress. + + [83]Windows + + * A C++ Microsoft ABI bitfield layout bug, [84]PR87137 has been + fixed. A non-field declaration could cause the current bitfield + allocation unit to be completed, incorrectly placing a following + bitfield into a new allocation unit. The Microsoft ABI is selected + for: + + Mingw targets + + PowerPC, IA-32 or x86-64 targets when the -mms-bitfields + option is specified, or __attribute__((ms_struct)) is used + + SuperH targets when the -mhitachi option is specified, or + __attribute__((renesas)) is used + +[85]Improvements for plugin authors + + * GCC's diagnostic subsystem now has a way to logically group + together related diagnostics, auto_diagnostic_group. Such + diagnostics will be nested by the output of + [86]-fdiagnostics-format=json. + * GCC now has a set of [87]user experience guidelines for GCC, with + information and advice on implementing new diagnostics. + +Other significant improvements + + * GCC's internal "selftest" suite now runs for C++ as well as C (in + debug builds of the compiler). + +[88]GCC 9.1 + + This is the [89]list of problem reports (PRs) from GCC's bug tracking + system that are known to be fixed in the 9.1 release. This list might + not be complete (that is, it is possible that some PRs that have been + fixed are not listed here). + +[90]GCC 9.2 + + This is the [91]list of problem reports (PRs) from GCC's bug tracking + system that are known to be fixed in the 9.2 release. This list might + not be complete (that is, it is possible that some PRs that have been + fixed are not listed here). + +[92]GCC 9.3 + + This is the [93]list of problem reports (PRs) from GCC's bug tracking + system that are known to be fixed in the 9.3 release. This list might + not be complete (that is, it is possible that some PRs that have been + fixed are not listed here). + +[94]GCC 9.4 + + This is the [95]list of problem reports (PRs) from GCC's bug tracking + system that are known to be fixed in the 9.4 release. This list might + not be complete (that is, it is possible that some PRs that have been + fixed are not listed here). + + Target Specific Changes + + AArch64 + + * The option -moutline-atomics has been added to aid deployment of + the Large System Extensions (LSE) on GNU/Linux systems built with a + baseline architecture targeting Armv8-A. When the option is + specified code is emitted to detect the presence of LSE + instructions at run time and use them for standard atomic + operations. For more information please refer to the documentation. + * GCC now supports the Fujitsu A64FX. The associated -mcpu and -mtune + options are -mcpu=a64fx and -mtune=a64fx respectively. In + particular, -mcpu=a64fx generates code for Armv8.2-A with SVE and + tunes the code for the A64FX. This includes tuning the SVE code, + although by default the code is still length-agnostic and so works + for all SVE implementations. Adding -msve-vector-bits=512 makes the + code specific to 512-bit SVE. + +[96]GCC 9.5 + + This is the [97]list of problem reports (PRs) from GCC's bug tracking + system that are known to be fixed in the 9.5 release. This list might + not be complete (that is, it is possible that some PRs that have been + fixed are not listed here). + + + For questions related to the use of GCC, please consult these web + pages and the [98]GCC manuals. If that fails, the + [99]gcc-help@gcc.gnu.org mailing list might help. Comments on these + web pages and the development of GCC are welcome on our developer + list at [100]gcc@gcc.gnu.org. All of [101]our lists have public + archives. + + Copyright (C) [102]Free Software Foundation, Inc. Verbatim copying and + distribution of this entire article is permitted in any medium, + provided this notice is preserved. + + These pages are [103]maintained by the GCC team. Last modified + 2025-01-31. + +References + + 1. https://gcc.gnu.org/gcc-9/porting_to.html + 2. https://gcc.gnu.org/onlinedocs/index.html#current + 3. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88469 + 4. https://gcc.gnu.org/ml/gcc/2018-10/msg00139.html + 5. https://gcc.gnu.org/ml/gcc/2019-04/msg00023.html + 6. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90920 + 7. https://gcc.gnu.org/onlinedocs/gcc-9.1.0/gcc/C_002b_002b-Dialect-Options.html#index-frepo + 8. https://gcc.gnu.org/PR90361 + 9. https://gcc.gnu.org/gcc-9/changes.html#general + 10. https://gcc.gnu.org/onlinedocs/gcc-9.1.0/gcc/Invoking-GCC.html#Invoking-GCC + 11. https://gcc.gnu.org/onlinedocs/gcc-9.1.0/gcc/Optimize-Options.html#index-flive-patching + 12. https://gcc.gnu.org/onlinedocs/gcc-9.1.0/gcc/Diagnostic-Message-Formatting-Options.html#index-fno-diagnostics-show-line-numbers + 13. https://gcc.gnu.org/onlinedocs/gcc-9.1.0/gcc/Diagnostic-Message-Formatting-Options.html#index-fno-diagnostics-show-labels + 14. https://gcc.gnu.org/onlinedocs/gcc-9.1.0/gcc/Diagnostic-Message-Formatting-Options.html#index-fdiagnostics-format + 15. https://gcc.gnu.org/onlinedocs/gcc-9.1.0/gcc/Optimize-Options.html#index-falign-functions + 16. https://gcc.gnu.org/onlinedocs/gcc-9.1.0/gcc/Optimize-Options.html#index-falign-labels + 17. https://gcc.gnu.org/onlinedocs/gcc-9.1.0/gcc/Optimize-Options.html#index-falign-loops + 18. https://gcc.gnu.org/onlinedocs/gcc-9.1.0/gcc/Optimize-Options.html#index-falign-jumps + 19. https://gcc.gnu.org/onlinedocs/gcc-9.1.0/gcc/Instrumentation-Options.html#index-fprofile-filter-files + 20. https://gcc.gnu.org/onlinedocs/gcc-9.1.0/gcc/Instrumentation-Options.html#index-fprofile-exclude-files + 21. https://gcc.gnu.org/onlinedocs/gcc-9.1.0/gcc/Developer-Options.html#index-fopt-info + 22. https://gcc.gnu.org/onlinedocs/gcc-9.1.0/gcc/Developer-Options.html#index-fsave-optimization-record + 23. https://gcc.gnu.org/onlinedocs/gcc-9.1.0/gcc/Optimize-Options.html#index-fipa-stack-alignment + 24. https://gcc.gnu.org/onlinedocs/gcc-9.1.0/gcc/Optimize-Options.html#index-fipa-reference-addressable + 25. https://gcc.gnu.org/onlinedocs/gcc-9.1.0/gcc/Other-Builtins.html#index-_005f_005fbuiltin_005fexpect_005fwith_005fprobability + 26. https://gcc.gnu.org/onlinedocs/gcc-9.1.0/gcc/Other-Builtins.html#index-_005f_005fbuiltin_005fhas_005fattribute-1 + 27. https://gcc.gnu.org/onlinedocs/gcc-9.1.0/gcc/Other-Builtins.html#index-_005f_005fbuiltin_005fspeculation_005fsafe_005fvalue-1 + 28. https://gcc.gnu.org/onlinedocs/gcc-9.1.0/gcc/Common-Function-Attributes.html#index-copy-function-attribute + 29. https://gcc.gnu.org/onlinedocs/gcc-9.1.0/gcc/Optimize-Options.html#index-ftree-switch-conversion + 30. https://gcc.gnu.org/onlinedocs/gcc-9.1.0/gcc/Optimize-Options.html#index-fprofile-use + 31. https://gcc.gnu.org/onlinedocs/gcc-9.1.0/gcc/Optimize-Options.html#index-fversion-loops-for-strides + 32. https://gcc.gnu.org/onlinedocs/gcc-9.1.0/gcc/Optimize-Options.html#index-floop-interchange + 33. https://gcc.gnu.org/onlinedocs/gcc-9.1.0/gcc/Optimize-Options.html#index-floop-unroll-and-jam + 34. https://gcc.gnu.org/onlinedocs/gcc-9.1.0/gcc/Optimize-Options.html#index-ftree-loop-distribution + 35. https://gcc.gnu.org/onlinedocs/gcc-9.1.0/gcc/Invoking-Gcov.html#Invoking-Gcov + 36. https://gcc.gnu.org/gcc-9/changes.html#languages + 37. https://www.openacc.org/ + 38. https://gcc.gnu.org/wiki/OpenACC/Implementation Status#status-9 + 39. https://gcc.gnu.org/gcc-9/changes.html#c-family + 40. https://www.openmp.org/specifications/ + 41. https://gcc.gnu.org/ml/gcc-patches/2018-11/msg00628.html + 42. https://gcc.gnu.org/onlinedocs/gcc-9.1.0/gcc/Vector-Extensions.html#index-_005f_005fbuiltin_005fconvertvector + 43. https://gcc.gnu.org/onlinedocs/gcc-9.1.0/gcc/Warning-Options.html#index-Waddress-of-packed-member + 44. https://gcc.gnu.org/onlinedocs/gcc-9.1.0/gcc/Warning-Options.html#index-Warray-bounds + 45. https://gcc.gnu.org/onlinedocs/gcc-9.1.0/gcc/Warning-Options.html#index-Wattribute-alias + 46. https://gcc.gnu.org/onlinedocs/gcc-9.1.0/gcc/Warning-Options.html#index-Wformat-overflow + 47. https://gcc.gnu.org/onlinedocs/gcc-9.1.0/gcc/Warning-Options.html#index-Wformat-truncation + 48. https://gcc.gnu.org/onlinedocs/gcc-9.1.0/gcc/Warning-Options.html#index-Wmissing-attributes + 49. https://gcc.gnu.org/onlinedocs/gcc-9.1.0/gcc/Warning-Options.html#index-Wstringop-truncation + 50. https://gcc.gnu.org/gcc-9/changes.html#c + 51. https://gcc.gnu.org/onlinedocs/gcc-9.1.0/gcc/Warning-Options.html#index-Wabsolute-value + 52. https://gcc.gnu.org/gcc-9/changes.html#cxx + 53. https://gcc.gnu.org/onlinedocs/gcc-9.1.0/gcc/C_002b_002b-Dialect-Options.html#index-Wdeprecated-copy + 54. https://gcc.gnu.org/onlinedocs/gcc-9.1.0/gcc/C_002b_002b-Dialect-Options.html#index-Winit-list-lifetime + 55. https://gcc.gnu.org/onlinedocs/gcc-9.1.0/gcc/C_002b_002b-Dialect-Options.html#index-Wredundant-move + 56. https://gcc.gnu.org/onlinedocs/gcc-9.1.0/gcc/C_002b_002b-Dialect-Options.html#index-Wpessimizing-move + 57. https://gcc.gnu.org/onlinedocs/gcc-9.1.0/gcc/C_002b_002b-Dialect-Options.html#index-Wclass-conversion + 58. https://gcc.gnu.org/projects/cxx-status.html#cxx2a + 59. https://gcc.gnu.org/onlinedocs/gcc-9.1.0/gcc/Warning-Options.html#index-Wformat + 60. https://gcc.gnu.org/gcc-9/changes.html#libstdcxx + 61. https://github.com/uxlfoundation/oneTBB + 62. https://gcc.gnu.org/gcc-9/changes.html#d + 63. https://gcc.gnu.org/gcc-9/changes.html#fortran + 64. https://gcc.gnu.org/onlinedocs/gcc-9.1.0/gfortran/Fortran-Dialect-Options.html#index-fdec-include + 65. https://gcc.gnu.org/onlinedocs/gcc-9.1.0/gfortran/Fortran-Dialect-Options.html#index-fdec + 66. https://gcc.gnu.org/onlinedocs/gcc-9.1.0/gfortran/BUILTIN-directive.html#BUILTIN-directive + 67. https://gcc.gnu.org/gcc-9/changes.html#go + 68. https://gcc.gnu.org/gcc-9/changes.html#jit + 69. https://gcc.gnu.org/onlinedocs/gcc-9.1.0/jit/topics/contexts.html#gcc_jit_context_add_driver_option + 70. https://gcc.gnu.org/gcc-9/changes.html#targets + 71. https://gcc.gnu.org/gcc-9/changes.html#arm-targets + 72. https://gcc.gnu.org/onlinedocs/gcc-9.1.0/gcc/Instrumentation-Options.html#index-fstack-protector + 73. https://gcc.gnu.org/onlinedocs/gcc-9.1.0/gcc/AArch64-Options.html#AArch64-Options + 74. https://gcc.gnu.org/gcc-9/changes.html#amdgcn + 75. https://gcc.gnu.org/gcc-9/changes.html#arc + 76. https://gcc.gnu.org/gcc-9/changes.html#csky + 77. https://gcc.gnu.org/gcc-9/changes.html#x86 + 78. https://gcc.gnu.org/gcc-9/changes.html#mips + 79. https://gcc.gnu.org/gcc-9/changes.html#or1k + 80. https://gcc.gnu.org/gcc-9/changes.html#s390 + 81. https://gcc.gnu.org/gcc-9/changes.html#os + 82. https://gcc.gnu.org/gcc-9/changes.html#solaris + 83. https://gcc.gnu.org/gcc-9/changes.html#windows + 84. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87137 + 85. https://gcc.gnu.org/gcc-9/changes.html#plugins + 86. https://gcc.gnu.org/onlinedocs/gcc-9.1.0/gcc/Diagnostic-Message-Formatting-Options.html#index-fdiagnostics-format + 87. https://gcc.gnu.org/onlinedocs/gcc-9.1.0/gccint/User-Experience-Guidelines.html + 88. https://gcc.gnu.org/gcc-9/changes.html#GCC9.1 + 89. https://gcc.gnu.org/bugzilla/buglist.cgi?bug_status=RESOLVED&resolution=FIXED&target_milestone=9.0 + 90. https://gcc.gnu.org/gcc-9/changes.html#GCC9.2 + 91. https://gcc.gnu.org/bugzilla/buglist.cgi?bug_status=RESOLVED&resolution=FIXED&target_milestone=9.2 + 92. https://gcc.gnu.org/gcc-9/changes.html#GCC9.3 + 93. https://gcc.gnu.org/bugzilla/buglist.cgi?bug_status=RESOLVED&resolution=FIXED&target_milestone=9.3 + 94. https://gcc.gnu.org/gcc-9/changes.html#GCC9.4 + 95. https://gcc.gnu.org/bugzilla/buglist.cgi?bug_status=RESOLVED&resolution=FIXED&target_milestone=9.4 + 96. https://gcc.gnu.org/gcc-9/changes.html#GCC9.5 + 97. https://gcc.gnu.org/bugzilla/buglist.cgi?bug_status=RESOLVED&resolution=FIXED&target_milestone=9.5 + 98. https://gcc.gnu.org/onlinedocs/ + 99. mailto:gcc-help@gcc.gnu.org + 100. mailto:gcc@gcc.gnu.org + 101. https://gcc.gnu.org/lists.html + 102. https://www.fsf.org/ + 103. https://gcc.gnu.org/about.html +====================================================================== +http://gcc.gnu.org/gcc-8/index.html + GCC 8 Release Series + + (This release series is no longer supported.) + + May 14, 2021 + + The [1]GNU project and the GCC developers are pleased to announce the + release of GCC 8.5. + + This release is a bug-fix release, containing fixes for regressions in + GCC 8.4 relative to previous releases of GCC. + +Release History + + GCC 8.5 + May 14, 2021 ([2]changes, [3]documentation) + + GCC 8.4 + Mar 4, 2020 ([4]changes, [5]documentation) + + GCC 8.3 + Feb 22, 2019 ([6]changes, [7]documentation) + + GCC 8.2 + Jul 26, 2018 ([8]changes, [9]documentation) + + GCC 8.1 + May 2, 2018 ([10]changes, [11]documentation) + +References and Acknowledgements + + GCC used to stand for the GNU C Compiler, but since the compiler + supports several other languages aside from C, it now stands for the + GNU Compiler Collection. + + A list of [12]successful builds is updated as new information becomes + available. + + The GCC developers would like to thank the numerous people that have + contributed new features, improvements, bug fixes, and other changes as + well as test results to GCC. This [13]amazing group of volunteers is + what makes GCC successful. + + For additional information about GCC please refer to the [14]GCC + project web site or contact the [15]GCC development mailing list. + + To obtain GCC please use [16]our mirror sites or [17]our version + control system. + + + For questions related to the use of GCC, please consult these web + pages and the [18]GCC manuals. If that fails, the + [19]gcc-help@gcc.gnu.org mailing list might help. Comments on these + web pages and the development of GCC are welcome on our developer + list at [20]gcc@gcc.gnu.org. All of [21]our lists have public + archives. + + Copyright (C) [22]Free Software Foundation, Inc. Verbatim copying and + distribution of this entire article is permitted in any medium, + provided this notice is preserved. + + These pages are [23]maintained by the GCC team. Last modified + 2024-05-30. + +References + + 1. http://www.gnu.org/ + 2. https://gcc.gnu.org/gcc-8/changes.html + 3. https://gcc.gnu.org/onlinedocs/8.5.0/ + 4. https://gcc.gnu.org/gcc-8/changes.html + 5. https://gcc.gnu.org/onlinedocs/8.4.0/ + 6. https://gcc.gnu.org/gcc-8/changes.html + 7. https://gcc.gnu.org/onlinedocs/8.3.0/ + 8. https://gcc.gnu.org/gcc-8/changes.html + 9. https://gcc.gnu.org/onlinedocs/8.2.0/ + 10. https://gcc.gnu.org/gcc-8/changes.html + 11. https://gcc.gnu.org/onlinedocs/8.1.0/ + 12. https://gcc.gnu.org/gcc-8/buildstat.html + 13. https://gcc.gnu.org/onlinedocs/gcc-8.1.0/gcc/Contributors.html + 14. https://gcc.gnu.org/index.html + 15. mailto:gcc@gcc.gnu.org + 16. https://gcc.gnu.org/mirrors.html + 17. https://gcc.gnu.org/git.html + 18. https://gcc.gnu.org/onlinedocs/ + 19. mailto:gcc-help@gcc.gnu.org + 20. mailto:gcc@gcc.gnu.org + 21. https://gcc.gnu.org/lists.html + 22. https://www.fsf.org/ + 23. https://gcc.gnu.org/about.html +====================================================================== +http://gcc.gnu.org/gcc-8/changes.html + GCC 8 Release Series + Changes, New Features, and Fixes + + This page is a "brief" summary of some of the huge number of + improvements in GCC 8. You may also want to check out our [1]Porting to + GCC 8 page and the [2]full GCC documentation. + +Caveats + + * The default mode for C is now -std=gnu17 instead of -std=gnu11. + * Support for the obsolete SDB/coff debug info format has been + removed. The option -gcoff no longer does anything. + * The Cilk+ extensions to the C and C++ languages have been removed. + * The MPX extensions to the C and C++ languages have been deprecated + and will be removed in a future release. + * The extension allowing arithmetic on std::atomic and types + like std::atomic has been deprecated. + * The non-standard C++0x std::copy_exception function was removed. + std::make_exception_ptr should be used instead. + * Support for the powerpc*-*-*spe* target ports which have been + recently unmaintained and untested in GCC has been declared + obsolete in GCC 8 as [3]announced. Unless there is activity to + revive them, the next release of GCC will have their sources + permanently removed. + +[4]General Improvements + + * Inter-procedural optimization improvements: + + Reworked run-time estimation metrics leading to more realistic + guesses driving inliner and cloning heuristics. + + The ipa-pure-const pass is extended to propagate the malloc + attribute, and the corresponding warning option + -Wsuggest-attribute=malloc emits a diagnostic for functions + which can be annotated with the malloc attribute. + * Profile driven optimization improvements: + + New infrastructure for representing profiles (both statically + guessed and profile feedback) which allows propagation of + additional information about the reliability of the profile. + + A number of improvements in the profile updating code solving + problems found by new verification code. + + Static detection of code which is not executed in a valid run + of the program. This includes paths which trigger undefined + behavior as well as calls to functions declared with the cold + attribute. Newly the noreturn attribute does not imply all + effects of cold to differentiate between exit (which is + noreturn) and abort (which is in addition not executed in + valid runs). + + -freorder-blocks-and-partition, a pass splitting function + bodies into hot and cold regions, is now enabled by default at + -O2 and higher for x86 and x86-64. + * Link-time optimization improvements: + + We have significantly improved debug information on ELF + targets using DWARF by properly preserving language-specific + information. This allows for example the libstdc++ + pretty-printers to work with LTO optimized executables. + * A new option -fcf-protection=[full|branch|return|none] is + introduced to perform code instrumentation to increase program + security by checking that target addresses of control-flow transfer + instructions (such as indirect function call, function return, + indirect jump) are valid. Currently the instrumentation is + supported on x86 GNU/Linux targets only. See the user guide for + further information about the option syntax and section "New + Targets and Target Specific Improvements" for IA-32/x86-64 for more + details. + * The -gcolumn-info option is now enabled by default. It includes + column information in addition to just filenames and line numbers + in DWARF debugging information. + * The polyhedral-based loop nest optimization pass + -floop-nest-optimize has been overhauled. It's still considered + experimental and may not result in any runtime improvements. + * Two new classical loop nest optimization passes have been added. + -floop-unroll-and-jam performs outer loop unrolling and fusing of + the inner loop copies. -floop-interchange exchanges loops in a loop + nest to improve data locality. Both passes are enabled by default + at -O3 and above. + * The classic loop nest optimization pass -ftree-loop-distribution + has been improved and enabled by default at -O3 and above. It + supports loop nest distribution in some restricted scenarios; it + also supports cancellable innermost loop distribution with loop + versioning under run-time alias checks. + * The new option -fstack-clash-protection causes the compiler to + insert probes whenever stack space is allocated statically or + dynamically to reliably detect stack overflows and thus mitigate + the attack vector that relies on jumping over a stack guard page as + provided by the operating system. + * A new pragma GCC unroll has been implemented in the C family of + languages, as well as Fortran and Ada, so as to make it possible + for the user to have a finer-grained control over the loop + unrolling optimization. + * GCC has been enhanced to detect more instances of meaningless or + mutually exclusive attribute specifications and handle such + conflicts more consistently. Mutually exclusive attribute + specifications are ignored with a warning regardless of whether + they appear on the same declaration or on distinct declarations of + the same entity. For example, because the noreturn attribute on the + second declaration below is mutually exclusive with the malloc + attribute on the first, it is ignored and a warning is issued. +> + void* __attribute__ ((malloc)) f (unsigned); + void* __attribute__ ((noreturn)) f (unsigned); + + warning: ignoring attribute 'noreturn' because it conflicts with attribute + 'malloc' [-Wattributes] + * The gcov tool can distinguish functions that begin on a same line + in a source file. This can be a different template instantiation or + a class constructor: + +File 'ins.C' +Lines executed:100.00% of 8 +Creating 'ins.C.gcov' + + -: 0:Source:ins.C + -: 0:Graph:ins.gcno + -: 0:Data:ins.gcda + -: 0:Runs:1 + -: 0:Programs:1 + -: 1:template + -: 2:class Foo + -: 3:{ + -: 4: public: + 2: 5: Foo(): b (1000) {} +------------------ +Foo::Foo(): + 1: 5: Foo(): b (1000) {} +------------------ +Foo::Foo(): + 1: 5: Foo(): b (1000) {} +------------------ + 2: 6: void inc () { b++; } +------------------ +Foo::inc(): + 1: 6: void inc () { b++; } +------------------ +Foo::inc(): + 1: 6: void inc () { b++; } +------------------ + -: 7: + -: 8: private: + -: 9: int b; + -: 10:}; + -: 11: + 1: 12:int main(int argc, char **argv) + -: 13:{ + 1: 14: Foo a; + 1: 15: Foo b; + -: 16: + 1: 17: a.inc (); + 1: 18: b.inc (); + 1: 19:} + + * The gcov tool has more accurate numbers for execution of lines in a + source file. + * The gcov tool can use TERM colors to provide more readable output. + * AddressSanitizer gained a new pair of sanitization options, + -fsanitize=pointer-compare and -fsanitize=pointer-subtract, which + warn about subtraction (or comparison) of pointers that point to a + different memory object: + +int +main () +{ + /* Heap allocated memory. */ + char *heap1 = (char *)__builtin_malloc (42); + char *heap2 = (char *)__builtin_malloc (42); + if (heap1 > heap2) + return 1; + + return 0; +} + +==17465==ERROR: AddressSanitizer: invalid-pointer-pair: 0x604000000010 0x6040000 +00050 + #0 0x40070f in main /tmp/pointer-compare.c:7 + #1 0x7ffff6a72a86 in __libc_start_main (/lib64/libc.so.6+0x21a86) + #2 0x400629 in _start (/tmp/a.out+0x400629) + +0x604000000010 is located 0 bytes inside of 42-byte region [0x604000000010,0x604 +00000003a) +allocated by thread T0 here: + #0 0x7ffff6efb390 in __interceptor_malloc ../../../../libsanitizer/asan/asan +_malloc_linux.cc:86 + #1 0x4006ea in main /tmp/pointer-compare.c:5 + #2 0x7ffff6a72a86 in __libc_start_main (/lib64/libc.so.6+0x21a86) + +0x604000000050 is located 0 bytes inside of 42-byte region [0x604000000050,0x604 +00000007a) +allocated by thread T0 here: + #0 0x7ffff6efb390 in __interceptor_malloc ../../../../libsanitizer/asan/asan +_malloc_linux.cc:86 + #1 0x4006f8 in main /tmp/pointer-compare.c:6 + #2 0x7ffff6a72a86 in __libc_start_main (/lib64/libc.so.6+0x21a86) + +SUMMARY: AddressSanitizer: invalid-pointer-pair /tmp/pointer-compare.c:7 in main + + * The store merging pass has been enhanced to handle bit-fields and + not just constant stores, but also data copying from adjacent + memory locations into other adjacent memory locations, including + bitwise logical operations on the data. The pass can also handle + byte swapping into memory locations. + * The undefined behavior sanitizer gained two new options included in + -fsanitize=undefined: -fsanitize=builtin which diagnoses at run + time invalid arguments to __builtin_clz or __builtin_ctz prefixed + builtins, and -fsanitize=pointer-overflow which performs cheap run + time tests for pointer wrapping. + * A new attribute no_sanitize can be applied to functions to instruct + the compiler not to do sanitization of the options provided as + arguments to the attribute. Acceptable values for no_sanitize match + those acceptable by the -fsanitize command-line option. + +void __attribute__ ((no_sanitize ("alignment", "object-size"))) +f () { /* Do something. */; } + +[5]New Languages and Language specific improvements + + [6]Ada + + * For its internal exception handling used on the host for error + recovery in the front-end, the compiler now relies on the native + exception handling mechanism of the host platform, which should be + more efficient than the former mechanism. + + [7]BRIG (HSAIL) + + In this release cycle, the focus for the BRIGFE was on stabilization + and performance improvements. Also a couple of completely new features + were added. + * Improved support for function and module scope group segment + variables. PRM specs define function and module scope group segment + variables as an experimental feature. However, PRM test suite uses + them. Now group segment is handled by separate book keeping of + module scope and function (kernel) offsets. Each function has a + "frame" in the group segment offset to which is given as an + argument, similar to traditional call stack frame handling. + * Reduce the number of type conversions due to the untyped HSAIL + registers. Instead of always representing the HSAIL's untyped + registers as unsigned int, the gccbrig now pre-analyzes the BRIG + code and builds the register variables as a type used the most when + storing or reading data to/from each register. This reduces the + number of total casts which cannot be always optimized away. + * Support for BRIG_KIND_NONE directives. + * Made -O3 the default optimization level for BRIGFE. + * Fixed illegal addresses generated from address expressions which + refer only to offset 0. + * Fixed a bug with reg+offset addressing on 32b segments. In 'large' + mode, the offset is treated as 32-bit unless it's in global, + read-only or kernarg address space. + * Fixed a crash caused sometimes by calls with more than 4 arguments. + * Fixed a mis-execution issue with kernels that have both unexpanded + ID functions and calls to subfunctions. + * Treat HSAIL barrier builtins as setjmp/longjump style functions to + avoid illegal optimizations. + * Ensure per WI copies of private variables are aligned correctly. + * libhsail-rt: Assume the host runtime allocates the work group + memory. + + [8]C family + + * New command-line options have been added for the C and C++ + compilers: + + [9]-Wmultistatement-macros warns about unsafe macros expanding + to multiple statements used as a body of a statement such as + if, else, while, switch, or for. + + [10]-Wstringop-truncation warns for calls to bounded string + manipulation functions such as strncat, strncpy, and stpncpy + that might either truncate the copied string or leave the + destination unchanged. For example, the following call to + strncat is diagnosed because it appends just three of the four + characters from the source string. +void append (char *buf, size_t bufsize) +{ + strncat (buf, ".txt", 3); +} +warning: 'strncat' output truncated copying 3 bytes from a string of length 4 [- +Wstringop-truncation] + Similarly, in the following example, the call to strncpy + specifies the size of the destination buffer as the bound. If + the length of the source string is equal to or greater than + this size the result of the copy will not be NUL-terminated. + Therefore, the call is also diagnosed. To avoid the warning, + specify sizeof buf - 1 as the bound and set the last element + of the buffer to NUL. +void copy (const char *s) +{ + char buf[80]; + strncpy (buf, s, sizeof buf); + … +} +warning: 'strncpy' specified bound 80 equals destination size [-Wstringop-trunca +tion] + The -Wstringop-truncation option is included in -Wall. + Note that due to GCC bug [11]82944, defining strncat, strncpy, + or stpncpy as a macro in a system header as some + implementations do, suppresses the warning. + + [12]-Wif-not-aligned controls warnings issued in response to + invalid uses of objects declared with attribute + [13]warn_if_not_aligned. + The -Wif-not-aligned option is included in -Wall. + + [14]-Wmissing-attributes warns when a declaration of a + function is missing one or more attributes that a related + function is declared with and whose absence may adversely + affect the correctness or efficiency of generated code. For + example, in C++, the warning is issued when an explicit + specialization of a primary template declared with attribute + alloc_align, alloc_size, assume_aligned, format, format_arg, + malloc, or nonnull is declared without it. Attributes + deprecated, error, and warning suppress the warning. + The -Wmissing-attributes option is included in -Wall. + + [15]-Wpacked-not-aligned warns when a struct or union declared + with attribute packed defines a member with an explicitly + specified alignment greater than 1. Such a member will wind up + under-aligned. For example, a warning will be issued for the + definition of struct A in the following: +struct __attribute__ ((aligned (8))) +S8 { char a[8]; }; + +struct __attribute__ ((packed)) A +{ + struct S8 s8; +}; +warning: alignment 1 of 'struct S' is less than 8 [-Wpacked-not-aligned] + The -Wpacked-not-aligned option is included in -Wall. + + -Wcast-function-type warns when a function pointer is cast to + an incompatible function pointer. This warning is enabled by + -Wextra. + + -Wsizeof-pointer-div warns for suspicious divisions of the + size of a pointer by the size of the elements it points to, + which looks like the usual way to compute the array size but + won't work out correctly with pointers. This warning is + enabled by -Wall. + + -Wcast-align=strict warns whenever a pointer is cast such that + the required alignment of the target is increased. For + example, warn if a char * is cast to an int * regardless of + the target machine. + + -fprofile-abs-path creates absolute path names in the .gcno + files. This allows gcov to find the correct sources in + projects where compilations occur with different working + directories. + * -fno-strict-overflow is now mapped to -fwrapv -fwrapv-pointer and + signed integer overflow is now undefined by default at all + optimization levels. Using -fsanitize=signed-integer-overflow is + now the preferred way to audit code, -Wstrict-overflow is + deprecated. + * The [16]-Warray-bounds option has been improved to detect more + instances of out-of-bounds array indices and pointer offsets. For + example, negative or excessive indices into flexible array members + and string literals are detected. + * The [17]-Wrestrict option introduced in GCC 7 has been enhanced to + detect many more instances of overlapping accesses to objects via + restrict-qualified arguments to standard memory and string + manipulation functions such as memcpy and strcpy. For example, the + strcpy call in the function below attempts to truncate the string + by replacing its initial characters with the last four. However, + because the function writes the terminating NUL into a[4], the + copies overlap and the call is diagnosed. +void f (void) +{ + char a[] = "abcd1234"; + strcpy (a, a + 4); + … +} +warning: 'strcpy' accessing 5 bytes at offsets 0 and 4 overlaps 1 byte at offset + 4 [-Wrestrict] + The -Wrestrict option is included in -Wall. + * Several optimizer enhancements have enabled improvements to the + [18]-Wformat-overflow and [19]-Wformat-truncation options. The + warnings detect more instances of buffer overflow and truncation + than in GCC 7 and are better at avoiding certain kinds of false + positives. + * When reporting mismatching argument types at a function call, the C + and C++ compilers now underline both the argument and the pertinent + parameter in the declaration. +$ gcc arg-type-mismatch.cc +arg-type-mismatch.cc: In function 'int caller(int, int, float)': +arg-type-mismatch.cc:5:24: error: invalid conversion from 'int' to 'const char*' + [-fpermissive] + return callee(first, second, third); + ^~~~~~ +arg-type-mismatch.cc:1:40: note: initializing argument 2 of 'int callee(int, c +onst char*, float)' + extern int callee(int one, const char *two, float three); + ~~~~~~~~~~~~^~~ + + * When reporting on unrecognized identifiers, the C and C++ compilers + will now emit fix-it hints suggesting #include directives for + various headers in the C and C++ standard libraries. +$ gcc incomplete.c +incomplete.c: In function 'test': +incomplete.c:3:10: error: 'NULL' undeclared (first use in this function) + return NULL; + ^~~~ +incomplete.c:3:10: note: 'NULL' is defined in header ''; did you forge +t to '#include '? +incomplete.c:1:1: ++#include + const char *test(void) +incomplete.c:3:10: + return NULL; + ^~~~ +incomplete.c:3:10: note: each undeclared identifier is reported only once for ea +ch function it appears in + +$ gcc incomplete.cc +incomplete.cc:1:6: error: 'string' in namespace 'std' does not name a type + std::string s("hello world"); + ^~~~~~ +incomplete.cc:1:1: note: 'std::string' is defined in header ''; did you +forget to '#include '? ++#include + std::string s("hello world"); + ^~~ + + * The C and C++ compilers now use more intuitive locations when + reporting on missing semicolons, and offer fix-it hints: +$ gcc t.c +t.c: In function 'test': +t.c:3:12: error: expected ';' before '}' token + return 42 + ^ + ; + } + ~ + + * When reporting on missing '}' and ')' tokens, the C and C++ + compilers will now highlight the corresponding '{' and '(' token, + issuing a 'note' if it's on a separate line: +$ gcc unclosed.c +unclosed.c: In function 'log_when_out_of_range': +unclosed.c:12:50: error: expected ')' before '{' token + && (temperature < MIN || temperature > MAX) { + ^~ + ) +unclosed.c:11:6: note: to match this '(' + if (logging_enabled && check_range () + ^ + + or highlighting it directly if it's on the same line: +$ gcc unclosed-2.c +unclosed-2.c: In function 'test': +unclosed-2.c:8:45: error: expected ')' before '{' token + if (temperature < MIN || temperature > MAX { + ~ ^~ + ) + + They will also emit fix-it hints. + + [20]C + + * New options -std=c17, to select support for the 2018 edition of the + ISO C standard (__STDC_VERSION__ == 201710L), and -std=gnu17, for + C17 with GNU extensions. + * The default mode has been changed to -std=gnu17. + + [21]C++ + + * GCC 8 (-fabi-version=12) has a couple of corrections to the calling + convention, which changes the ABI for some uncommon code: + + Passing an empty class as an argument now takes up no space on + x86_64, as required by the psABI. + + Passing or returning a class with only deleted copy and move + constructors now uses the same calling convention as a class + with a non-trivial copy or move constructor. This only affects + C++17 mode, as in earlier standards passing or returning such + a class was impossible. + + WARNING: In GCC 8.1 the second change mistakenly also affects + classes with a deleted copy constructor and defaulted trivial + move constructor (bug [22]c++/86094). This issue is fixed in + GCC 8.2 (-fabi-version=13). + You can test whether these changes affect your code with -Wabi=11 + (or -Wabi=12 in GCC 8.2 for the third issue); if these changes are + problematic for your project, the GCC 7 ABI can be selected with + -fabi-version=11. + * The value of the C++11 alignof operator has been corrected to match + C _Alignof (minimum alignment) rather than GNU __alignof__ + (preferred alignment); on ia32 targets this means that + alignof(double) is now 4 rather than 8. Code that wants the + preferred alignment should use __alignof__ instead. + * New command-line options have been added for the C++ compiler to + control warnings: + + [23]-Wclass-memaccess warns when objects of non-trivial class + types are manipulated in potentially unsafe ways by raw memory + functions such as memcpy, or realloc. The warning helps detect + calls that bypass user-defined constructors or copy-assignment + operators, corrupt virtual table pointers, data members of + const-qualified types or references, or member pointers. The + warning also detects calls that would bypass access controls + to data members. For example, a call such as: + memcpy (&std::cout, &std::cerr, sizeof std::cout); + results in + warning: 'void* memcpy(void*, const void*, long unsigned int)' writing t +o an object of type 'std::ostream' {aka 'class std::basic_ostream'} with n +o trivial copy-assignment [-Wclass-memaccess] + The -Wclass-memaccess option is included in -Wall. + * The C++ front end has experimental support for some of the upcoming + C++2a draft features with the -std=c++2a or -std=gnu++2a flags, + including designated initializers, default member initializers for + bit-fields, __VA_OPT__ (except that #__VA_OPT__ is unsupported), + lambda [=, this] captures, etc. For a full list of new features, + see [24]the C++ status page. + * When reporting on attempts to access private fields of a class or + struct, the C++ compiler will now offer fix-it hints showing how to + use an accessor function to get at the field in question, if one + exists. +$ gcc accessor.cc +accessor.cc: In function 'void test(foo*)': +accessor.cc:12:12: error: 'double foo::m_ratio' is private within this context + if (ptr->m_ratio >= 0.5) + ^~~~~~~ +accessor.cc:7:10: note: declared private here + double m_ratio; + ^~~~~~~ +accessor.cc:12:12: note: field 'double foo::m_ratio' can be accessed via 'double + foo::get_ratio() const' + if (ptr->m_ratio >= 0.5) + ^~~~~~~ + get_ratio() + + * The C++ compiler can now give you a hint if you use a macro before + it was defined (e.g. if you mess up the order of your #include + directives): +$ gcc ordering.cc +ordering.cc:2:24: error: expected ';' at end of member declaration + virtual void clone() const OVERRIDE { } + ^~~~~ + ; +ordering.cc:2:30: error: 'OVERRIDE' does not name a type + virtual void clone() const OVERRIDE { } + ^~~~~~~~ +ordering.cc:2:30: note: the macro 'OVERRIDE' had not yet been defined +In file included from ordering.cc:5: +c++11-compat.h:2: note: it was later defined here + #define OVERRIDE override + + + * The -Wold-style-cast diagnostic can now emit fix-it hints telling + you when you can use a static_cast, const_cast, or + reinterpret_cast. +$ gcc -c old-style-cast-fixits.cc -Wold-style-cast +old-style-cast-fixits.cc: In function 'void test(void*)': +old-style-cast-fixits.cc:5:19: warning: use of old-style cast to 'struct foo*' [ +-Wold-style-cast] + foo *f = (foo *)ptr; + ^~~ + ---------- + static_cast (ptr) + + * When reporting on problems within extern "C" linkage + specifications, the C++ compiler will now display the location of + the start of the extern "C". +$ gcc -c extern-c.cc +extern-c.cc:3:1: error: template with C linkage + template void test (void); + ^~~~~~~~ +In file included from extern-c.cc:1: +unclosed.h:1:1: note: 'extern "C"' linkage started here + extern "C" { + ^~~~~~~~~~ +extern-c.cc:3:39: error: expected '}' at end of input + template void test (void); + ^ +In file included from extern-c.cc:1: +unclosed.h:1:12: note: to match this '{' + extern "C" { + ^ + + * When reporting on mismatching template types, the C++ compiler will + now use color to highlight the mismatching parts of the template, + and will elide the parameters that are common between two + mismatching templates, printing [...] instead: +$ gcc templates.cc +templates.cc: In function 'void test()': +templates.cc:9:8: error: could not convert 'vector()' from 'vector' to 'vector' + fn_1(vector ()); + ^~~~~~~~~~~~~~~~~ +templates.cc:10:8: error: could not convert 'map()' from 'map<[...] +,double>' to 'map<[...],int>' + fn_2(map()); + ^~~~~~~~~~~~~~~~~~ + + Those [...] elided parameters can be seen using -fno-elide-type: +$ gcc templates.cc -fno-elide-type +templates.cc: In function 'void test()': +templates.cc:9:8: error: could not convert 'vector()' from 'vector' to 'vector' + fn_1(vector ()); + ^~~~~~~~~~~~~~~~~ +templates.cc:10:8: error: could not convert 'map()' from 'map' to 'map' + fn_2(map()); + ^~~~~~~~~~~~~~~~~~ + + The C++ compiler has also gained an option + -fdiagnostics-show-template-tree which visualizes such mismatching + templates in a hierarchical form: +$ gcc templates-2.cc -fdiagnostics-show-template-tree +templates-2.cc: In function 'void test()': +templates-2.cc:9:8: error: could not convert 'vector()' from 'vector' to 'vector' + vector< + [double != int]> + fn_1(vector ()); + ^~~~~~~~~~~~~~~~~ +templates-2.cc:10:8: error: could not convert 'map >, ve +ctor >()' from 'map>,vector>' to 'map>,vector>' + map< + map< + [...], + vector< + [double != float]>>, + vector< + [double != float]>> + fn_2(map>, vector> ()); + ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + which again works with -fno-elide-type: +$ gcc templates-2.cc -fdiagnostics-show-template-tree -fno-elide-type +templates-2.cc: In function 'void test()': +templates-2.cc:9:8: error: could not convert 'vector()' from 'vector' to 'vector' + vector< + [double != int]> + fn_1(vector ()); + ^~~~~~~~~~~~~~~~~ +templates-2.cc:10:8: error: could not convert 'map >, ve +ctor >()' from 'map>,vector>' to 'map>,vector>' + map< + map< + int, + vector< + [double != float]>>, + vector< + [double != float]>> + fn_2(map>, vector> ()); + ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + * Flowing off the end of a non-void function is considered + unreachable and may be subject to optimization on that basis. As a + result of this change, -Wreturn-type warnings are enabled by + default for C++. + + [25]Runtime Library (libstdc++) + + * Improved experimental support for C++17, including the following + features: + + Deduction guides to support class template argument deduction. + + std::filesystem implementation. + + std::char_traits and std::char_traits are + usable in constant expressions. + + std::to_chars and std::from_chars (for integers only, not for + floating point types). + * Experimental support for C++2a: std::to_address (thanks to Glen + Fernandes) and std::endian. + * On GNU/Linux, std::random_device::entropy() accesses the kernel's + entropy count for the random device, if known (thanks to Xi + Ruoyao). + * Support for std::experimental::source_location. + * AddressSanitizer integration for std::vector, detecting + out-of-range accesses to the unused capacity of a vector. + * Extensions __gnu_cxx::airy_ai and __gnu_cxx::airy_bi added to the + Mathematical Special Functions. + + [26]Fortran + + * The main version of libfortran has been changed to 5. + * Parameterized derived types, a major feature of Fortran 2003, have + been implemented. + * Partial support is provided for Fortran 2018 teams, which are + hierarchical subsets of images that execute independently of other + image subsets. + * The maximum rank for arrays has been increased to 15, conforming to + the Fortran 2008 standard. + * Transformational intrinsics are now fully supported in + initialization expressions. + * New flag -fc-prototypes to write C prototypes for BIND(C) + procedures and variables. + * If -fmax-stack-var-size is honored if given together with -Ofast, + -fstack-arrays is no longer set in that case. + * New options -fdefault-real-16 and -fdefault-real-10 to control the + default kind of REAL variables. + * A warning is now issued if an array subscript inside a DO loop + could lead to an out-of-bounds-access. The new option + -Wdo-subscript, enabled by -Wextra, warns about this even if the + compiler can not prove that the code will be executed. + * The Fortran front end now attempts to interchange loops if it is + deemed profitable. So far, this is restricted to FORALL and DO + CONCURRENT statements with multiple indices. This behavior be + controlled with the new flag -ffrontend-loop-interchange, which is + enabled with optimization by default. The + -Wfrontend-loop-interchange option warns about such occurrences. + * When an actual argument contains too few elements for a dummy + argument, an error is now issued. The -std=legacy option can be + used to still compile such code. + * The RECL= argument to OPEN and INQUIRE statements now allows 64-bit + integers, making records larger than 2GiB possible. + * The GFORTRAN_DEFAULT_RECL environment variable no longer has any + effect. The record length for preconnected units is now larger than + any practical limit, same as for sequential access units opened + without an explicit RECL= specifier. + * Character variables longer than HUGE(0) elements are now possible + on 64-bit targets. Note that this changes the procedure call ABI + for all procedures with character arguments on 64-bit targets, as + the type of the hidden character length argument has changed. The + hidden character length argument is now of type INTEGER(C_SIZE_T). + * Partial support is provided for Fortran 2018 teams, which are + hierarchical subsets of images that execute independently of other + image subsets. + + [27]Go + + * GCC 8 provides a complete implementation of the Go 1.10.1 user + packages. + * The garbage collector is now fully concurrent. As before, values + stored on the stack are scanned conservatively, but value stored in + the heap are scanned precisely. + * Escape analysis is fully implemented and enabled by default in the + Go front end. This significantly reduces the number of heap + allocations by allocating values on the stack instead. + +[28]libgccjit + + The libgccjit API gained four new entry points: + * [29]gcc_jit_type_get_vector and + * [30]gcc_jit_context_new_rvalue_from_vector for working with + vectors, + * [31]gcc_jit_type_get_aligned + * [32]gcc_jit_function_get_address + + The C code generated by [33]gcc_jit_context_dump_reproducer_to_file is + now easier-to-read. + +[34]New Targets and Target Specific Improvements + + [35]AArch64 + + * The Armv8.4-A architecture is now supported. It can be used by + specifying the -march=armv8.4-a option. + * The Dot Product instructions are now supported as an optional + extension to the Armv8.2-A architecture and newer and are mandatory + on Armv8.4-A. The extension can be used by specifying the +dotprod + architecture extension. E.g. -march=armv8.2-a+dotprod. + * The Armv8-A +crypto extension has now been split into two + extensions for finer grained control: + + +aes which contains the Armv8-A AES crytographic instructions. + + +sha2 which contains the Armv8-A SHA2 and SHA1 cryptographic + instructions. + Using +crypto will now enable these two extensions. + * New Armv8.4-A FP16 Floating Point Multiplication Variant + instructions have been added. These instructions are mandatory in + Armv8.4-A but available as an optional extension to Armv8.2-A and + Armv8.3-A. The new extension can be used by specifying the +fp16fml + architectural extension on Armv8.2-A and Armv8.3-A. On Armv8.4-A + the instructions can be enabled by specifying +fp16. + * New cryptographic instructions have been added as optional + extensions to Armv8.2-A and newer. These instructions can be + enabled with: + + +sha3 New SHA3 and SHA2 instructions from Armv8.4-A. This + implies +sha2. + + +sm4 New SM3 and SM4 instructions from Armv8.4-A. + * The Scalable Vector Extension (SVE) is now supported as an optional + extension to the Armv8.2-A architecture and newer. This support + includes automatic vectorization with SVE instructions, but it does + not yet include the SVE Arm C Language Extensions (ACLE). It can be + enabled by specifying the +sve architecture extension (for example, + -march=armv8.2-a+sve). By default, the generated code works with + all vector lengths, but it can be made specific to N-bit vectors + using -msve-vector-bits=N. + * Support has been added for the following processors (GCC + identifiers in parentheses): + + Arm Cortex-A75 (cortex-a75). + + Arm Cortex-A55 (cortex-a55). + + Arm Cortex-A55/Cortex-A75 DynamIQ big.LITTLE + (cortex-a75.cortex-a55). + The GCC identifiers can be used as arguments to the -mcpu or -mtune + options, for example: -mcpu=cortex-a75 or -mtune=cortex-a75 or as + arguments to the equivalent target attributes and pragmas. + + [36]ARC + + * Added support for: + + Fast interrupts. + + Naked functions. + + aux variable attributes. + + uncached type qualifier. + + Secure functions via sjli instruction. + * New exception handling implementation. + * Revamped trampoline implementation. + * Refactored small data feature implementation, controlled via the -G + command-line option. + * New support for reduced register set ARC architecture + configurations, controlled via the -mrf16 command-line option. + * Refurbished and improved support for zero overhead loops. + Introduced -mlpc-width command-line option to control the width of + the lp_count register. + + [37]ARM + + * The -mfpu option now takes a new option setting of -mfpu=auto. When + set to this the floating-point and SIMD settings are derived from + the settings of the -mcpu or -march options. The internal CPU + configurations have been updated with information about the + permitted floating-point configurations supported. See the user + guide for further information about the extended option syntax for + controlling architectural extensions via the -march option. + -mfpu=auto is now the default setting unless the compiler has been + configured with an explicit --with-fpu option. + * The -march and -mcpu options now accept optional extensions to the + architecture or CPU option, allowing the user to enable or disable + any such extensions supported by that architecture or CPU such as + (but not limited to) floating-point and AdvancedSIMD. For example: + the option -mcpu=cortex-a53+nofp will generate code for the + Cortex-A53 processor with no floating-point support. This, in + combination with the new -mfpu=auto option, provides a + straightforward way of specifying a valid build target through a + single -mcpu or -march option. The -mtune option accepts the same + arguments as -mcpu but only the CPU name has an effect on tuning. + The architecture extensions do not have any effect. For details of + what extensions a particular architecture or CPU option supports + please refer to the [38]documentation. + * The -mstructure-size-boundary option has been deprecated and will + be removed in a future release. + * The default link behavior for Armv6 and Armv7-R targets has been + changed to produce BE8 format when generating big-endian images. A + new flag -mbe32 can be used to force the linker to produce legacy + BE32 format images. There is no change of behavior for Armv6-M and + other Armv7 or later targets: these already defaulted to BE8 + format. This change brings GCC into alignment with other compilers + for the ARM architecture. + * The Armv8-R architecture is now supported. It can be used by + specifying the -march=armv8-r option. + * The Armv8.3-A architecture is now supported. It can be used by + specifying the -march=armv8.3-a option. + * The Armv8.4-A architecture is now supported. It can be used by + specifying the -march=armv8.4-a option. + * The Dot Product instructions are now supported as an optional + extension to the Armv8.2-A architecture and newer and are mandatory + on Armv8.4-A. The extension can be used by specifying the +dotprod + architecture extension. E.g. -march=armv8.2-a+dotprod. + * Support for setting extensions and architectures using the GCC + target pragma and attribute has been added. It can be used by + specifying #pragma GCC target ("arch=..."), #pragma GCC target + ("+extension"), __attribute__((target("arch=..."))) or + __attribute__((target("+extension"))). + * New Armv8.4-A FP16 Floating Point Multiplication Variant + instructions have been added. These instructions are mandatory in + Armv8.4-A but available as an optional extension to Armv8.2-A and + Armv8.3-A. The new extension can be used by specifying the +fp16fml + architectural extension on Armv8.2-A and Armv8.3-A. On Armv8.4-A + the instructions can be enabled by specifying +fp16. + * Support has been added for the following processors (GCC + identifiers in parentheses): + + Arm Cortex-A75 (cortex-a75). + + Arm Cortex-A55 (cortex-a55). + + Arm Cortex-A55/Cortex-A75 DynamIQ big.LITTLE + (cortex-a75.cortex-a55). + + Arm Cortex-R52 for Armv8-R (cortex-r52). + The GCC identifiers can be used as arguments to the -mcpu or -mtune + options, for example: -mcpu=cortex-a75 or -mtune=cortex-r52 or as + arguments to the equivalent target attributes and pragmas. + + [39]AVR + + * The AVR port now supports the following XMEGA-like devices: + + ATtiny212, ATtiny214, ATtiny412, ATtiny414, ATtiny416, ATtiny417, + ATtiny814, ATtiny816, ATtiny817, ATtiny1614, ATtiny1616, ATtiny1617, + ATtiny3214, ATtiny3216, ATtiny3217 + The new devices are listed under [40]-mmcu=avrxmega3. + + These devices see flash memory in the RAM address space, so + that features like PROGMEM and __flash are not needed any more + (as opposed to other AVR families for which read-only data + will be located in RAM except special, non-standard features + are used to locate and access such data). This requires that + the compiler is used with Binutils 2.29 or newer so that + [41]read-only data will be located in flash memory. + + A new command-line option -mshort-calls is supported. This + option is used internally for multilib selection of the + avrxmega3 variants. It is not an optimization option. Do not + set it by hand. + * The compiler now generates [42]efficient interrupt service routine + (ISR) prologues and epilogues. This is achieved by using the new + [43]AVR pseudo instruction __gcc_isr which is supported and + resolved by the GNU assembler. + + As the __gcc_isr pseudo-instruction will be resolved by the + assembler, inline assembly is transparent to the process. This + means that when inline assembly uses an instruction like INC + that clobbers the condition code, then the assembler will + detect this and generate an appropriate ISR prologue / + epilogue chunk to save / restore SREG as needed. + + A new command-line option -mno-gas-isr-prologues disables the + generation of the __gcc_isr pseudo instruction. Any non-naked + ISR will save and restore SREG, tmp_reg and zero_reg, no + matter whether the respective register is clobbered or used. + + The feature is turned on per default for all optimization + levels except for -O0 and -Og. It is explicitly enabled by + means of option -mgas-isr-prologues. + + Support has been added for a new [44]AVR function attribute + no_gccisr. It can be used to disable __gcc_isr pseudo + instruction generation for individual ISRs. + + This optimization is only available if GCC is configured with + GNU Binutils 2.29 or newer; or at least with a version of + Binutils that implements feature [45]PR21683. + * The compiler no more saves / restores registers in main; the effect + is the same as if attribute OS_task was specified for main. This + optimization can be switched off by the new command-line option + -mno-main-is-OS_task. + + [46]IA-32/x86-64 + + * The x86 port now supports the naked function attribute. + * Better tuning for znver1 and Intel Core based CPUs. + * Vectorization cost metrics has been reworked leading to significant + improvements on some benchmarks. + * GCC now supports the Intel CPU named Cannonlake through + -march=cannonlake. The switch enables the AVX512VBMI, AVX512IFMA + and SHA ISA extensions. + * GCC now supports the Intel CPU named Icelake through + -march=icelake. The switch enables the AVX512VNNI, GFNI, VAES, + AVX512VBMI2, VPCLMULQDQ, AVX512BITALG, RDPID and AVX512VPOPCNTDQ + ISA extensions. + * GCC now supports the Intel Control-flow Enforcement Technology + (CET) extension through -fcf-protection option. + + [47]NDS32 + + * New command-line options -mext-perf, -mext-perf2, and -mext-string + have been added for performance extension instructions. + + [48]Nios II + + * The Nios II back end has been improved to generate better-optimized + code. Changes include switching to LRA, more accurate cost models, + and more compact code for addressing static variables. + * New command-line options -mgprel-sec= and -mr0rel-sec= have been + added. + * The stack-smashing protection options are now enabled on Nios II. + + [49]PA-RISC + + * The default call ABI on 32-bit linux has been changed from callee + copies to caller copies. This affects objects larger than eight + bytes passed by value. The goal is to improve compatibility with + x86 and resolve issues with OpenMP. + * Other PA-RISC targets are unchanged. + + [50]PowerPC / PowerPC64 / RS6000 + + * The PowerPC SPE support is split off to a separate powerpcspe port. + The separate port is deprecated and might be removed in a future + release. + * The Paired Single support (as used on some PPC750 CPUs, -mpaired, + powerpc*-*-linux*paired*) is deprecated and will be removed in a + future release. + * The Xilinx floating point support (-mxilinx-fpu, + powerpc-xilinx-eabi*) is deprecated and will be removed in a future + release. + * Support for using big-endian AltiVec intrinsics on a little-endian + target (-maltivec=be) is deprecated and will be removed in a future + release. + + [51]Tile + + * The TILE-Gx port is deprecated and will be removed in a future + release. + +[52]Operating Systems + + [53]Windows + + * GCC on Microsoft Windows can now be configured via + --enable-mingw-wildcard or --disable-mingw-wildcard to force a + specific behavior for GCC itself with regards to supporting the + wildcard character. Prior versions of GCC would follow the + configuration of the MinGW runtime. This behavior can still be + obtained by not using the above options or by using + --enable-mingw-wildcard=platform. + +[54]Improvements for plugin authors + + * Plugins can now register a callback hook for when comments are + encountered by the C and C++ compilers, e.g. allowing for plugins + to handle documentation markup in code comments. + * The gdbinit support script for debugging GCC now has a + break-on-diagnostic command, providing an easy way to trigger a + breakpoint whenever a diagnostic is emitted. + * The API for creating fix-it hints now supports newlines, and for + emitting mutually incompatible fix-it hints for one diagnostic. + +[55]GCC 8.1 + + This is the [56]list of problem reports (PRs) from GCC's bug tracking + system that are known to be fixed in the 8.1 release. This list might + not be complete (that is, it is possible that some PRs that have been + fixed are not listed here). + +[57]GCC 8.2 + + This is the [58]list of problem reports (PRs) from GCC's bug tracking + system that are known to be fixed in the 8.2 release. This list might + not be complete (that is, it is possible that some PRs that have been + fixed are not listed here). + + General Improvements + + * Fixed LTO link-time performance problems caused by an overflow in + the partitioning algorithm while building large binaries. + + Language Specific Changes + + C++ + + GCC 8.2 fixed a bug introduced in GCC 8.1 affecting passing or + returning of classes with a deleted copy constructor and defaulted + trivial move constructor (bug [59]c++/86094). GCC 8.2 introduces + -fabi-version=13 and makes it the default, ABI incompatibilities + between GCC 8.1 and 8.2 can be reported with -Wabi=12. See [60]C++ + changes for more details. + + Target Specific Changes + + IA-32/x86-64 + + * -mtune=native performance regression [61]PR84413 on Intel Skylake + processors has been fixed. + +[62]GCC 8.3 + + This is the [63]list of problem reports (PRs) from GCC's bug tracking + system that are known to be fixed in the 8.3 release. This list might + not be complete (that is, it is possible that some PRs that have been + fixed are not listed here). + + Windows + + * A C++ Microsoft ABI bitfield layout bug, [64]PR87137 has been + fixed. A non-field declaration could cause the current bitfield + allocation unit to be completed, incorrectly placing a following + bitfield into a new allocation unit. The Microsoft ABI is selected + for: + + Mingw targets + + PowerPC, IA-32 or x86-64 targets when the -mms-bitfields + option is specified, or __attribute__((ms_struct)) is used + + SuperH targets when the -mhitachi option is specified, or + __attribute__((renesas)) is used + GCC 8 introduced additional cases of this defect, but rather than + resolve only those regressions, we decided to resolve all the cases + of this defect in single change. + +[65]GCC 8.4 + + This is the [66]list of problem reports (PRs) from GCC's bug tracking + system that are known to be fixed in the 8.4 release. This list might + not be complete (that is, it is possible that some PRs that have been + fixed are not listed here). + +[67]GCC 8.5 + + This is the [68]list of problem reports (PRs) from GCC's bug tracking + system that are known to be fixed in the 8.5 release. This list might + not be complete (that is, it is possible that some PRs that have been + fixed are not listed here). + + Target Specific Changes + + AArch64 + + * The option -moutline-atomics has been added to aid deployment of + the Large System Extensions (LSE) on GNU/Linux systems built with a + baseline architecture targeting Armv8-A. When the option is + specified code is emitted to detect the presence of LSE + instructions at run time and use them for standard atomic + operations. For more information please refer to the documentation. + + + For questions related to the use of GCC, please consult these web + pages and the [69]GCC manuals. If that fails, the + [70]gcc-help@gcc.gnu.org mailing list might help. Comments on these + web pages and the development of GCC are welcome on our developer + list at [71]gcc@gcc.gnu.org. All of [72]our lists have public + archives. + + Copyright (C) [73]Free Software Foundation, Inc. Verbatim copying and + distribution of this entire article is permitted in any medium, + provided this notice is preserved. + + These pages are [74]maintained by the GCC team. Last modified + 2025-01-31. + +References + + 1. https://gcc.gnu.org/gcc-8/porting_to.html + 2. https://gcc.gnu.org/onlinedocs/index.html#current + 3. https://gcc.gnu.org/ml/gcc/2018-04/msg00102.html + 4. https://gcc.gnu.org/gcc-8/changes.html#general + 5. https://gcc.gnu.org/gcc-8/changes.html#languages + 6. https://gcc.gnu.org/gcc-8/changes.html#ada + 7. https://gcc.gnu.org/gcc-8/changes.html#brig + 8. https://gcc.gnu.org/gcc-8/changes.html#c-family + 9. https://gcc.gnu.org/onlinedocs/gcc-8.1.0/gcc/Warning-Options.html#index-Wmultistatement-macros + 10. https://gcc.gnu.org/onlinedocs/gcc-8.1.0/gcc/Warning-Options.html#index-Wstringop-truncation + 11. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82944 + 12. https://gcc.gnu.org/onlinedocs/gcc-8.1.0/gcc/Warning-Options.html#index-Wif-not-aligned + 13. https://gcc.gnu.org/onlinedocs/gcc-8.1.0/gcc/Common-Variable-Attributes.html#index-warn_005fif_005fnot_005faligned-variable-attribute + 14. https://gcc.gnu.org/onlinedocs/gcc-8.1.0/gcc/Warning-Options.html#index-Wmissing-attributes + 15. https://gcc.gnu.org/onlinedocs/gcc-8.1.0/gcc/Warning-Options.html#index-Wpacked-not-aligned + 16. https://gcc.gnu.org/onlinedocs/gcc-8.1.0/gcc/Warning-Options.html#index-Warray-bounds + 17. https://gcc.gnu.org/onlinedocs/gcc-8.1.0/gcc/Warning-Options.html#index-Wrestrict + 18. https://gcc.gnu.org/onlinedocs/gcc-8.1.0/gcc/Warning-Options.html#index-Wformat-overflow + 19. https://gcc.gnu.org/onlinedocs/gcc-8.1.0/gcc/Warning-Options.html#index-Wformat-truncation + 20. https://gcc.gnu.org/gcc-8/changes.html#c + 21. https://gcc.gnu.org/gcc-8/changes.html#cxx + 22. https://gcc.gnu.org/PR86094 + 23. https://gcc.gnu.org/onlinedocs/gcc/C_002b_002b-Dialect-Options.html#index-Wclass-memaccess + 24. https://gcc.gnu.org/projects/cxx-status.html#cxx2a + 25. https://gcc.gnu.org/gcc-8/changes.html#libstdcxx + 26. https://gcc.gnu.org/gcc-8/changes.html#fortran + 27. https://gcc.gnu.org/gcc-8/changes.html#go + 28. https://gcc.gnu.org/gcc-8/changes.html#jit + 29. https://gcc.gnu.org/onlinedocs/gcc-8.1.0/jit/topics/types.html#gcc_jit_type_get_vector + 30. https://gcc.gnu.org/onlinedocs/gcc-8.1.0/jit/topics/expressions.html#gcc_jit_context_new_rvalue_from_vector + 31. https://gcc.gnu.org/onlinedocs/gcc-8.1.0/jit/topics/types.html#gcc_jit_type_get_aligned + 32. https://gcc.gnu.org/onlinedocs/gcc-8.1.0/jit/topics/function-pointers.html#gcc_jit_function_get_address + 33. https://gcc.gnu.org/onlinedocs/gcc-8.1.0/jit/topics/contexts.html#gcc_jit_context_dump_reproducer_to_file + 34. https://gcc.gnu.org/gcc-8/changes.html#targets + 35. https://gcc.gnu.org/gcc-8/changes.html#aarch64 + 36. https://gcc.gnu.org/gcc-8/changes.html#arc + 37. https://gcc.gnu.org/gcc-8/changes.html#arm + 38. https://gcc.gnu.org/onlinedocs/gcc-8.1.0/gcc/ARM-Options.html#ARM-Options + 39. https://gcc.gnu.org/gcc-8/changes.html#avr + 40. https://gcc.gnu.org/onlinedocs/gcc-8.1.0/gcc/AVR-Options.html + 41. https://sourceware.org/PR21472 + 42. https://gcc.gnu.org/PR20296 + 43. https://sourceware.org/binutils/docs-2.29/as/AVR-Pseudo-Instructions.html + 44. https://gcc.gnu.org/onlinedocs/gcc-8.1.0/gcc/AVR-Function-Attributes.html + 45. https://sourceware.org/PR21683 + 46. https://gcc.gnu.org/gcc-8/changes.html#x86 + 47. https://gcc.gnu.org/gcc-8/changes.html#nds32 + 48. https://gcc.gnu.org/gcc-8/changes.html#nios2 + 49. https://gcc.gnu.org/gcc-8/changes.html#hppa + 50. https://gcc.gnu.org/gcc-8/changes.html#powerpc + 51. https://gcc.gnu.org/gcc-8/changes.html#Tile + 52. https://gcc.gnu.org/gcc-8/changes.html#os + 53. https://gcc.gnu.org/gcc-8/changes.html#windows + 54. https://gcc.gnu.org/gcc-8/changes.html#plugins + 55. https://gcc.gnu.org/gcc-8/changes.html#GCC8.1 + 56. https://gcc.gnu.org/bugzilla/buglist.cgi?bug_status=RESOLVED&resolution=FIXED&target_milestone=8.0 + 57. https://gcc.gnu.org/gcc-8/changes.html#GCC8.2 + 58. https://gcc.gnu.org/bugzilla/buglist.cgi?bug_status=RESOLVED&resolution=FIXED&target_milestone=8.2 + 59. https://gcc.gnu.org/PR86094 + 60. https://gcc.gnu.org/gcc-8/changes.html#cxx + 61. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84413 + 62. https://gcc.gnu.org/gcc-8/changes.html#GCC8.3 + 63. https://gcc.gnu.org/bugzilla/buglist.cgi?bug_status=RESOLVED&resolution=FIXED&target_milestone=8.3 + 64. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87137 + 65. https://gcc.gnu.org/gcc-8/changes.html#GCC8.4 + 66. https://gcc.gnu.org/bugzilla/buglist.cgi?bug_status=RESOLVED&resolution=FIXED&target_milestone=8.4 + 67. https://gcc.gnu.org/gcc-8/changes.html#GCC8.5 + 68. https://gcc.gnu.org/bugzilla/buglist.cgi?bug_status=RESOLVED&resolution=FIXED&target_milestone=8.5 + 69. https://gcc.gnu.org/onlinedocs/ + 70. mailto:gcc-help@gcc.gnu.org + 71. mailto:gcc@gcc.gnu.org + 72. https://gcc.gnu.org/lists.html + 73. https://www.fsf.org/ + 74. https://gcc.gnu.org/about.html +====================================================================== +http://gcc.gnu.org/gcc-7/index.html + GCC 7 Release Series + + (This release series is no longer supported.) + + Nov 14, 2019 + + The [1]GNU project and the GCC developers are pleased to announce the + release of GCC 7.5. + + This release is a bug-fix release, containing fixes for regressions in + GCC 7.4 relative to previous releases of GCC. + +Release History + + GCC 7.5 + Nov 14, 2019 ([2]changes, [3]documentation) + + GCC 7.4 + Dec 6, 2018 ([4]changes, [5]documentation) + + GCC 7.3 + Jan 25, 2018 ([6]changes, [7]documentation) + + GCC 7.2 + Aug 14, 2017 ([8]changes, [9]documentation) + + GCC 7.1 + May 2, 2017 ([10]changes, [11]documentation) + +References and Acknowledgements + + GCC used to stand for the GNU C Compiler, but since the compiler + supports several other languages aside from C, it now stands for the + GNU Compiler Collection. + + A list of [12]successful builds is updated as new information becomes + available. + + The GCC developers would like to thank the numerous people that have + contributed new features, improvements, bug fixes, and other changes as + well as test results to GCC. This [13]amazing group of volunteers is + what makes GCC successful. + + For additional information about GCC please refer to the [14]GCC + project web site or contact the [15]GCC development mailing list. + + To obtain GCC please use [16]our mirror sites or [17]our version + control system. + + + For questions related to the use of GCC, please consult these web + pages and the [18]GCC manuals. If that fails, the + [19]gcc-help@gcc.gnu.org mailing list might help. Comments on these + web pages and the development of GCC are welcome on our developer + list at [20]gcc@gcc.gnu.org. All of [21]our lists have public + archives. + + Copyright (C) [22]Free Software Foundation, Inc. Verbatim copying and + distribution of this entire article is permitted in any medium, + provided this notice is preserved. + + These pages are [23]maintained by the GCC team. Last modified + 2024-05-30. + +References + + 1. http://www.gnu.org/ + 2. https://gcc.gnu.org/gcc-7/changes.html + 3. https://gcc.gnu.org/onlinedocs/7.5.0/ + 4. https://gcc.gnu.org/gcc-7/changes.html + 5. https://gcc.gnu.org/onlinedocs/7.4.0/ + 6. https://gcc.gnu.org/gcc-7/changes.html + 7. https://gcc.gnu.org/onlinedocs/7.3.0/ + 8. https://gcc.gnu.org/gcc-7/changes.html + 9. https://gcc.gnu.org/onlinedocs/7.2.0/ + 10. https://gcc.gnu.org/gcc-7/changes.html + 11. https://gcc.gnu.org/onlinedocs/7.1.0/ + 12. https://gcc.gnu.org/gcc-7/buildstat.html + 13. https://gcc.gnu.org/onlinedocs/gcc/Contributors.html + 14. https://gcc.gnu.org/index.html + 15. mailto:gcc@gcc.gnu.org + 16. https://gcc.gnu.org/mirrors.html + 17. https://gcc.gnu.org/git.html + 18. https://gcc.gnu.org/onlinedocs/ + 19. mailto:gcc-help@gcc.gnu.org + 20. mailto:gcc@gcc.gnu.org + 21. https://gcc.gnu.org/lists.html + 22. https://www.fsf.org/ + 23. https://gcc.gnu.org/about.html +====================================================================== +http://gcc.gnu.org/gcc-7/changes.html + GCC 7 Release Series + Changes, New Features, and Fixes + + This page is a brief summary of some of the huge number of improvements + in GCC 7. For more information, see the [1]Porting to GCC 7 page and + the [2]full GCC documentation. + +Caveats + + * GCC now uses [3]LRA (a new local register allocator) by default for + new targets. + * The non-standard C++0x type traits has_trivial_default_constructor, + has_trivial_copy_constructor and has_trivial_copy_assign have been + removed. + * The libstdc++ [4]Profile Mode has been deprecated and will be + removed in a future version. + * The Cilk+ extensions to the C and C++ languages have been + deprecated. + * On ARM targets (arm*-*-*), [5]a bug introduced in GCC 5 that + affects conformance to the procedure call standard (AAPCS) has been + fixed. The bug affects some C++ code where class objects are passed + by value to functions and could result in incorrect or inconsistent + code being generated. This is an ABI change. If the option -Wpsabi + is enabled (on by default) the compiler will emit a diagnostic note + for code that might be affected. + +[6]General Optimizer Improvements + + * GCC 7 can determine the return value or range of return values of + some calls to the sprintf family of functions and make it available + to other optimization passes. Some calls to the snprintf function + with a zero size argument can be folded into constants. This + optimization is included in -O1 and can be selectively controlled + by the -fprintf-return-value option. + * A new store merging pass has been added. It merges constant stores + to adjacent memory locations into fewer, wider, stores. It is + enabled by the -fstore-merging option and at the -O2 optimization + level or higher (and -Os). + * A new code hoisting optimization has been added to the partial + redundancy elimination pass. It attempts to move evaluation of + expressions executed on all paths to the function exit as early as + possible. This primarily helps improve code size, but can improve + the speed of the generated code as well. It is enabled by the + -fcode-hoisting option and at the -O2 optimization level or higher + (and -Os). + * A new interprocedural bitwise constant propagation optimization has + been added, which propagates knowledge about which bits of + variables are known to be zero (including pointer alignment + information) across the call graph. It is enabled by the + -fipa-bit-cp option if -fipa-cp is enabled as well, and is enabled + at the -O2 optimization level and higher (and -Os). This + optimization supersedes interprocedural alignment propagation of + GCC 6, and therefore the option -fipa-cp-alignment is now + deprecated and ignored. + * A new interprocedural value range propagation optimization has been + added, which propagates integral range information across the call + graph when variable values can be proven to be within those ranges. + It is enabled by the -fipa-vrp option and at the -O2 optimization + level and higher (and -Os). + * A new loop splitting optimization pass has been added. Certain + loops which contain a condition that is always true on one side of + the iteration space and always false on the other are split into + two loops, such that each of the two new loops iterates on just one + side of the iteration space and the condition does not need to be + checked inside of the loop. It is enabled by the -fsplit-loops + option and at the -O3 optimization level or higher. + * The shrink-wrapping optimization can now separate portions of + prologues and epilogues to improve performance if some of the work + done traditionally by prologues and epilogues is not needed on + certain paths. This is controlled by the -fshrink-wrap-separate + option, enabled by default. It requires target support, which is + currently only implemented in the PowerPC and AArch64 ports. + * AddressSanitizer gained a new sanitization option, + -fsanitize-address-use-after-scope, which enables sanitization of + variables whose address is taken and used after a scope where the + variable is defined: + +int +main (int argc, char **argv) +{ + char *ptr; + { + char my_char; + ptr = &my_char; + } + + *ptr = 123; + return *ptr; +} + +==28882==ERROR: AddressSanitizer: stack-use-after-scope on address 0x7fffb8dba99 +0 at pc 0x0000004006d5 bp 0x7fffb8dba960 sp 0x7fffb8dba958 +WRITE of size 1 at 0x7fffb8dba990 thread T0 + #0 0x4006d4 in main /tmp/use-after-scope-1.c:10 + #1 0x7f9c71943290 in __libc_start_main (/lib64/libc.so.6+0x20290) + #2 0x400739 in _start (/tmp/a.out+0x400739) + +Address 0x7fffb8dba990 is located in stack of thread T0 at offset 32 in frame + #0 0x40067f in main /tmp/use-after-scope-1.c:3 + + This frame has 1 object(s): + [32, 33) 'my_char' <== Memory access at offset 32 is inside this variable + + The option is enabled by default with -fsanitize=address and + disabled by default with -fsanitize=kernel-address. Compared to the + LLVM compiler, where the option already exists, the implementation + in the GCC compiler has some improvements and advantages: + + Complex uses of gotos and case labels are properly handled and + should not report any false positive or false negatives. + + C++ temporaries are sanitized. + + Sanitization can handle invalid memory stores that are + optimized out by the LLVM compiler when optimization is + enabled. + * The -fsanitize=signed-integer-overflow suboption of the + UndefinedBehavior Sanitizer now diagnoses arithmetic overflows even + on arithmetic operations with generic vectors. + * Version 5 of the DWARF debugging information standard is supported + through the -gdwarf-5 option. The DWARF version 4 debugging + information remains the default until consumers of debugging + information are adjusted. + +[7]New Languages and Language specific improvements + + OpenACC support in C, C++, and Fortran continues to be maintained and + improved. See the [8]OpenACC and [9]Offloading wiki pages for further + information. + + [10]Ada + + * On mainstream native platforms, Ada programs no longer require the + stack to be made executable in order to run properly. + + [11]BRIG (HSAIL) + + Support for processing BRIG 1.0 files was added in this release. BRIG + is a binary format for HSAIL (Heterogeneous System Architecture + Intermediate Language). The BRIG front end can be used for implementing + HSAIL "finalizers" (compilation of HSAIL to a native ISA) for + GCC-supported targets. An implementation of an HSAIL runtime library, + libhsail-rt is also included. + + [12]C family + + * New command-line options have been added for the C and C++ + compilers: + + -Wimplicit-fallthrough warns when a switch case falls through. + This warning has five different levels. The compiler is able + to parse a wide range of fallthrough comments, depending on + the level. It also handles control-flow statements, such as + ifs. It's possible to suppress the warning by either adding a + fallthrough comment, or by using a null statement: + __attribute__ ((fallthrough)); (C, C++), or [[fallthrough]]; + (C++17), or [[gnu::fallthrough]]; (C++11/C++14). This warning + is enabled by -Wextra. + + -Wpointer-compare warns when a pointer is compared with a zero + character constant. Such code is now invalid in C++11 and GCC + rejects it. This warning is enabled by default. + + -Wduplicated-branches warns when an if-else has identical + branches. + + -Wrestrict warns when an argument passed to a + restrict-qualified parameter aliases with another argument. + + -Wmemset-elt-size warns for memset calls, when the first + argument references an array, and the third argument is a + number equal to the number of elements of the array, but not + the size of the array. This warning is enabled by -Wall. + + -Wint-in-bool-context warns about suspicious uses of integer + values where boolean values are expected. This warning is + enabled by -Wall. + + -Wswitch-unreachable warns when a switch statement has + statements between the controlling expression and the first + case label which will never be executed. This warning is + enabled by default. + + -Wexpansion-to-defined warns when defined is used outside #if. + This warning is enabled by -Wextra or -Wpedantic. + + -Wregister warns about uses of the register storage specifier. + In C++17 this keyword has been removed and for C++17 this is a + pedantic warning enabled by default. The warning is not + emitted for the GNU Explicit Register Variables extension. + + -Wvla-larger-than=N warns about unbounded uses of + variable-length arrays, and about bounded uses of + variable-length arrays whose bound can be larger than N bytes. + + -Wduplicate-decl-specifier warns when a declaration has + duplicate const, volatile, restrict or _Atomic specifier. This + warning is enabled by -Wall. + * GCC 6's C and C++ front ends were able to offer suggestions for + misspelled field names: + +spellcheck-fields.cc:52:13: error: 'struct s' has no member named 'colour'; did +you mean 'color'? + return ptr->colour; + ^~~~~~ + + GCC 7 greatly expands the scope of these suggestions. Firstly, it + adds fix-it hints to such suggestions: + +spellcheck-fields.cc:52:13: error: 'struct s' has no member named 'colour'; did +you mean 'color'? + return ptr->colour; + ^~~~~~ + color + + The suggestions now cover many other things, such as misspelled + function names: + +spellcheck-identifiers.c:11:3: warning: implicit declaration of function 'gtk_wi +dget_showall'; did you mean 'gtk_widget_show_all'? [-Wimplicit-function-declarat +ion] + gtk_widget_showall (w); + ^~~~~~~~~~~~~~~~~~ + gtk_widget_show_all + + misspelled macro names and enum values: + +spellcheck-identifiers.cc:85:11: error: 'MAX_ITEM' undeclared here (not in a fun +ction); did you mean 'MAX_ITEMS'? + int array[MAX_ITEM]; + ^~~~~~~~ + MAX_ITEMS + + misspelled type names: + +spellcheck-typenames.c:7:14: error: unknown type name 'singed'; did you mean 'si +gned'? + void test (singed char e); + ^~~~~~ + signed + + and, in the C front end, named initializers: + +test.c:7:20: error: 'struct s' has no member named 'colour'; did you mean 'color +'? + struct s test = { .colour = 3 }; + ^~~~~~ + color + + * The preprocessor can now offer suggestions for misspelled + directives, e.g.: + +test.c:5:2: error:invalid preprocessing directive #endfi; did you mean #endif? + #endfi + ^~~~~ + endif + + * Warnings about format strings now underline the pertinent part of + the string, and can offer suggested fixes. In some cases, the + pertinent argument is underlined. + +test.c:51:29: warning: format '%s' expects argument of type 'char *', but argume +nt 3 has type 'int' [-Wformat=] + printf ("foo: %d bar: %s baz: %d", 100, i + j, 102); + ~^ ~~~~~ + %d + + * The new -Wdangling-else command-line option has been split out of + -Wparentheses and warns about dangling else. + * The -Wshadow warning has been split into three variants. + -Wshadow=global warns for any shadowing. This is the default when + using -Wshadow without any argument. -Wshadow=local only warns for + a local variable shadowing another local variable or parameter. + -Wshadow=compatible-local only warns for a local variable shadowing + another local variable or parameter whose type is compatible (in + C++ compatible means that the type of the shadowing variable can be + converted to that of the shadowed variable). + The following example shows the different kinds of shadow warnings: + +enum operation { add, count }; +struct container { int nr; }; + +int +container_count (struct container c, int count) +{ + int r = 0; + for (int count = 0; count > 0; count--) + { + struct container count = c; + r += count.nr; + } + return r; +} + + -Wshadow=compatible-local will warn for the parameter being + shadowed with the same type: + +warn-test.c:8:12: warning: declaration of 'count' shadows a parameter [-Wshadow= +compatible-local] + for (int count = 0; count > 0; count--) + ^~~~~ +warn-test.c:5:42: note: shadowed declaration is here + container_count (struct container c, int count) + ^~~~~ + + -Wshadow=local will warn for the above and for the shadowed + declaration with incompatible type: + +warn-test.c:10:24: warning: declaration of 'count' shadows a previous local [-Ws +hadow=local] + struct container count = c; + ^~~~~ +warn-test.c:8:12: note: shadowed declaration is here + for (int count = 0; count > 0; count--) + ^~~~~ + + -Wshadow=global will warn for all of the above and the shadowing of + the global declaration: + +warn-test.c:5:42: warning: declaration of 'count' shadows a global declaration [ +-Wshadow] + container_count (struct container c, int count) + ^~~~~ +warn-test.c:1:23: note: shadowed declaration is here + enum operation { add, count }; + ^~~~~ + + * GCC 7 contains a number of enhancements that help detect buffer + overflow and other forms of invalid memory accesses. + + The -Walloc-size-larger-than=size option detects calls to + standard and user-defined memory allocation functions + decorated with attribute alloc_size whose argument exceeds the + specified size (PTRDIFF_MAX by default). The option also + detects arithmetic overflow in the computation of the size in + two-argument allocation functions like calloc where the total + size is the product of the two arguments. Since calls with an + excessive size cannot succeed they are typically the result of + programming errors. Such bugs have been known to be the source + of security vulnerabilities and a target of exploits. + -Walloc-size-larger-than=PTRDIFF_MAX is included in -Wall. + For example, the following call to malloc incorrectly tries to + avoid passing a negative argument to the function and instead + ends up unconditionally invoking it with an argument less than + or equal to zero. Since after conversion to the type of the + argument of the function (size_t) a negative argument results + in a value in excess of the maximum PTRDIFF_MAX the call is + diagnosed. + +void* f (int n) +{ + return malloc (n > 0 ? 0 : n); +} + +warning: argument 1 range [2147483648, 4294967295] exceeds maximum object size 2 +147483647 [-Walloc-size-larger-than=] + + + The -Walloc-zero option detects calls to standard and + user-defined memory allocation functions decorated with + attribute alloc_size with a zero argument. -Walloc-zero is not + included in either -Wall or -Wextra and must be explicitly + enabled. + + The -Walloca option detects all calls to the alloca function + in the program. -Walloca is not included in either -Wall or + -Wextra and must be explicitly enabled. + + The -Walloca-larger-than=size option detects calls to the + alloca function whose argument either may exceed the specified + size, or that is not known to be sufficiently constrained to + avoid exceeding it. -Walloca-larger-than is not included in + either -Wall or -Wextra and must be explicitly enabled. + For example, compiling the following snippet with + -Walloca-larger-than=1024 results in a warning because even + though the code appears to call alloca only with sizes of 1kb + and less, since n is signed, a negative value would result in + a call to the function well in excess of the limit. + +void f (int n) +{ + char *d; + if (n < 1025) + d = alloca (n); + else + d = malloc (n); + … +} + +warning: argument to 'alloca may be too large due to conversion from 'int' to 'l +ong unsigned int' [-Walloca-larger-than=] + + In contrast, a call to alloca that isn't bounded at all such + as in the following function will elicit the warning below + regardless of the size argument to the option. + +void f (size_t n) +{ + char *d = alloca (n); + … +} + +warning: unbounded use of 'alloca' [-Walloca-larger-than=] + + + The -Wformat-overflow=level option detects certain and likely + buffer overflow in calls to the sprintf family of formatted + output functions. Although the option is enabled even without + optimization it works best with -O2 and higher. + For example, in the following snippet the call to sprintf is + diagnosed because even though its output has been constrained + using the modulo operation it could result in as many as three + bytes if mday were negative. The solution is to either + allocate a larger buffer or make sure the argument is not + negative, for example by changing mday's type to unsigned or + by making the type of the second operand of the modulo + expression unsigned: 100U. + +void* f (int mday) +{ + char *buf = malloc (3); + sprintf (buf, "%02i", mday % 100); + return buf; +} + +warning: 'sprintf may write a terminating nul past the end of the destination [- +Wformat-overflow=] +note: 'sprintf' output between 3 and 4 bytes into a destination of size 3 + + + The -Wformat-truncation=level option detects certain and + likely output truncation in calls to the snprintf family of + formatted output functions. -Wformat-truncation=1 is included + in -Wall and enabled without optimization but works best with + -O2 and higher. + For example, the following function attempts to format an + integer between 0 and 255 in hexadecimal, including the 0x + prefix, into a buffer of four characters. But since the + function must always terminate output by the null character + ('\0') such a buffer is only big enough to fit just one digit + plus the prefix. Therefore the snprintf call is diagnosed. To + avoid the warning either use a bigger buffer or handle the + function's return value which indicates whether or not its + output has been truncated. + +void f (unsigned x) +{ + char d[4]; + snprintf (d, sizeof d, "%#02x", x & 0xff); + … +} + +warning: 'snprintf' output may be truncated before the last format character [-W +format-truncation=] +note: 'snprintf' output between 3 and 5 bytes into a destination of size 4 + + + The -Wnonnull option has been enhanced to detect a broader set + of cases of passing null pointers to functions that expect a + non-null argument (those decorated with attribute nonnull). By + taking advantage of optimizations the option can detect many + more cases of the problem than in prior GCC versions. + + The -Wstringop-overflow=type option detects buffer overflow in + calls to string handling functions like memcpy and strcpy. The + option relies on [13]Object Size Checking and has an effect + similar to defining the _FORTIFY_SOURCE macro. + -Wstringop-overflow=2 is enabled by default. + For example, in the following snippet, because the call to + strncat specifies a maximum that allows the function to write + past the end of the destination, it is diagnosed. To correct + the problem and avoid the overflow the function should be + called with a size of at most sizeof d - strlen(d) - 1. + +void f (const char *fname) +{ + char d[8]; + strncpy (d, "/tmp/", sizeof d); + strncat (d, fname, sizeof d); + … +} + +warning: specified bound 8 equals the size of the destination [-Wstringop-overfl +ow=] + + * The header provided by GCC defines macros such as + INT_WIDTH for the width in bits of integer types, if + __STDC_WANT_IEC_60559_BFP_EXT__ is defined before the header is + included. The header defines such macros as SIZE_WIDTH + and INTMAX_WIDTH for the width of some standard typedef names for + integer types, again if __STDC_WANT_IEC_60559_BFP_EXT__ is defined + before the header is included; note that GCC's implementation of + this header is only used for freestanding compilations, not hosted + compilations, on most systems. These macros come from ISO/IEC TS + 18661-1:2014. + * The header provided by GCC defines the macro + CR_DECIMAL_DIG, from ISO/IEC TS 18661-1:2014, if + __STDC_WANT_IEC_60559_BFP_EXT__ is defined before the header is + included. This represents the number of decimal digits for which + conversions between decimal character strings and binary formats, + in both directions, are correctly rounded, and currently has the + value of UINTMAX_MAX on all systems, reflecting that GCC's + compile-time conversions are correctly rounded for any number of + digits. + * New __builtin_add_overflow_p, __builtin_sub_overflow_p, + __builtin_mul_overflow_p built-in functions have been added. These + work similarly to their siblings without the _p suffix, but do not + actually store the result of the arithmetics anywhere, just return + whether the operation would overflow. Calls to these built-ins with + integer constant arguments evaluate to integer constants + expressions. + For example, in the following, c is assigned the result of a * b + only if the multiplication does not overflow, otherwise it is + assigned the value zero. The multiplication is performed at + compile-time and without triggering a -Woverflow warning. + +enum { + a = 12345678, + b = 87654321, + c = __builtin_mul_overflow_p (a, b, a) ? 0 : a * b +}; + + [14]C + + * The C front end now supports type names _FloatN for floating-point + types with IEEE interchange formats and _FloatNx for floating-point + types with IEEE extended formats. These type names come from + ISO/IEC TS 18661-3:2015. + The set of types supported depends on the target for which GCC is + configured. Most targets support _Float32, _Float32x and _Float64. + _Float128 is supported on targets where IEEE binary128 encoding was + already supported as long double or __float128. _Float64x is + supported on targets where a type with either binary128 or Intel + extended precision format is available. + Constants with these types are supported using suffixes fN, FN, fNx + and FNx (e.g., 1.2f128 or 2.3F64x). Macros such as FLT128_MAX are + defined in if __STDC_WANT_IEC_60559_TYPES_EXT__ is + defined before it is included. + These new types are always distinct from each other and from float, + double and long double, even if they have the same encoding. + Complex types such as _Complex _Float128 are also supported. + Type-generic built-in functions such as __builtin_isinf support the + new types, and the following type-specific built-in functions have + versions (suffixed fN or fNx) for the new types: + __builtin_copysign, __builtin_fabs, __builtin_huge_val, + __builtin_inf, __builtin_nan, __builtin_nans. + * Compilation with -fopenmp is now compatible with the C11 _Atomic + keyword. + + [15]C++ + + * The C++ front end has experimental support for all of the current + C++17 draft with the -std=c++1z or -std=gnu++1z flags, including if + constexpr, class template argument deduction, auto template + parameters, and structured bindings. For a full list of new + features, see [16]the C++ status page. + * C++17 support for new of over-aligned types can be enabled in other + modes with the -faligned-new flag. + * The C++17 evaluation order requirements can be selected in other + modes with the -fstrong-eval-order flag, or disabled in C++17 mode + with -fno-strong-eval-order. + * The default semantics of inherited constructors has changed in all + modes, following [17]P0136. Essentially, overload resolution + happens as if calling the inherited constructor directly, and the + compiler fills in construction of the other bases and members as + needed. Most uses should not need any changes. The old behavior can + be restored with -fno-new-inheriting-ctors, or -fabi-version less + than 11. + * The resolution of DR 150 on matching of template template + parameters, allowing default template arguments to make a template + match a parameter, is currently enabled by default in C++17 mode + only. The default can be overridden with -f{no-,}new-ttp-matching. + * The C++ front end will now provide fix-it hints for some missing + semicolons, allowing for automatic fixes by IDEs: + +test.cc:4:11: error: expected ';' after class definition + class a {} + ^ + ; + + * -Waligned-new has been added to the C++ front end. It warns about + new of type with extended alignment without -faligned-new. + + [18]Runtime Library (libstdc++) + + * The type of exception thrown by iostreams, std::ios_base::failure, + now uses the [19]cxx11 ABI. + * Experimental support for C++17, including the following new + features: + + std::string_view; + + std::any, std::optional, and std::variant; + + std::invoke, std::is_invocable, std::is_nothrow_invocable, and + invoke_result; + + std::is_swappable, and std::is_nothrow_swappable; + + std::apply, and std::make_from_tuple; + + std::void_t, std::bool_constant, std::conjunction, + std::disjunction, and std::negation; + + Variable templates for type traits; + + Mathematical Special Functions; + + std::chrono::floor, std::chrono::ceil, std::chrono::round, and + std::chrono::abs; + + std::clamp, std::gcd, std::lcm, 3-dimensional std::hypot; + + std::scoped_lock, std::shared_mutex, + std::atomic::is_always_lock_free; + + std::sample, std::default_searcher, std::boyer_moore_searcher + and std::boyer_moore_horspool_searcher; + + Extraction and re-insertion of map and set nodes, try_emplace + members for maps, and functions for accessing containers + std::size, std::empty, and std::data; + + std::shared_ptr support for arrays, + std::shared_ptr::weak_type, + std::enable_shared_from_this::weak_from_this(), and + std::owner_less; + + std::byte; + + std::as_const, std::not_fn, + std::has_unique_object_representations, constexpr + std::addressof. + Thanks to Daniel Krügler, Tim Shen, Edward Smith-Rowland, and Ville + Voutilainen for work on the C++17 support. + * A new power-of-two rehashing policy for use with the _Hashtable + internals, thanks to François Dumont. + + [20]Fortran + + * Support for a number of extensions for compatibility with legacy + code with new flags: + + -fdec-structure Support for DEC STRUCTURE and UNION + + -fdec-intrinsic-ints Support for new integer intrinsics with + B/I/J/K prefixes such as BABS, JIAND... + + -fdec-math Support for additional math intrinsics, including + COTAN and degree-valued trigonometric functions such as TAND, + ASIND... + + -fdec Enable the -fdec-* family of extensions. + * New flag -finit-derived to allow default initialization of + derived-type variables. + * Improved DO loops with step equal to 1 or -1, generates faster code + without a loop preheader. A new warning, -Wundefined-do-loop, warns + when a loop iterates either to HUGE(i) (with step equal to 1), or + to -HUGE(i) (with step equal to -1). Invalid behavior can be caught + at run time with -fcheck=do enabled: + +program test + implicit none + integer(1) :: i + do i = -HUGE(i)+10, -HUGE(i)-1, -1 + print *, i + end do +end program test + +At line 8 of file do_check_12.f90 +Fortran runtime error: Loop iterates infinitely + + * Version 4.5 of the [21]OpenMP specification is now partially + supported in the Fortran compiler; the largest missing item is + structure element mapping. + * User-defined derived-type input/output (UDTIO) is added. + * Derived type coarrays with allocatable and pointer components are + partially supported. + * Non-constant stop codes and error stop codes (Fortran 2015 + feature). + * Derived types with allocatable components of recursive type. + * Intrinsic assignment to polymorphic variables. + * Improved submodule support. + * Improved diagnostics (polymorphic results in pure functions). + * Coarray: Support for failed images (Fortan 2015 feature). + + [22]Go + + * GCC 7 provides a complete implementation of the Go 1.8.1 user + packages. + * Compared to the Go 1.8.1 toolchain, the garbage collector is more + conservative and less concurrent. + * Escape analysis is available for experimental use via the + -fgo-optimize-allocs option. The -fgo-debug-escape prints + information useful for debugging escape analysis choices. + + [23]Java (GCJ) + + The GCC Java front end and associated libjava runtime library have been + removed from GCC. + +[24]libgccjit + + The libgccjit API gained support for marking calls as requiring + tail-call optimization via a new entry point: + [25]gcc_jit_rvalue_set_bool_require_tail_call. + + libgccjit performs numerous checks at the API boundary, but if these + succeed, it previously ignored errors and other diagnostics emitted + within the core of GCC, and treated the compile of a gcc_jit_context as + having succeeded. As of GCC 7 it now ensures that if any diagnostics + are emitted, they are visible from the libgccjit API, and that the the + context is flagged as having failed. + +[26]New Targets and Target Specific Improvements + + [27]AArch64 + + * GCC has been updated to the latest revision of the procedure call + standard (AAPCS64) to provide support for parameter passing when + data types have been over-aligned. + * The ARMv8.3-A architecture is now supported. It can be used by + specifying the -march=armv8.3-a option. + * The option -msign-return-address= is supported to enable return + address protection using ARMv8.3-A Pointer Authentication + Extensions. For more information on the arguments accepted by this + option, please refer to [28]AArch64-Options. + * The ARMv8.2-A architecture and the ARMv8.2-A 16-bit Floating-Point + Extensions are now supported. They can be used by specifying the + -march=armv8.2-a or -march=armv8.2-a+fp16 options. The 16-bit + Floating-Point Extensions introduce new half-precision data + processing floating-point instructions. + * Support has been added for the following processors (GCC + identifiers in parentheses): ARM Cortex-A73 (cortex-a73), Broadcom + Vulcan (vulcan), Cavium ThunderX CN81xx (thunderxt81), Cavium + ThunderX CN83xx (thunderxt83), Cavium ThunderX CN88xx + (thunderxt88), Cavium ThunderX CN88xx pass 1.x (thunderxt88p1), + Cavium ThunderX 2 CN99xx (thunderx2t99), Qualcomm Falkor (falkor). + The GCC identifiers can be used as arguments to the -mcpu or -mtune + options, for example: -mcpu=cortex-a73 or -mtune=vulcan or as + arguments to the equivalent target attributes and pragmas. + + [29]ARC + + * Added support for ARC HS and ARC EM processors. + * Added support for ARC EM variation found in Intel QuarkSE SoCs. + * Added support for NPS400 ARC700 based CPUs. + * Thread Local Storage is now supported by ARC CPUs. + * Fixed errors for ARC600 when using 32x16 multiplier option. + * Fixed PIE for ARC CPUs. + * New CPU templates are supported via multilib. + + [30]ARM + + * Support for the ARMv5 and ARMv5E architectures has been deprecated + (which have no known implementations) and will be removed in a + future GCC release. Note that ARMv5T, ARMv5TE and ARMv5TEJ + architectures remain supported. The values armv5 and armv5e of + -march are thus deprecated. + * The ARMv8.2-A architecture and the ARMv8.2-A 16-bit Floating-Point + Extensions are now supported. They can be used by specifying the + -march=armv8.2-a or -march=armv8.2-a+fp16 options. The 16-bit + Floating-Point Extensions introduce new half-precision data + processing floating-point instructions. + * The ARMv8-M architecture is now supported in its two architecture + profiles: ARMv8-M Baseline and ARMv8-M Mainline with its DSP and + Floating-Point Extensions. They can be used by specifying the + -march=armv8-m.base, armv8-m.main or armv8-m.main+dsp options. + * Support has been added for the following processors (GCC + identifiers in parentheses): ARM Cortex-A73 (cortex-a73), ARM + Cortex-M23 (cortex-m23) and ARM Cortex-M33 (cortex-m33). The GCC + identifiers can be used as arguments to the -mcpu or -mtune + options, for example: -mcpu=cortex-a73 or -mtune=cortex-m33. + * A new command-line option -mpure-code has been added. It does not + allow constant data to be placed in code sections. This option is + only available when generating non-PIC code for ARMv7-M targets. + * Support for the ACLE Coprocessor Intrinsics has been added. This + enables the generation of coprocessor instructions through the use + of intrinsics such as cdp, ldc, and others. + * The configure option --with-multilib-list now accepts the value + rmprofile to build multilib libraries for a range of embedded + targets. See our [31]installation instructions for details. + + [32]AVR + + * On the reduced Tiny cores, the progmem [33]variable attribute is + now properly supported. Respective read-only variables are located + in flash memory in section .progmem.data. No special code is needed + to access such variables; the compiler automatically adds an offset + of 0x4000 to all addresses, which is needed to access variables in + flash memory. As opposed to ordinary cores where it is sufficient + to specify the progmem attribute with definitions, on the reduced + Tiny cores the attribute also has to be specified with (external) + declarations: + +extern const int array[] __attribute__((__progmem__)); + +int get_value2 (void) +{ + /* Access via addresses array + 0x4004 and array + 0x4005. */ + return array[2]; +} + +const int* get_address (unsigned idx) +{ + /* Returns array + 0x4000 + 2 * idx. */ + return &array[idx]; +} + + * A new command-line option -Wmisspelled-isr has been added. It turns + off — or turns into errors — warnings that are reported for + interrupt service routines (ISRs) which don't follow AVR-LibC's + naming convention of prefixing ISR names with __vector. + * __builtin_avr_nops(n) is a new [34]built-in function that inserts n + NOP instructions into the instruction stream. n must be a value + known at compile time. + + [35]IA-32/x86-64 + + * Support for the AVX-512 Fused Multiply Accumulation Packed Single + precision (4FMAPS), AVX-512 Vector Neural Network Instructions Word + variable precision (4VNNIW), AVX-512 Vector Population Count + (VPOPCNTDQ) and Software Guard Extensions (SGX) ISA extensions has + been added. + + [36]NVPTX + + * OpenMP target regions can now be offloaded to NVidia PTX GPGPUs. + See the [37]Offloading Wiki on how to configure it. + + [38]PowerPC / PowerPC64 / RS6000 + + * The PowerPC port now uses LRA by default. + * GCC now diagnoses inline assembly that clobbers register r2. This + has always been invalid code, and is no longer quietly tolerated. + * The PowerPC port's support for ISA 3.0 (-mcpu=power9) has been + enhanced to generate more of the new instructions by default, and + to provide more built-in functions to generate code for other new + instructions. + * The configuration option --enable-gnu-indirect-function is now + enabled by default on PowerPC GNU/Linux builds. + * The PowerPC port will now allow 64-bit and 32-bit integer types to + be allocated to the VSX vector registers (ISA 2.06 and above). In + addition, on ISA 3.0, 16-bit and 8-bit integer types can be + allocated in the vector registers. Previously, only 64-bit integer + types were allowed in the traditional floating point registers. + * New options -mstack-protector-guard=global, + -mstack-protector-guard=tls, -mstack-protector-guard-reg=, and + -mstack-protector-guard-offset= change how the stack protector gets + the value to use as canary. + + [39]S/390, System z, IBM z Systems, IBM Z + + * Support for the IBM z14 processor has been added. When using the + -march=z14 option, the compiler will generate code making use of + the new instructions introduced with the vector enhancement + facility and the miscellaneous instruction extension facility 2. + The -mtune=z14 option enables z14 specific instruction scheduling + without making use of new instructions. + * Builtins for the new vector instructions have been added and can be + enabled using the -mzvector option. + + [40]RISC-V + + * Support for the RISC-V instruction set has been added. + + [41]RX + + Basic support for atomic built-in function has been added. It is + currently implemented by flipping interrupts off and on as needed. + + [42]SH + + * Support for SH5/SH64 has been removed. + * Improved utilization of delay slots on SH2A. + * Improved utilization of zero-displacement conditional branches. + * The following deprecated options have been removed + + -mcbranchdi + + -mcmpeqdi + + -minvalid-symbols + + -msoft-atomic + + -mspace + + -madjust-unroll + * Support for the following SH2A instructions has been added + + mov.b @-Rm,R0 + + mov.w @-Rm,R0 + + mov.l @-Rm,R0 + + mov.b R0,@Rn+ + + mov.w R0,@Rn+ + + mov.l R0,@Rn+ + + [43]SPARC + + * The SPARC port now uses LRA by default. + * Support for the new Subtract-Extended-with-Carry instruction + available in SPARC M7 (Niagara 7) has been added. + +[44]Operating Systems + + [45]AIX + + * Visibility support has been enabled for AIX 7.1 and above. + + [46]Fuchsia + + * Support has been added for the [47]Fuchsia OS. + + [48]RTEMS + + * The ABI changes on ARM so that no short enums are used by default. + +Other significant improvements + + * -fverbose-asm previously emitted information on the meanings of + assembly expressions. This has been extended so that it now also + prints comments showing the source lines that correspond to the + assembly, making it easier to read the generated assembly + (especially with larger functions). For example, given this C + source file: + +int test (int n) +{ + int i; + int total = 0; + + for (i = 0; i < n; i++) + total += i * i; + return total; +} + + -fverbose-asm now gives output similar to this for the function + body (when compiling for x86_64, with -Os): + + .text + .globl test + .type test, @@function +test: +.LFB0: + .cfi_startproc +# example.c:4: int total = 0; + xorl %eax, %eax # +# example.c:6: for (i = 0; i < n; i++) + xorl %edx, %edx # i +.L2: +# example.c:6: for (i = 0; i < n; i++) + cmpl %edi, %edx # n, i + jge .L5 #, +# example.c:7: total += i * i; + movl %edx, %ecx # i, tmp92 + imull %edx, %ecx # i, tmp92 +# example.c:6: for (i = 0; i < n; i++) + incl %edx # i +# example.c:7: total += i * i; + addl %ecx, %eax # tmp92, + jmp .L2 # +.L5: +# example.c:10: } + ret + .cfi_endproc + + * Two new options have been added for printing fix-it hints: + + -fdiagnostics-parseable-fixits allows for fix-it hints to be + emitted in a machine-readable form, suitable for consumption + by IDEs. For example, given: + +spellcheck-fields.cc:52:13: error: 'struct s' has no member named 'colour'; did +you mean 'color'? + return ptr->colour; + ^~~~~~ + color + + it will emit: + +fix-it:"spellcheck-fields.cc":{52:13-52:19}:"color" + + + -fdiagnostics-generate-patch will print a patch in "unified" + format after any diagnostics are printed, showing the result + of applying all fix-it hints. For the above example it would + emit: + +--- spellcheck-fields.cc ++++ spellcheck-fields.cc +@@ -49,5 +49,5 @@ + + color get_color(struct s *ptr) + { +- return ptr->colour; ++ return ptr->color; + } + + * The gcc and g++ driver programs will now provide suggestions for + misspelled arguments to command-line options. + +$ gcc -c test.c -ftls-model=global-dinamic +gcc: error: unknown TLS model 'global-dinamic' +gcc: note: valid arguments to '-ftls-model=' are: global-dynamic initial-exec lo +cal-dynamic local-exec; did you mean 'global-dynamic'? + + * The compiler will now provide suggestions for misspelled + parameters. + +$ gcc -c test.c --param max-early-inliner-iteration=3 +cc1: error: invalid --param name 'max-early-inliner-iteration'; did you mean 'ma +x-early-inliner-iterations'? + + * Profile-guided optimization (PGO) instrumentation, as well as test + coverage (GCOV), can newly instrument constructors (functions marks + with __attribute__((constructor))), destructors and C++ + constructors (and destructors) of classes that are used as the type + of a global variable. + * A new option -fprofile-update=atomic prevents creation of corrupted + profiles created during an instrumentation run (-fprofile=generate) + of an application. The downside of the option is a speed penalty. + Providing -pthread on the command line selects atomic profile + updating (when supported by the target). + * GCC's already extensive testsuite has gained some new capabilities, + to further improve the reliability of the compiler: + + GCC now has an internal unit-testing API and a suite of tests + for programmatic self-testing of subsystems. + + GCC's C front end has been extended so that it can parse dumps + of GCC's internal representations, allowing for DejaGnu tests + that more directly exercise specific optimization passes. This + covers both the [49]GIMPLE representation (for testing + higher-level optimizations) and the [50]RTL representation, + allowing for more direct testing of lower-level details, such + as register allocation and instruction selection. + +[51]GCC 7.1 + + This is the [52]list of problem reports (PRs) from GCC's bug tracking + system that are known to be fixed in the 7.1 release. This list might + not be complete (that is, it is possible that some PRs that have been + fixed are not listed here). + +[53]GCC 7.2 + + This is the [54]list of problem reports (PRs) from GCC's bug tracking + system that are known to be fixed in the 7.2 release. This list might + not be complete (that is, it is possible that some PRs that have been + fixed are not listed here). + + Target Specific Changes + + SPARC + + * Support for the SPARC M8 processor has been added. + * The switches -mfix-ut700 and -mfix-gr712rc have been added to work + around an erratum in LEON3FT processors. + * Use of the Floating-point Multiply Single to Double (FsMULd) + instruction can now be controlled by the -mfsmuld and -fno-fsmuld + options. + + Operating Systems + + RTEMS + + * The Ada run-time support uses now thread-local storage (TLS). + * Support for RISC-V has been added. + * Support for 64-bit PowerPC using the ELFv2 ABI with 64-bit long + double has been added. + +[55]GCC 7.3 + + This is the [56]list of problem reports (PRs) from GCC's bug tracking + system that are known to be fixed in the 7.3 release. This list might + not be complete (that is, it is possible that some PRs that have been + fixed are not listed here). + + Target Specific Changes + + SPARC + + * Workarounds for the four [57]LEON3FT errata GRLIB-TN-0010..0013 + have been added. Relevant errata are activated by the target + specific -mfix-ut699, -mfix-ut700 and -mfix-gr712rc switches. + + Operating Systems + + RTEMS + + * Support has been added for Epiphany target. + +[58]GCC 7.4 + + This is the [59]list of problem reports (PRs) from GCC's bug tracking + system that are known to be fixed in the 7.4 release. This list might + not be complete (that is, it is possible that some PRs that have been + fixed are not listed here). + +[60]GCC 7.5 + + This is the [61]list of problem reports (PRs) from GCC's bug tracking + system that are known to be fixed in the 7.5 release. This list might + not be complete (that is, it is possible that some PRs that have been + fixed are not listed here). + + + For questions related to the use of GCC, please consult these web + pages and the [62]GCC manuals. If that fails, the + [63]gcc-help@gcc.gnu.org mailing list might help. Comments on these + web pages and the development of GCC are welcome on our developer + list at [64]gcc@gcc.gnu.org. All of [65]our lists have public + archives. + + Copyright (C) [66]Free Software Foundation, Inc. Verbatim copying and + distribution of this entire article is permitted in any medium, + provided this notice is preserved. + + These pages are [67]maintained by the GCC team. Last modified + 2025-01-31. + +References + + 1. https://gcc.gnu.org/gcc-7/porting_to.html + 2. https://gcc.gnu.org/onlinedocs/index.html#current + 3. https://gcc.gnu.org/wiki/LRAIsDefault + 4. https://gcc.gnu.org/onlinedocs/gcc-7.1.0/libstdc++/manual/manual/profile_mode.html + 5. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77728 + 6. https://gcc.gnu.org/gcc-7/changes.html#general + 7. https://gcc.gnu.org/gcc-7/changes.html#languages + 8. https://gcc.gnu.org/wiki/OpenACC + 9. https://gcc.gnu.org/wiki/Offloading + 10. https://gcc.gnu.org/gcc-7/changes.html#ada + 11. https://gcc.gnu.org/gcc-7/changes.html#brig + 12. https://gcc.gnu.org/gcc-7/changes.html#c-family + 13. https://gcc.gnu.org/onlinedocs/gcc-7.1.0/gcc/Object-Size-Checking.html + 14. https://gcc.gnu.org/gcc-7/changes.html#c + 15. https://gcc.gnu.org/gcc-7/changes.html#cxx + 16. https://gcc.gnu.org/projects/cxx-status.html#cxx1z + 17. https://wg21.link/p0136 + 18. https://gcc.gnu.org/gcc-7/changes.html#libstdcxx + 19. https://gcc.gnu.org/onlinedocs/gcc-7.1.0/libstdc++/manual/using_dual_abi.html + 20. https://gcc.gnu.org/gcc-7/changes.html#fortran + 21. https://www.openmp.org/specifications/ + 22. https://gcc.gnu.org/gcc-7/changes.html#go + 23. https://gcc.gnu.org/gcc-7/changes.html#java + 24. https://gcc.gnu.org/gcc-7/changes.html#jit + 25. https://gcc.gnu.org/onlinedocs/gcc-7.1.0/jit/topics/expressions.html#gcc_jit_rvalue_set_bool_require_tail_call + 26. https://gcc.gnu.org/gcc-7/changes.html#targets + 27. https://gcc.gnu.org/gcc-7/changes.html#aarch64 + 28. https://gcc.gnu.org/onlinedocs/gcc-7.1.0/gcc/AArch64-Options.html#AArch64-Options + 29. https://gcc.gnu.org/gcc-7/changes.html#arc + 30. https://gcc.gnu.org/gcc-7/changes.html#arm + 31. https://gcc.gnu.org/install/configure.html + 32. https://gcc.gnu.org/gcc-7/changes.html#avr + 33. https://gcc.gnu.org/onlinedocs/gcc-7.1.0/gcc/AVR-Variable-Attributes.html + 34. https://gcc.gnu.org/onlinedocs/gcc-7.1.0/gcc/AVR-Built-in-Functions.html + 35. https://gcc.gnu.org/gcc-7/changes.html#x86 + 36. https://gcc.gnu.org/gcc-7/changes.html#nvptx + 37. https://gcc.gnu.org/wiki/Offloading + 38. https://gcc.gnu.org/gcc-7/changes.html#powerpc + 39. https://gcc.gnu.org/gcc-7/changes.html#s390 + 40. https://gcc.gnu.org/gcc-7/changes.html#riscv + 41. https://gcc.gnu.org/gcc-7/changes.html#rx + 42. https://gcc.gnu.org/gcc-7/changes.html#sh + 43. https://gcc.gnu.org/gcc-7/changes.html#sparc + 44. https://gcc.gnu.org/gcc-7/changes.html#os + 45. https://gcc.gnu.org/gcc-7/changes.html#aix + 46. https://gcc.gnu.org/gcc-7/changes.html#fuchsia + 47. https://fuchsia.googlesource.com/ + 48. https://gcc.gnu.org/gcc-7/changes.html#rtems + 49. https://gcc.gnu.org/onlinedocs/gcc-7.1.0/gccint/GIMPLE-Tests.html + 50. https://gcc.gnu.org/onlinedocs/gcc-7.1.0/gccint/RTL-Tests.html + 51. https://gcc.gnu.org/gcc-7/changes.html#GCC7.1 + 52. https://gcc.gnu.org/bugzilla/buglist.cgi?bug_status=RESOLVED&resolution=FIXED&target_milestone=7.0 + 53. https://gcc.gnu.org/gcc-7/changes.html#GCC7.2 + 54. https://gcc.gnu.org/bugzilla/buglist.cgi?bug_status=RESOLVED&resolution=FIXED&target_milestone=7.2 + 55. https://gcc.gnu.org/gcc-7/changes.html#GCC7.3 + 56. https://gcc.gnu.org/bugzilla/buglist.cgi?bug_status=RESOLVED&resolution=FIXED&target_milestone=7.3 + 57. https://www.gaisler.com/app-notes-tech-notes-and-white-papers + 58. https://gcc.gnu.org/gcc-7/changes.html#GCC7.4 + 59. https://gcc.gnu.org/bugzilla/buglist.cgi?bug_status=RESOLVED&resolution=FIXED&target_milestone=7.4 + 60. https://gcc.gnu.org/gcc-7/changes.html#GCC7.5 + 61. https://gcc.gnu.org/bugzilla/buglist.cgi?bug_status=RESOLVED&resolution=FIXED&target_milestone=7.5 + 62. https://gcc.gnu.org/onlinedocs/ + 63. mailto:gcc-help@gcc.gnu.org + 64. mailto:gcc@gcc.gnu.org + 65. https://gcc.gnu.org/lists.html + 66. https://www.fsf.org/ + 67. https://gcc.gnu.org/about.html +====================================================================== +http://gcc.gnu.org/gcc-6/index.html + GCC 6 Release Series + + (This release series is no longer supported.) + + October 26, 2018 + + The [1]GNU project and the GCC developers are pleased to announce the + release of GCC 6.5. + + This release is a bug-fix release, containing fixes for regressions in + GCC 6.4 relative to previous releases of GCC. + +Release History + + GCC 6.5 + October 26, 2018 ([2]changes, [3]documentation) + + GCC 6.4 + July 4, 2017 ([4]changes, [5]documentation) + + GCC 6.3 + December 21, 2016 ([6]changes, [7]documentation) + + GCC 6.2 + August 22, 2016 ([8]changes, [9]documentation) + + GCC 6.1 + April 27, 2016 ([10]changes, [11]documentation) + +References and Acknowledgements + + GCC used to stand for the GNU C Compiler, but since the compiler + supports several other languages aside from C, it now stands for the + GNU Compiler Collection. + + A list of [12]successful builds is updated as new information becomes + available. + + The GCC developers would like to thank the numerous people that have + contributed new features, improvements, bug fixes, and other changes as + well as test results to GCC. This [13]amazing group of volunteers is + what makes GCC successful. + + For additional information about GCC please refer to the [14]GCC + project web site or contact the [15]GCC development mailing list. + + To obtain GCC please use [16]our mirror sites or [17]our version + control system. + + + For questions related to the use of GCC, please consult these web + pages and the [18]GCC manuals. If that fails, the + [19]gcc-help@gcc.gnu.org mailing list might help. Comments on these + web pages and the development of GCC are welcome on our developer + list at [20]gcc@gcc.gnu.org. All of [21]our lists have public + archives. + + Copyright (C) [22]Free Software Foundation, Inc. Verbatim copying and + distribution of this entire article is permitted in any medium, + provided this notice is preserved. + + These pages are [23]maintained by the GCC team. Last modified + 2024-05-30. + +References + + 1. http://www.gnu.org/ + 2. https://gcc.gnu.org/gcc-6/changes.html + 3. https://gcc.gnu.org/onlinedocs/6.5.0/ + 4. https://gcc.gnu.org/gcc-6/changes.html + 5. https://gcc.gnu.org/onlinedocs/6.4.0/ + 6. https://gcc.gnu.org/gcc-6/changes.html + 7. https://gcc.gnu.org/onlinedocs/6.3.0/ + 8. https://gcc.gnu.org/gcc-6/changes.html + 9. https://gcc.gnu.org/onlinedocs/6.2.0/ + 10. https://gcc.gnu.org/gcc-6/changes.html + 11. https://gcc.gnu.org/onlinedocs/6.1.0/ + 12. https://gcc.gnu.org/gcc-6/buildstat.html + 13. https://gcc.gnu.org/onlinedocs/gcc/Contributors.html + 14. https://gcc.gnu.org/index.html + 15. mailto:gcc@gcc.gnu.org + 16. https://gcc.gnu.org/mirrors.html + 17. https://gcc.gnu.org/git.html + 18. https://gcc.gnu.org/onlinedocs/ + 19. mailto:gcc-help@gcc.gnu.org + 20. mailto:gcc@gcc.gnu.org + 21. https://gcc.gnu.org/lists.html + 22. https://www.fsf.org/ + 23. https://gcc.gnu.org/about.html +====================================================================== +http://gcc.gnu.org/gcc-6/changes.html + GCC 6 Release Series + Changes, New Features, and Fixes + + This page is a brief summary of some of the huge number of improvements + in GCC 6. For more information, see the [1]Porting to GCC 6 page and + the [2]full GCC documentation. + +Caveats + + * The default mode for C++ is now -std=gnu++14 instead of + -std=gnu++98. + * Support for a number of older systems and recently unmaintained or + untested target ports of GCC has been declared obsolete in GCC 6. + Unless there is activity to revive them, the next release of GCC + will have their sources permanently removed. + The following ports for individual systems on particular + architectures have been obsoleted: + + SH5 / SH64 (sh64-*-*) as announced [3]here. + * The AVR port requires binutils version 2.26.1 or later for the fix + for [4]PR71151 to work. + * The GCC 6.5 release has an accidental ABI incompatibility for + nested std::pair objects, for more details see [5]PR 87822. The bug + causes a layout change for pairs where the first member is also a + pair, e.g. std::pair, Z>. The GCC 6 release series + is closed so the bug in GCC 6.5 will not be fixed upstream, but + there is a patch in the bug report to allow it to be fixed by + anybody packaging GCC 6.5 or installing it themselves. + +[6]General Optimizer Improvements + + * UndefinedBehaviorSanitizer gained a new sanitization option, + -fsanitize=bounds-strict, which enables strict checking of array + bounds. In particular, it enables -fsanitize=bounds as well as + instrumentation of flexible array member-like arrays. + * Type-based alias analysis now disambiguates accesses to different + pointers. This improves precision of the alias oracle by about + 20-30% on higher-level C++ programs. Programs doing invalid type + punning of pointer types may now need -fno-strict-aliasing to work + correctly. + * Alias analysis now correctly supports the weakref and alias + attributes. This allows accessing both a variable and its alias in + one translation unit which is common with link-time optimization. + * Value range propagation now assumes that the this pointer in C++ + member functions is non-null. This eliminates common null pointer + checks but also breaks some non-conforming code-bases (such as + Qt-5, Chromium, KDevelop). As a temporary work-around + -fno-delete-null-pointer-checks can be used. Wrong code can be + identified by using -fsanitize=undefined. + * Link-time optimization improvements: + + warning and error attributes are now correctly preserved by + declaration linking and thus -D_FORTIFY_SOURCE=2 is now + supported with -flto. + + Type merging was fixed to handle C and Fortran + interoperability rules as defined by the Fortran 2008 language + standard. + As an exception, CHARACTER(KIND=C_CHAR) is not inter-operable + with char in all cases because it is an array while char is + scalar. INTEGER(KIND=C_SIGNED_CHAR) should be used instead. In + general, this inter-operability cannot be implemented, for + example on targets where the argument passing convention for + arrays differs from scalars. + + More type information is now preserved at link time, reducing + the loss of accuracy of the type-based alias analysis compared + to builds without link-time optimization. + + Invalid type punning on global variables and declarations is + now reported with -Wodr-type-mismatch. + + The size of LTO object files was reduced by about 11% + (measured by compiling Firefox 46.0). + + Link-time parallelization (enabled using -flto=n) was + significantly improved by decreasing the size of streamed data + when partitioning programs. The size of streamed IL while + compiling Firefox 46.0 was reduced by 66%. + + The linker plugin was extended to pass information about the + type of binary produced to the GCC back end. (That can also be + controlled manually by -flinker-output.) This makes it + possible to properly configure the code generator and support + incremental linking. Incremental linking of LTO objects by gcc + -r is now supported for plugin-enabled setups. + There are two ways to perform incremental linking: + 1. Linking by ld -r will result in an object file with all + sections from individual object files mechanically + merged. This delays the actual link-time optimization to + the final linking step and thus permits whole program + optimization. Linking the final binary with such object + files is however slower. + 2. Linking by gcc -r will lead to link-time optimization and + emit the final binary into the object file. Linking such + an object file is fast but avoids any benefits from whole + program optimization. + GCC 7 will support incremental link-time optimization with gcc + -r. + * Inter-procedural optimization improvements: + + Basic jump threading is now performed before profile + construction and inline analysis, resulting in more realistic + size and time estimates that drive the heuristics of the + inliner and function cloning passes. + + Function cloning now more aggressively eliminates unused + function parameters. + +[7]New Languages and Language specific improvements + + Compared to GCC 5, the GCC 6 release series includes a much improved + implementation of the [8]OpenACC 2.0a specification. Highlights are: + * In addition to single-threaded host-fallback execution, offloading + is supported for nvptx (Nvidia GPUs) on x86_64 and PowerPC 64-bit + little-endian GNU/Linux host systems. For nvptx offloading, with + the OpenACC parallel construct, the execution model allows for an + arbitrary number of gangs, up to 32 workers, and 32 vectors. + * Initial support for parallelized execution of OpenACC kernels + constructs: + + Parallelization of a kernels region is switched on by + -fopenacc combined with -O2 or higher. + + Code is offloaded onto multiple gangs, but executes with just + one worker, and a vector length of 1. + + Directives inside a kernels region are not supported. + + Loops with reductions can be parallelized. + + Only kernels regions with one loop nest are parallelized. + + Only the outer-most loop of a loop nest can be parallelized. + + Loop nests containing sibling loops are not parallelized. + Typically, using the OpenACC parallel construct gives much better + performance, compared to the initial support of the OpenACC kernels + construct. + * The device_type clause is not supported. The bind and nohost + clauses are not supported. The host_data directive is not supported + in Fortran. + * Nested parallelism (cf. CUDA dynamic parallelism) is not supported. + * Usage of OpenACC constructs inside multithreaded contexts (such as + created by OpenMP, or pthread programming) is not supported. + * If a call to the acc_on_device function has a compile-time constant + argument, the function call evaluates to a compile-time constant + value only for C and C++ but not for Fortran. + + See the [9]OpenACC and [10]Offloading wiki pages for further + information. + + [11]C family + + * Version 4.5 of the [12]OpenMP specification is now supported in the + C and C++ compilers. + * The C and C++ compilers now support attributes on enumerators. For + instance, it is now possible to mark enumerators as deprecated: + +enum { + newval, + oldval __attribute__ ((deprecated ("too old"))) +}; + + * Source locations for the C and C++ compilers are now tracked as + ranges, rather than just points, making it easier to identify the + subexpression of interest within a complicated expression. For + example: + +test.cc: In function 'int test(int, int, foo, int, int)': +test.cc:5:16: error: no match for 'operator*' (operand types are 'int' and 'foo' +) + return p + q * r * s + t; + ~~^~~ + + In addition, there is now initial support for precise diagnostic + locations within strings: + +format-strings.c:3:14: warning: field width specifier '*' expects a matching 'in +t' argument [-Wformat=] + printf("%*d"); + ^ + + * Diagnostics can now contain "fix-it hints", which are displayed in + context underneath the relevant source code. For example: + +fixits.c: In function 'bad_deref': +fixits.c:11:13: error: 'ptr' is a pointer; did you mean to use '->'? + return ptr.x; + ^ + -> + + * The C and C++ compilers now offer suggestions for misspelled field + names: + +spellcheck-fields.cc:52:13: error: 'struct s' has no member named 'colour'; did +you mean 'color'? + return ptr->colour; + ^~~~~~ + + * New command-line options have been added for the C and C++ + compilers: + + -Wshift-negative-value warns about left shifting a negative + value. + + -Wshift-overflow warns about left shift overflows. This + warning is enabled by default. -Wshift-overflow=2 also warns + about left-shifting 1 into the sign bit. + + -Wtautological-compare warns if a self-comparison always + evaluates to true or false. This warning is enabled by -Wall. + + -Wnull-dereference warns if the compiler detects paths that + trigger erroneous or undefined behavior due to dereferencing a + null pointer. This option is only active when + -fdelete-null-pointer-checks is active, which is enabled by + optimizations in most targets. The precision of the warnings + depends on the optimization options used. + + -Wduplicated-cond warns about duplicated conditions in an + if-else-if chain. + + -Wmisleading-indentation warns about places where the + indentation of the code gives a misleading idea of the block + structure of the code to a human reader. For example, given + [13]CVE-2014-1266: + +sslKeyExchange.c: In function 'SSLVerifySignedServerKeyExchange': +sslKeyExchange.c:629:3: warning: this 'if' clause does not guard... [-Wmisleadin +g-indentation] + if ((err = SSLHashSHA1.update(&hashCtx, &signedParams)) != 0) + ^~ +sslKeyExchange.c:631:5: note: ...this statement, but the latter is misleadingly +indented as if it is guarded by the 'if' + goto fail; + ^~~~ + + This warning is enabled by -Wall. + * The C and C++ compilers now emit saner error messages if + merge-conflict markers are present in a source file. + +test.c:3:1: error: version control conflict marker in file + <<<<<<< HEAD + ^~~~~~~ + + [14]C + + * It is possible to disable warnings when an initialized field of a + structure or a union with side effects is being overridden when + using designated initializers via a new warning option + -Woverride-init-side-effects. + * A new type attribute scalar_storage_order applying to structures + and unions has been introduced. It specifies the storage order (aka + endianness) in memory of scalar fields in structures or unions. + + [15]C++ + + * The default mode has been changed to -std=gnu++14. + * [16]C++ Concepts are now supported when compiling with -fconcepts. + * -flifetime-dse is more aggressive in dead-store elimination in + situations where a memory store to a location precedes a + constructor to that memory location. + * G++ now supports [17]C++17 fold expressions, u8 character literals, + extended static_assert, and nested namespace definitions. + * G++ now allows constant evaluation for all non-type template + arguments. + * G++ now supports C++ Transactional Memory when compiling with + -fgnu-tm. + + [18]Runtime Library (libstdc++) + + * Extensions to the C++ Library to support mathematical special + functions (ISO/IEC 29124:2010), thanks to Edward Smith-Rowland. + * Experimental support for C++17, including the following new + features: + + std::uncaught_exceptions function (this is also available for + -std=gnu++NN modes); + + new member functions try_emplace and insert_or_assign for + unique_key maps; + + non-member functions std::size, std::empty, and std::data for + accessing containers and arrays; + + std::invoke; + + std::shared_mutex; + + std::void_t and std::bool_constant metaprogramming utilities. + Thanks to Ville Voutilainen for contributing many of the C++17 + features. + * An experimental implementation of the File System TS. + * Experimental support for most features of the second version of the + Library Fundamentals TS. This includes polymorphic memory resources + and array support in shared_ptr, thanks to Fan You. + * Some assertions checked by Debug Mode can now also be enabled by + _GLIBCXX_ASSERTIONS. The subset of checks enabled by the new macro + have less run-time overhead than the full _GLIBCXX_DEBUG checks and + don't affect the library ABI, so can be enabled per-translation + unit. + * Timed mutex types are supported on more targets, including Darwin. + * Improved std::locale support for DragonFly and FreeBSD, thanks to + John Marino and Andreas Tobler. + + [19]Fortran + + * Fortran 2008 SUBMODULE support. + * Fortran 2015 EVENT_TYPE, EVENT_POST, EVENT_WAIT, and EVENT_QUERY + support. + * Improved support for Fortran 2003 deferred-length character + variables. + * Improved support for OpenMP and OpenACC. + * The MATMUL intrinsic is now inlined for straightforward cases if + front-end optimization is active. The maximum size for inlining can + be set to n with the -finline-matmul-limit=n option and turned off + with -finline-matmul-limit=0. + * The -Wconversion-extra option will warn about REAL constants which + have excess precision for their kind. + * The -Winteger-division option has been added, which warns about + divisions of integer constants which are truncated. This option is + included in -Wall by default. + +[20]libgccjit + + * The driver code is now run in-process within libgccjit, providing a + small speed-up of the compilation process. + * The API has gained entrypoints for + + [21]timing how long was spent in different parts of code, + + [22]creating switch statements, + + [23]allowing unreachable basic blocks in a function, and + + [24]adding arbitrary command-line options to a compilation. + +[25]New Targets and Target Specific Improvements + + [26]AArch64 + + * A number of AArch64-specific options have been added. The most + important ones are summarised in this section; for more detailed + information please refer to the documentation. + * The command-line options -march=native, -mcpu=native and + -mtune=native are now available on native AArch64 GNU/Linux + systems. Specifying these options causes GCC to auto-detect the + host CPU and choose the optimal setting for that system. + * -fpic is now supported when generating code for the small code + model (-mcmodel=small). The size of the global offset table (GOT) + is limited to 28KiB under the LP64 SysV ABI, and 15KiB under the + ILP32 SysV ABI. + * The AArch64 port now supports target attributes and pragmas. Please + refer to the [27]documentation for details of available attributes + and pragmas as well as usage instructions. + * Link-time optimization across translation units with different + target-specific options is now supported. + * The option -mtls-size= is now supported. It can be used to specify + the bit size of TLS offsets, allowing GCC to generate better TLS + instruction sequences. + * The option -fno-plt is now fully functional. + * The ARMv8.1-A architecture and the Large System Extensions are now + supported. They can be used by specifying the -march=armv8.1-a + option. Additionally, the +lse option extension can be used in a + similar fashion to other option extensions. The Large System + Extensions introduce new instructions that are used in the + implementation of atomic operations. + * The ACLE half-precision floating-point type __fp16 is now supported + in the C and C++ languages. + * The ARM Cortex-A35 processor is now supported via the + -mcpu=cortex-a35 and -mtune=cortex-a35 options as well as the + equivalent target attributes and pragmas. + * The Qualcomm QDF24xx processor is now supported via the + -mcpu=qdf24xx and -mtune=qdf24xx options as well as the equivalent + target attributes and pragmas. + * Code generation for the ARM Cortex-A57 processor is improved. Among + general code generation improvements, a better algorithm is added + for allocating registers to floating-point multiply-accumulate + instructions offering increased performance when compiling with + -mcpu=cortex-a57 or -mtune=cortex-a57. + * Code generation for the ARM Cortex-A53 processor is improved. A + more accurate instruction scheduling model for the processor is now + used, and a number of compiler tuning parameters have been set to + offer increased performance when compiling with -mcpu=cortex-a53 or + -mtune=cortex-a53. + * Code generation for the Samsung Exynos M1 processor is improved. A + more accurate instruction scheduling model for the processor is now + used, and a number of compiler tuning parameters have been set to + offer increased performance when compiling with -mcpu=exynos-m1 or + -mtune=exynos-m1. + * Improvements in the generation of conditional branches and literal + pools allow the compiler to compile functions of a large size. + Constant pools are now placed into separate rodata sections. The + new option -mpc-relative-literal-loads generates per-function + literal pools, limiting the maximum size of functions to 1MiB. + * Several correctness issues generating Advanced SIMD instructions + for big-endian targets have been fixed resulting in improved code + generation for ACLE intrinsics with -mbig-endian. + + [28]ARM + + * Support for revisions of the ARM architecture prior to ARMv4t has + been deprecated and will be removed in a future GCC release. The + -mcpu and -mtune values that are deprecated are: arm2, arm250, + arm3, arm6, arm60, arm600, arm610, arm620, arm7, arm7d, arm7di, + arm70, arm700, arm700i, arm710, arm720, arm710c, arm7100, arm7500, + arm7500fe, arm7m, arm7dm, arm7dmi, arm8, arm810, strongarm, + strongarm110, strongarm1100, strongarm1110, fa526, fa626. The value + arm7tdmi is still supported. The values of -march that are + deprecated are: armv2,armv2a,armv3,armv3m,armv4. + * The ARM port now supports target attributes and pragmas. Please + refer to the [29]documentation for details of available attributes + and pragmas as well as usage instructions. + * Support has been added for the following processors (GCC + identifiers in parentheses): ARM Cortex-A32 (cortex-a32), ARM + Cortex-A35 (cortex-a35) and ARM Cortex-R8 (cortex-r8). The GCC + identifiers can be used as arguments to the -mcpu or -mtune + options, for example: -mcpu=cortex-a32 or -mtune=cortex-a35. + + [30]Heterogeneous Systems Architecture + + * GCC can now generate HSAIL (Heterogeneous System Architecture + Intermediate Language) for simple OpenMP device constructs if + configured with --enable-offload-targets=hsa. A new libgomp plugin + then runs the HSA GPU kernels implementing these constructs on HSA + capable GPUs via a standard HSA run time. + If the HSA compilation back end determines it cannot output HSAIL + for a particular input, it gives a warning by default. These + warnings can be suppressed with -Wno-hsa. To give a few examples, + the HSA back end does not implement compilation of code using + function pointers, automatic allocation of variable sized arrays, + functions with variadic arguments as well as a number of other less + common programming constructs. + When compilation for HSA is enabled, the compiler attempts to + compile composite OpenMP constructs + +#pragma omp target teams distribute parallel for + + into parallel HSA GPU kernels. + + [31]IA-32/x86-64 + + * GCC now supports the Intel CPU named Skylake with AVX-512 + extensions through -march=skylake-avx512. The switch enables the + following ISA extensions: AVX-512F, AVX512VL, AVX-512CD, AVX-512BW, + AVX-512DQ. + * Support for new AMD instructions monitorx and mwaitx has been + added. This includes new intrinsic and built-in support. It is + enabled through option -mmwaitx. The instructions monitorx and + mwaitx implement the same functionality as the old monitor and + mwait instructions. In addition, mwaitx adds a configurable timer. + The timer value is received as third argument and stored in + register %ebx. + * x86-64 targets now allow stack realignment from a word-aligned + stack pointer using the command-line option -mstackrealign or + __attribute__ ((force_align_arg_pointer)). This allows functions + compiled with a vector-aligned stack to be invoked from objects + that keep only word-alignment. + * Support for address spaces __seg_fs, __seg_gs, and __seg_tls. These + can be used to access data via the %fs and %gs segments without + having to resort to inline assembly. Please refer to the + [32]documentation for usage instructions. + * Support for AMD Zen (family 17h) processors is now available + through the -march=znver1 and -mtune=znver1 options. + + [33]MeP + + * Support for the MeP (mep-elf) architecture has been deprecated and + will be removed in a future GCC release. + + [34]MSP430 + + * The MSP430 compiler now has the ability to automatically distribute + code and data between low memory (addresses below 64K) and high + memory. This only applies to parts that actually have both memory + regions and only if the linker script for the part has been + specifically set up to support this feature. + A new attribute of either can be applied to both functions and + data, and this tells the compiler to place the object into low + memory if there is room and into high memory otherwise. Two other + new attributes - lower and upper - can be used to explicitly state + that an object should be placed in the specified memory region. If + there is not enough left in that region the compilation will fail. + Two new command-line options - -mcode-region=[lower|upper|either] + and -mdata-region=[lower|upper|either] - can be used to tell the + compiler what to do with objects that do not have one of these new + attributes. + + [35]PowerPC / PowerPC64 / RS6000 + + * PowerPC64 now supports IEEE 128-bit floating-point using the + __float128 data type. In GCC 6, this is not enabled by default, but + you can enable it with -mfloat128. The IEEE 128-bit floating-point + support requires the use of the VSX instruction set. IEEE 128-bit + floating-point values are passed and returned as a single vector + value. The software emulator for IEEE 128-bit floating-point + support is only built on PowerPC GNU/Linux systems where the + default CPU is at least power7. On future ISA 3.0 systems (POWER 9 + and later), you will be able to use the -mfloat128-hardware option + to use the ISA 3.0 instructions that support IEEE 128-bit + floating-point. An additional type (__ibm128) has been added to + refer to the IBM extended double type that normally implements long + double. This will allow for a future transition to implementing + long double with IEEE 128-bit floating-point. + * Basic support has been added for POWER9 hardware that will use the + recently published OpenPOWER ISA 3.0 instructions. The following + new switches are available: + + -mcpu=power9: Implement all of the ISA 3.0 instructions + supported by the compiler. + + -mtune=power9: In the future, apply tuning for POWER9 systems. + Currently, POWER8 tunings are used. + + -mmodulo: Generate code using the ISA 3.0 integer instructions + (modulus, count trailing zeros, array index support, integer + multiply/add). + + -mpower9-fusion: Generate code to suitably fuse instruction + sequences for a POWER9 system. + + -mpower9-dform: Generate code to use the new D-form + (register+offset) memory instructions for the vector + registers. + + -mpower9-vector: Generate code using the new ISA 3.0 vector + (VSX or Altivec) instructions. + + -mpower9-minmax: Reserved for future development. + + -mtoc-fusion: Keep TOC entries together to provide more fusion + opportunities. + * New constraints have been added to support IEEE 128-bit + floating-point and ISA 3.0 instructions: + + wb: Altivec register if -mpower9-dform is enabled. + + we: VSX register if -mpower9-vector is enabled for 64-bit code + generation. + + wo: VSX register if -mpower9-vector is enabled. + + wp: Reserved for future use if long double is implemented with + IEEE 128-bit floating-point instead of IBM extended double. + + wq: VSX register if -mfloat128 is enabled. + + wF: Memory operand suitable for POWER9 fusion load/store. + + wG: Memory operand suitable for TOC fusion memory references. + + wL: Integer constant identifying the element number mfvsrld + accesses within a vector. + * Support has been added for __builtin_cpu_is() and + __builtin_cpu_supports(), allowing for very fast access to + AT_PLATFORM, AT_HWCAP, and AT_HWCAP2 values. This requires use of + glibc 2.23 or later. + * All hardware transactional memory builtins now correctly behave as + memory barriers. Programmers can use #ifdef __TM_FENCE__ to + determine whether their "old" compiler treats the builtins as + barriers. + * Split-stack support has been added for gccgo on PowerPC64 for both + big- and little-endian (but not for 32-bit). The gold linker from + at least binutils 2.25.1 must be available in the PATH when + configuring and building gccgo to enable split stack. (The + requirement for binutils 2.25.1 applies to PowerPC64 only.) The + split-stack feature allows a small initial stack size to be + allocated for each goroutine, which increases as needed. + * GCC on PowerPC now supports the standard lround function. + * A new configuration option ---with-advance-toolchain=at was added + for PowerPC 64-bit GNU/Linux systems to use the header files, + library files, and the dynamic linker from a specific Advance + Toolchain release instead of the default versions that are provided + by the GNU/Linux distribution. In general, this option is intended + for the developers of GCC, and it is not intended for general use. + * The "q", "S", "T", and "t" asm-constraints have been removed. + * The "b", "B", "m", "M", and "W" format modifiers have been removed. + + [36]S/390, System z, IBM z Systems + + * Support for the IBM z13 processor has been added. When using the + -march=z13 option, the compiler will generate code making use of + the new instructions and registers introduced with the vector + extension facility. The -mtune=z13 option enables z13 specific + instruction scheduling without making use of new instructions. + Compiling code with -march=z13 reduces the default alignment of + vector types bigger than 8 bytes to 8. This is an ABI change and + care must be taken when linking modules compiled with different + arch levels which interchange variables containing vector type + values. For newly compiled code the GNU linker will emit a warning. + * The -mzvector option enables a C/C++ language extension. This + extension provides a new keyword vector which can be used to define + vector type variables. (Note: This is not available when enforcing + strict standard compliance e.g. with -std=c99. Either enable GNU + extensions with e.g. -std=gnu99 or use __vector instead of vector.) + Additionally a set of overloaded builtins is provided which is + partially compatible to the PowerPC Altivec builtins. In order to + make use of these builtins the vecintrin.h header file needs to be + included. + * The new command-line options -march=native, and -mtune=native are + now available on native IBM z Systems. Specifying these options + causes GCC to auto-detect the host CPU and choose the optimal + setting for that system. If GCC is unable to detect the host CPU + these options have no effect. + * The IBM z Systems port now supports target attributes and pragmas. + Please refer to the [37]documentation for details of available + attributes and pragmas as well as usage instructions. + * -fsplit-stack is now supported as part of the IBM z Systems port. + This feature requires a recent gold linker to be used. + * Support for the g5 and g6 -march=/-mtune= CPU level switches has + been deprecated and will be removed in a future GCC release. -m31 + from now on defaults to -march=z900 if not specified otherwise. + -march=native on a g5/g6 machine will default to -march=z900. + + [38]SH + + * Support for SH5 / SH64 has been declared obsolete and will be + removed in future releases. + * Support for the FDPIC ABI has been added. It can be enabled using + the new -mfdpic target option and --enable-fdpic configure option. + + [39]SPARC + + * An ABI bug has been fixed in 64-bit mode. Unfortunately, this + change will break binary compatibility with earlier releases for + code it affects, but this should be pretty rare in practice. The + conditions are: a 16-byte structure containing a double or a 8-byte + vector in the second half is passed to a subprogram in slot #15, + for example as 16th parameter if the first 15 ones have at most 8 + bytes. The double or vector was wrongly passed in floating-point + register %d32 in lieu of on the stack as per the SPARC calling + conventions. + +[40]Operating Systems + + [41]AIX + + * DWARF debugging support for AIX 7.1 has been enabled as an optional + debugging format. A more recent Technology Level (TL) and GCC built + with that level are required for full exploitation of DWARF + debugging capabilities. + + [42]Linux + + * Support for the [43]musl C library was added for the AArch64, ARM, + MicroBlaze, MIPS, MIPS64, PowerPC, PowerPC64, SH, i386, x32 and + x86_64 targets. It can be selected using the new -mmusl option in + case musl is not the default libc. GCC defaults to musl libc if it + is built with a target triplet matching the *-linux-musl* pattern. + + [44]RTEMS + + * The RTEMS thread model implementation changed. Mutexes now use + self-contained objects defined in newlib instead of + Classic API semaphores. The keys for thread specific data and the + once function are directly defined via . Self-contained + condition variables are provided via newlib . The RTEMS + thread model also supports C++11 threads. + * OpenMP support now uses self-contained objects provided by newlib + and offers a significantly better performance compared + to the POSIX configuration of libgomp. It is possible to configure + thread pools for each scheduler instance via the environment + variable GOMP_RTEMS_THREAD_POOLS. + + [45]Solaris + + * Solaris 12 is now fully supported. Minimal support had already been + present in GCC 5.3. + * Solaris 12 provides a full set of startup files (crt1.o, crti.o, + crtn.o), which GCC now prefers over its own ones. + * Position independent executables (PIE) are now supported on Solaris + 12. + * Constructor priority is now supported on Solaris 12 with the system + linker. + * libvtv has been ported to Solaris 11 and up. + + [46]Windows + + * The option -mstackrealign is now automatically activated in 32-bit + mode whenever the use of SSE instructions is requested. + +Other significant improvements + + * The gcc and g++ driver programs will now provide suggestions for + misspelled command-line options. + +$ gcc -static-libfortran test.f95 +gcc: error: unrecognized command line option '-static-libfortran'; did you mean +'-static-libgfortran'? + + * The --enable-default-pie configure option enables generation of PIE + by default. + + [47]GCC 6.2 + + This is the [48]list of problem reports (PRs) from GCC's bug tracking + system that are known to be fixed in the 6.2 release. This list might + not be complete (that is, it is possible that some PRs that have been + fixed are not listed here). + +Target Specific Changes + + SPARC + + * Support for --with-cpu-32 and --with-cpu-64 configure options has + been added on bi-architecture platforms. + * Support for the SPARC M7 (Niagara 7) processor has been added. + * Support for the VIS 4.0 instruction set has been added. + + [49]GCC 6.3 + + This is the [50]list of problem reports (PRs) from GCC's bug tracking + system that are known to be fixed in the 6.3 release. This list might + not be complete (that is, it is possible that some PRs that have been + fixed are not listed here). + +Target Specific Changes + + IA-32/x86-64 + + * Support for the [51]deprecated pcommit instruction has been + removed. + + [52]GCC 6.4 + + This is the [53]list of problem reports (PRs) from GCC's bug tracking + system that are known to be fixed in the 6.4 release. This list might + not be complete (that is, it is possible that some PRs that have been + fixed are not listed here). + +[54]Operating Systems + + [55]RTEMS + + * The ABI changes on ARM so that no short enums are used by default. + + [56]GCC 6.5 + + This is the [57]list of problem reports (PRs) from GCC's bug tracking + system that are known to be fixed in the 6.5 release. This list might + not be complete (that is, it is possible that some PRs that have been + fixed are not listed here). + + + For questions related to the use of GCC, please consult these web + pages and the [58]GCC manuals. If that fails, the + [59]gcc-help@gcc.gnu.org mailing list might help. Comments on these + web pages and the development of GCC are welcome on our developer + list at [60]gcc@gcc.gnu.org. All of [61]our lists have public + archives. + + Copyright (C) [62]Free Software Foundation, Inc. Verbatim copying and + distribution of this entire article is permitted in any medium, + provided this notice is preserved. + + These pages are [63]maintained by the GCC team. Last modified + 2025-01-31. + +References + + 1. https://gcc.gnu.org/gcc-6/porting_to.html + 2. https://gcc.gnu.org/onlinedocs/index.html#current + 3. https://gcc.gnu.org/ml/gcc/2015-08/msg00101.html + 4. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71151 + 5. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87822 + 6. https://gcc.gnu.org/gcc-6/changes.html#general + 7. https://gcc.gnu.org/gcc-6/changes.html#languages + 8. https://www.openacc.org/ + 9. https://gcc.gnu.org/wiki/OpenACC + 10. https://gcc.gnu.org/wiki/Offloading + 11. https://gcc.gnu.org/gcc-6/changes.html#c-family + 12. https://www.openmp.org/specifications/ + 13. https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2014-1266 + 14. https://gcc.gnu.org/gcc-6/changes.html#c + 15. https://gcc.gnu.org/gcc-6/changes.html#cxx + 16. https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/n4377.pdf + 17. https://gcc.gnu.org/projects/cxx-status.html#cxx1z + 18. https://gcc.gnu.org/gcc-6/changes.html#libstdcxx + 19. https://gcc.gnu.org/gcc-6/changes.html#fortran + 20. https://gcc.gnu.org/gcc-6/changes.html#jit + 21. https://gcc.gnu.org/onlinedocs/gcc-6.1.0/jit/topics/performance.html + 22. https://gcc.gnu.org/onlinedocs/gcc-6.1.0/jit/topics/functions.html#gcc_jit_block_end_with_switch + 23. https://gcc.gnu.org/onlinedocs/gcc-6.1.0/jit/topics/contexts.html#gcc_jit_context_set_bool_allow_unreachable_blocks + 24. https://gcc.gnu.org/onlinedocs/gcc-6.1.0/jit/topics/contexts.html#gcc_jit_context_add_command_line_option + 25. https://gcc.gnu.org/gcc-6/changes.html#targets + 26. https://gcc.gnu.org/gcc-6/changes.html#aarch64 + 27. https://gcc.gnu.org/onlinedocs/gcc-6.1.0/gcc/AArch64-Function-Attributes.html#AArch64-Function-Attributes + 28. https://gcc.gnu.org/gcc-6/changes.html#arm + 29. https://gcc.gnu.org/onlinedocs/gcc-6.1.0/gcc/ARM-Function-Attributes.html#ARM-Function-Attributes + 30. https://gcc.gnu.org/gcc-6/changes.html#hsa + 31. https://gcc.gnu.org/gcc-6/changes.html#x86 + 32. https://gcc.gnu.org/onlinedocs/gcc-6.1.0/gcc/Named-Address-Spaces.html#Named-Address-Spaces + 33. https://gcc.gnu.org/gcc-6/changes.html#mep + 34. https://gcc.gnu.org/gcc-6/changes.html#msp430 + 35. https://gcc.gnu.org/gcc-6/changes.html#powerpc + 36. https://gcc.gnu.org/gcc-6/changes.html#s390 + 37. https://gcc.gnu.org/onlinedocs/gcc-6.1.0/gcc/S_002f390-Function-Attributes.html#S_002f390-Function-Attributes + 38. https://gcc.gnu.org/gcc-6/changes.html#sh + 39. https://gcc.gnu.org/gcc-6/changes.html#sparc + 40. https://gcc.gnu.org/gcc-6/changes.html#os + 41. https://gcc.gnu.org/gcc-6/changes.html#aix + 42. https://gcc.gnu.org/gcc-6/changes.html#linux + 43. http://www.musl-libc.org/ + 44. https://gcc.gnu.org/gcc-6/changes.html#rtems + 45. https://gcc.gnu.org/gcc-6/changes.html#solaris + 46. https://gcc.gnu.org/gcc-6/changes.html#windows + 47. https://gcc.gnu.org/gcc-6/changes.html#GCC6.2 + 48. https://gcc.gnu.org/bugzilla/buglist.cgi?bug_status=RESOLVED&resolution=FIXED&target_milestone=6.2 + 49. https://gcc.gnu.org/gcc-6/changes.html#GCC6.3 + 50. https://gcc.gnu.org/bugzilla/buglist.cgi?bug_status=RESOLVED&resolution=FIXED&target_milestone=6.3 + 51. https://www.intel.com/content/www/us/en/developer/articles/technical/deprecate-pcommit-instruction.html + 52. https://gcc.gnu.org/gcc-6/changes.html#GCC6.4 + 53. https://gcc.gnu.org/bugzilla/buglist.cgi?bug_status=RESOLVED&resolution=FIXED&target_milestone=6.4 + 54. https://gcc.gnu.org/gcc-6/changes.html#os64 + 55. https://gcc.gnu.org/gcc-6/changes.html#rtems64 + 56. https://gcc.gnu.org/gcc-6/changes.html#GCC6.5 + 57. https://gcc.gnu.org/bugzilla/buglist.cgi?bug_status=RESOLVED&resolution=FIXED&target_milestone=6.5 + 58. https://gcc.gnu.org/onlinedocs/ + 59. mailto:gcc-help@gcc.gnu.org + 60. mailto:gcc@gcc.gnu.org + 61. https://gcc.gnu.org/lists.html + 62. https://www.fsf.org/ + 63. https://gcc.gnu.org/about.html +====================================================================== +http://gcc.gnu.org/gcc-5/index.html + GCC 5 Release Series + + (This release series is no longer supported.) + + October 10, 2017 + + The [1]GNU project and the GCC developers are pleased to announce the + release of GCC 5.5. + + This release is a bug-fix release, containing fixes for regressions in + GCC 5.4 relative to previous releases of GCC. + +Release History + + GCC 5.5 + October 10, 2017 ([2]changes, [3]documentation) + + GCC 5.4 + June 3, 2016 ([4]changes, [5]documentation) + + GCC 5.3 + December 4, 2015 ([6]changes, [7]documentation) + + GCC 5.2 + July 16, 2015 ([8]changes, [9]documentation) + + GCC 5.1 + April 22, 2015 ([10]changes, [11]documentation) + +References and Acknowledgements + + GCC used to stand for the GNU C Compiler, but since the compiler + supports several other languages aside from C, it now stands for the + GNU Compiler Collection. + + A list of [12]successful builds is updated as new information becomes + available. + + The GCC developers would like to thank the numerous people that have + contributed new features, improvements, bug fixes, and other changes as + well as test results to GCC. This [13]amazing group of volunteers is + what makes GCC successful. + + For additional information about GCC please refer to the [14]GCC + project web site or contact the [15]GCC development mailing list. + + To obtain GCC please use [16]our mirror sites or [17]our version + control system. + + + For questions related to the use of GCC, please consult these web + pages and the [18]GCC manuals. If that fails, the + [19]gcc-help@gcc.gnu.org mailing list might help. Comments on these + web pages and the development of GCC are welcome on our developer + list at [20]gcc@gcc.gnu.org. All of [21]our lists have public + archives. + + Copyright (C) [22]Free Software Foundation, Inc. Verbatim copying and + distribution of this entire article is permitted in any medium, + provided this notice is preserved. + + These pages are [23]maintained by the GCC team. Last modified + 2024-05-30. + +References + + 1. http://www.gnu.org/ + 2. https://gcc.gnu.org/gcc-5/changes.html + 3. https://gcc.gnu.org/onlinedocs/5.5.0/ + 4. https://gcc.gnu.org/gcc-5/changes.html + 5. https://gcc.gnu.org/onlinedocs/5.4.0/ + 6. https://gcc.gnu.org/gcc-5/changes.html + 7. https://gcc.gnu.org/onlinedocs/5.3.0/ + 8. https://gcc.gnu.org/gcc-5/changes.html + 9. https://gcc.gnu.org/onlinedocs/5.2.0/ + 10. https://gcc.gnu.org/gcc-5/changes.html + 11. https://gcc.gnu.org/onlinedocs/5.1.0/ + 12. https://gcc.gnu.org/gcc-5/buildstat.html + 13. https://gcc.gnu.org/onlinedocs/gcc/Contributors.html + 14. https://gcc.gnu.org/index.html + 15. mailto:gcc@gcc.gnu.org + 16. https://gcc.gnu.org/mirrors.html + 17. https://gcc.gnu.org/git.html + 18. https://gcc.gnu.org/onlinedocs/ + 19. mailto:gcc-help@gcc.gnu.org + 20. mailto:gcc@gcc.gnu.org + 21. https://gcc.gnu.org/lists.html + 22. https://www.fsf.org/ + 23. https://gcc.gnu.org/about.html +====================================================================== +http://gcc.gnu.org/gcc-5/changes.html + GCC 5 Release Series + Changes, New Features, and Fixes + +Caveats + + * The default mode for C is now -std=gnu11 instead of -std=gnu89. + * The C++ runtime library (libstdc++) uses a new ABI by default (see + [1]below). + * The Graphite framework for loop optimizations no longer requires + the CLooG library, only ISL version 0.14 (recommended) or 0.12.2. + The installation manual contains more information about + requirements to build GCC. + * The non-standard C++0x type traits has_trivial_default_constructor, + has_trivial_copy_constructor and has_trivial_copy_assign have been + deprecated and will be removed in a future version. The standard + C++11 traits is_trivially_default_constructible, + is_trivially_copy_constructible and is_trivially_copy_assignable + should be used instead. + +[2]General Optimizer Improvements + + * Inter-procedural optimization improvements: + + An Identical Code Folding (ICF) pass (controlled via + -fipa-icf) has been added. Compared to the identical code + folding performed by the Gold linker this pass does not + require function sections. It also performs merging before + inlining, so inter-procedural optimizations are aware of the + code re-use. On the other hand not all unifications performed + by a linker are doable by GCC which must honor aliasing + information. During link-time optimization of Firefox, this + pass unifies about 31000 functions, that is 14% overall. + + The devirtualization pass was significantly improved by adding + better support for speculative devirtualization and dynamic + type detection. About 50% of virtual calls in Firefox are now + speculatively devirtualized during link-time optimization. + + A new comdat localization pass allows the linker to eliminate + more dead code in presence of C++ inline functions. + + Virtual tables are now optimized. Local aliases are used to + reduce dynamic linking time of C++ virtual tables on ELF + targets and data alignment has been reduced to limit data + segment bloat. + + A new -fno-semantic-interposition option can be used to + improve code quality of shared libraries where interposition + of exported symbols is not allowed. + + Write-only variables are now detected and optimized out. + + With profile feedback the function inliner can now bypass + --param inline-insns-auto and --param inline-insns-single + limits for hot calls. + + The IPA reference pass was significantly sped up making it + feasible to enable -fipa-reference with -fprofile-generate. + This also solves a bottleneck seen when building Chromium with + link-time optimization. + + The symbol table and call-graph API was reworked to C++ and + simplified. + + The interprocedural propagation of constants now also + propagates alignments of pointer parameters. This for example + means that the vectorizer often does not need to generate loop + prologues and epilogues to make up for potential + misalignments. + * Link-time optimization improvements: + + One Definition Rule based merging of C++ types has been + implemented. Type merging enables better devirtualization and + alias analysis. Streaming extra information needed to merge + types adds about 2-6% of memory size and object size increase. + This can be controlled by -flto-odr-type-merging. + + Command-line optimization and target options are now streamed + on a per-function basis and honored by the link-time + optimizer. This change makes link-time optimization a more + transparent replacement of per-file optimizations. It is now + possible to build projects that require different optimization + settings for different translation units (such as -ffast-math, + -mavx, or -finline). Contrary to earlier GCC releases, the + optimization and target options passed on the link command + line are ignored. + Note that this applies only to those command-line options that + can be passed to optimize and target attributes. Command-line + options affecting global code generation (such as -fpic), + warnings (such as -Wodr), optimizations affecting the way + static variables are optimized (such as -fcommon), debug + output (such as -g), and --param parameters can be applied + only to the whole link-time optimization unit. In these cases, + it is recommended to consistently use the same options at both + compile time and link time. + + GCC bootstrap now uses slim LTO object files. + + Memory usage and link times were improved. Tree merging was + sped up, memory usage of GIMPLE declarations and types was + reduced, and, support for on-demand streaming of variable + constructors was added. + * Feedback directed optimization improvements: + + A new auto-FDO mode uses profiles collected by low overhead + profiling tools (perf) instead of more expensive program + instrumentation (via -fprofile-generate). SPEC2006 benchmarks + on x86-64 improve by 4.7% with auto-FDO and by 7.3% with + traditional feedback directed optimization. + + Profile precision was improved in presence of C++ inline and + extern inline functions. + + The new gcov-tool utility allows manipulating profiles. + + Profiles are now more tolerant to source file changes (this + can be controlled by --param profile-func-internal-id). + * Register allocation improvements: + + A new local register allocator (LRA) sub-pass, controlled by + -flra-remat, implements control-flow sensitive global register + rematerialization. Instead of spilling and restoring a + register value, it is recalculated if it is profitable. The + sub-pass improved SPEC2000 generated code by 1% and 0.5% + correspondingly on ARM and x86-64. + + Reuse of the PIC hard register, instead of using a fixed + register, was implemented on x86/x86-64 targets. This improves + generated PIC code performance as more hard registers can be + used. Shared libraries can significantly benefit from this + optimization. Currently it is switched on only for x86/x86-64 + targets. As RA infrastructure is already implemented for PIC + register reuse, other targets might follow this in the future. + + A simple form of inter-procedural RA was implemented. When it + is known that a called function does not use caller-saved + registers, save/restore code is not generated around the call + for such registers. This optimization can be controlled by + -fipa-ra + + LRA is now much more effective at generating spills of general + registers into vector registers instead of memory on + architectures (e.g., modern Intel processors) where this is + profitable. + * UndefinedBehaviorSanitizer gained a few new sanitization options: + + -fsanitize=float-divide-by-zero: detect floating-point + division by zero; + + -fsanitize=float-cast-overflow: check that the result of + floating-point type to integer conversions do not overflow; + + -fsanitize=bounds: enable instrumentation of array bounds and + detect out-of-bounds accesses; + + -fsanitize=alignment: enable alignment checking, detect + various misaligned objects; + + -fsanitize=object-size: enable object size checking, detect + various out-of-bounds accesses. + + -fsanitize=vptr: enable checking of C++ member function calls, + member accesses and some conversions between pointers to base + and derived classes, detect if the referenced object does not + have the correct dynamic type. + * Pointer Bounds Checker, a bounds violation detector, has been added + and can be enabled via -fcheck-pointer-bounds. Memory accesses are + instrumented with run-time checks of used pointers against their + bounds to detect pointer bounds violations (overflows). The Pointer + Bounds Checker is available on x86/x86-64 GNU/Linux targets with a + new ISA extension Intel MPX support. See the Pointer Bounds Checker + [3]Wiki page for more details. + +[4]New Languages and Language specific improvements + + * [5]OpenMP 4.0 specification offloading features are now supported + by the C, C++, and Fortran compilers. Generic changes: + + Infrastructure (suitable for any vendor). + + Testsuite which covers offloading from the [6]OpenMP 4.0 + Examples document. + Specific for upcoming Intel Xeon Phi products: + + Run-time library. + + Card emulator. + * GCC 5 includes a preliminary implementation of the OpenACC 2.0a + specification. OpenACC is intended for programming accelerator + devices such as GPUs. See [7]the OpenACC wiki page for more + information. + + [8]C family + + * The default setting of the -fdiagnostics-color= command-line option + is now [9]configurable when building GCC using configuration option + --with-diagnostics-color=. The possible values are: never, always, + auto and auto-if-env. The new default auto uses color only when the + standard error is a terminal. The default in GCC 4.9 was + auto-if-env, which is equivalent to auto if there is a non-empty + GCC_COLORS environment variable, and never otherwise. As in GCC + 4.9, an empty GCC_COLORS variable in the environment will always + disable colors, no matter what the default is or what command-line + options are used. + * A new command-line option -Wswitch-bool has been added for the C + and C++ compilers, which warns whenever a switch statement has an + index of boolean type. + * A new command-line option -Wlogical-not-parentheses has been added + for the C and C++ compilers, which warns about "logical not" used + on the left hand side operand of a comparison. + * A new command-line option -Wsizeof-array-argument has been added + for the C and C++ compilers, which warns when the sizeof operator + is applied to a parameter that has been declared as an array in a + function definition. + * A new command-line option -Wbool-compare has been added for the C + and C++ compilers, which warns about boolean expressions compared + with an integer value different from true/false. + * Full support for Cilk Plus has been added to the GCC compiler. Cilk + Plus is an extension to the C and C++ languages to support data and + task parallelism. + * A new attribute no_reorder prevents reordering of selected symbols + against other such symbols or inline assembler. This enables to + link-time optimize the Linux kernel without having to resort to + -fno-toplevel-reorder that disables several optimizations. + * New preprocessor constructs, __has_include and __has_include_next, + to test the availability of headers have been added. + This demonstrates a way to include the header only if it + is available: + +#ifdef __has_include +# if __has_include() +# include +# define have_optional 1 +# elif __has_include() +# include +# define have_optional 1 +# define experimental_optional +# else +# define have_optional 0 +# endif +#endif + + The header search paths for __has_include and __has_include_next + are equivalent to those of the standard directive #include and the + extension #include_next respectively. + * A new built-in function-like macro to determine the existence of an + attribute, __has_attribute, has been added. The equivalent built-in + macro __has_cpp_attribute was added to C++ to support + [10]Feature-testing recommendations for C++. The macro + __has_attribute is added to all C-like languages as an extension: + +int +#ifdef __has_attribute +# if __has_attribute(__noinline__) + __attribute__((__noinline__)) +# endif +#endif +foo(int x); + + If an attribute exists, a nonzero constant integer is returned. For + standardized C++ attributes a date is returned, otherwise the + constant returned is 1. Both __has_attribute and + __has_cpp_attribute will add underscores to an attribute name if + necessary to resolve the name. For C++11 and onwards the attribute + may be scoped. + * A new set of built-in functions for arithmetics with overflow + checking has been added: __builtin_add_overflow, + __builtin_sub_overflow and __builtin_mul_overflow and for + compatibility with clang also other variants. These builtins have + two integral arguments (which don't need to have the same type), + the arguments are extended to infinite precision signed type, +, - + or * is performed on those, and the result is stored in an integer + variable pointed to by the last argument. If the stored value is + equal to the infinite precision result, the built-in functions + return false, otherwise true. The type of the integer variable that + will hold the result can be different from the types of the first + two arguments. The following snippet demonstrates how this can be + used in computing the size for the calloc function: + +void * +calloc (size_t x, size_t y) +{ + size_t sz; + if (__builtin_mul_overflow (x, y, &sz)) + return NULL; + void *ret = malloc (sz); + if (ret) memset (res, 0, sz); + return ret; +} + + On e.g. i?86 or x86-64 the above will result in a mul instruction + followed by a jump on overflow. + * The option -fextended-identifiers is now enabled by default for + C++, and for C99 and later C versions. Various bugs in the + implementation of extended identifiers have been fixed. + + [11]C + + * The default mode has been changed to -std=gnu11. + * A new command-line option -Wc90-c99-compat has been added to warn + about features not present in ISO C90, but present in ISO C99. + * A new command-line option -Wc99-c11-compat has been added to warn + about features not present in ISO C99, but present in ISO C11. + * It is possible to disable warnings about conversions between + pointers that have incompatible types via a new warning option + -Wno-incompatible-pointer-types; warnings about implicit + incompatible integer to pointer and pointer to integer conversions + via a new warning option -Wno-int-conversion; and warnings about + qualifiers on pointers being discarded via a new warning option + -Wno-discarded-qualifiers. + * To allow proper use of const qualifiers with multidimensional + arrays, GCC will not warn about incompatible pointer types anymore + for conversions between pointers to arrays with and without const + qualifier (except when using -pedantic). Instead, a new warning is + emitted only if the const qualifier is lost. This can be controlled + with a new warning option -Wno-discarded-array-qualifiers. + * The C front end now generates more precise caret diagnostics. + * The -pg command-line option now only affects the current file in an + LTO build. + + [12]C++ + + * G++ now supports [13]C++14 variable templates. + * -Wnon-virtual-dtor doesn't warn anymore for final classes. + * Excessive template instantiation depth is now a fatal error. This + prevents excessive diagnostics that usually do not help to identify + the problem. + * G++ and libstdc++ now implement the feature-testing macros from + [14]Feature-testing recommendations for C++. + * G++ now allows typename in a template template parameter. + +template typename X> struct D; // OK + + * G++ now supports [15]C++14 aggregates with non-static data member + initializers. + +struct A { int i, j = i; }; +A a = { 42 }; // a.j is also 42 + + * G++ now supports [16]C++14 extended constexpr. + +constexpr int f (int i) +{ + int j = 0; + for (; i > 0; --i) + ++j; + return j; +} + +constexpr int i = f(42); // i is 42 + + * G++ now supports the [17]C++14 sized deallocation functions. + +void operator delete (void *, std::size_t) noexcept; +void operator delete[] (void *, std::size_t) noexcept; + + * A new One Definition Rule violation warning (controlled by -Wodr) + detects mismatches in type definitions and virtual table contents + during link-time optimization. + * New warnings -Wsuggest-final-types and -Wsuggest-final-methods help + developers to annotate programs with final specifiers (or anonymous + namespaces) to improve code generation. These warnings can be used + at compile time, but they are more useful in combination with + link-time optimization. + * G++ no longer supports [18]N3639 variable length arrays, as they + were removed from the C++14 working paper prior to ratification. + GNU VLAs are still supported, so VLA support is now the same in + C++14 mode as in C++98 and C++11 modes. + * G++ now allows passing a non-trivially-copyable class via C + varargs, which is conditionally-supported with + implementation-defined semantics in the standard. This uses the + same calling convention as a normal value parameter. + * G++ now defaults to -fabi-version=9 and -fabi-compat-version=2. So + various mangling bugs are fixed, but G++ will still emit aliases + with the old, wrong mangling where feasible. -Wabi=2 will warn + about differences between ABI version 2 and the current setting. + * G++ 5.2 fixes the alignment of std::nullptr_t. Most code is likely + to be unaffected, but -Wabi=8 will warn about a non-static data + member with type std::nullptr_t which changes position due to this + change. + + [19]Runtime Library (libstdc++) + + * A [20]Dual ABI is provided by the library. A new ABI is enabled by + default. The old ABI is still supported and can be used by defining + the macro _GLIBCXX_USE_CXX11_ABI to 0 before including any C++ + standard library headers. + * A new implementation of std::string is enabled by default, using + the small string optimization instead of copy-on-write reference + counting. + * A new implementation of std::list is enabled by default, with an + O(1) size() function; + * [21]Full support for C++11, including the following new features: + + std::deque and std::vector meet the allocator-aware + container requirements; + + movable and swappable iostream classes; + + support for std::align and std::aligned_union; + + type traits std::is_trivially_copyable, + std::is_trivially_constructible, std::is_trivially_assignable + etc.; + + I/O manipulators std::put_time, std::get_time, std::hexfloat + and std::defaultfloat; + + generic locale-aware std::isblank; + + locale facets for Unicode conversion; + + atomic operations for std::shared_ptr; + + std::notify_all_at_thread_exit() and functions for making + futures ready at thread exit. + * Support for the C++11 hexfloat manipulator changes how the num_put + facet formats floating point types when + ios_base::fixed|ios_base::scientific is set in a stream's fmtflags. + This change affects all language modes, even though the C++98 + standard gave no special meaning to that combination of flags. To + prevent the use of hexadecimal notation for floating point types + use str.unsetf(std::ios_base::floatfield) to clear the relevant + bits in str.flags(). + * [22]Full experimental support for C++14, including the following + new features: + + std::is_final type trait; + + heterogeneous comparison lookup in associative containers. + + global functions cbegin, cend, rbegin, rend, crbegin, and + crend for range access to containers, arrays and initializer + lists. + * [23]Improved experimental support for the Library Fundamentals TS, + including: + + class std::experimental::any; + + function template std::experimental::apply; + + function template std::experimental::sample; + + function template std::experimental::search and related + searcher types; + + variable templates for type traits; + + function template std::experimental::not_fn. + * New random number distributions logistic_distribution and + uniform_on_sphere_distribution as extensions. + * [24]GDB Xmethods for containers and std::unique_ptr. + + [25]Fortran + + * Compatibility notice: + + The version of the module files (.mod) has been incremented. + + For free-form source files [26]-Werror=line-truncation is now + enabled by default. Note that comments exceeding the line + length are not diagnosed. (For fixed-form source code, the + same warning is available but turned off by default, such that + excess characters are ignored. -ffree-line-length-n and + -ffixed-line-length-n can be used to modify the default line + lengths of 132 and 72 columns, respectively.) + + The -Wtabs option is now more sensible: with -Wtabs the + compiler warns if it encounters tabs and with -Wno-tabs this + warning is turned off. Before, -Wno-tabs warned and -Wtabs + disabled the warning. As before, this warning is also enabled + by -Wall, -pedantic and the f95, f2003, f2008 and f2008ts + options of -std=. + * Incomplete support for colorizing diagnostics emitted by gfortran + has been added. The option [27]-fdiagnostics-color controls when + color is used in diagnostics. The default value of this option can + be [28]configured when building GCC. The GCC_COLORS environment + variable can be used to customize the colors or disable coloring + completely. Sample diagnostics output: + $ gfortran -fdiagnostics-color=always -Wuse-without-only test.f90 + test.f90:6:1: + + 0 continue + 1 + Error: Zero is not a valid statement label at (1) + test.f90:9:6: + + USE foo + 1 + Warning: USE statement at (1) has no ONLY qualifier [-Wuse-without-only] + + * The -Wuse-without-only option has been added to warn when a USE + statement has no ONLY qualifier and thus implicitly imports all + public entities of the used module. + * Formatted READ and WRITE statements now work correctly in + locale-aware programs. For more information and potential caveats, + see [29]Section 5.3 Thread-safety of the runtime library in the + manual. + * [30]Fortran 2003: + + The intrinsic IEEE modules (IEEE_FEATURES, IEEE_EXCEPTIONS and + IEEE_ARITHMETIC) are now supported. + * [31]Fortran 2008: + + [32]Coarrays: Full experimental support of Fortran 2008's + coarrays with -fcoarray=lib except for allocatable/pointer + components of derived-type coarrays. GCC currently only ships + with a single-image library (libcaf_single), but multi-image + support based on MPI and GASNet is provided by the libraries + of the [33]OpenCoarrays project. + * TS18508 Additional Parallel Features in Fortran: + + Support for the collective intrinsic subroutines CO_MAX, + CO_MIN, CO_SUM, CO_BROADCAST and CO_REDUCE has been added, + including -fcoarray=lib support. + + Support for the new atomic intrinsics has been added, + including -fcoarray=lib support. + * Fortran 2015: + + Support for IMPLICIT NONE (external, type). + + ERROR STOP is now permitted in pure procedures. + + [34]Go + + * GCC 5 provides a complete implementation of the Go 1.4.2 release. + * Building GCC 5 with Go enabled will install two new programs: + [35]go and [36]gofmt. + +[37]libgccjit + + New in GCC 5 is the ability to build GCC as a shared library for + embedding in other processes (such as interpreters), suitable for + Just-In-Time compilation to machine code. + + The shared library has a [38]C API and a [39]C++ wrapper API providing + some "syntactic sugar". There are also bindings available from 3rd + parties for [40]Python and for [41]D. + + For example, this library can be used by interpreters for [42]compiling + functions from bytecode to machine code. + + The library can also be used for ahead-of-time compilation, enabling + GCC to be plugged into a pre-existing front end. An example of using + this to build a compiler for an esoteric language we'll refer to as + "brainf" can be seen [43]here. + + libgccjit is licensed under the GPLv3 (or at your option, any later + version) + + It should be regarded as experimental at this time. + +[44]New Targets and Target Specific Improvements + + [45]Reporting stack usage + + * The BFIN, FT32, H8300, IQ2000 and M32C targets now support the + -fstack-usage option. + + [46]AArch64 + + * Code generation for the ARM Cortex-A57 processor has been improved. + A more accurate instruction scheduling model for the processor is + now used, and a number of compiler tuning parameters have been set + to offer increased performance when compiling with -mcpu=cortex-a57 + or -mtune=cortex-a57. + * A workaround for the ARM Cortex-A53 erratum 835769 has been added + and can be enabled by giving the -mfix-cortex-a53-835769 option. + Alternatively it can be enabled by default by configuring GCC with + the --enable-fix-cortex-a53-835769 option. + * The optional cryptographic extensions to the ARMv8-A architecture + are no longer enabled by default when specifying the + -mcpu=cortex-a53, -mcpu=cortex-a57 or -mcpu=cortex-a57.cortex-a53 + options. To enable these extensions add +crypto to the value of + -mcpu or -march e.g. -mcpu=cortex-a53+crypto. + * Support has been added for the following processors (GCC + identifiers in parentheses): ARM Cortex-A72 (cortex-a72) and + initial support for its big.LITTLE combination with the ARM + Cortex-A53 (cortex-a72.cortex-a53), Cavium ThunderX (thunderx), + Applied Micro X-Gene 1 (xgene1), and Samsung Exynos M1 (exynos-m1). + The GCC identifiers can be used as arguments to the -mcpu or -mtune + options, for example: -mcpu=xgene1 or -mtune=cortex-a72.cortex-a53. + Using -mcpu=cortex-a72 requires a version of GNU binutils that has + support for the Cortex-A72. + * The transitional options -mlra and -mno-lra have been removed. The + AArch64 back end now uses the local register allocator (LRA) only. + + [47]ARM + + * Thumb-1 assembly code is now generated in unified syntax. The new + option -masm-syntax-unified specifies whether inline assembly code + is using unified syntax. By default the option is off which means + non-unified syntax is used. However this is subject to change in + future releases. Eventually the non-unified syntax will be + deprecated. + * It is now a configure-time error to use the --with-cpu configure + option with either of --with-tune or --with-arch. + * Code generation for the ARM Cortex-A57 processor has been improved. + A more accurate instruction scheduling model for the processor is + now used, and a number of compiler tuning parameters have been set + to offer increased performance when compiling with -mcpu=cortex-a57 + or -mtune=cortex-a57. + * Support has been added for the following processors (GCC + identifiers in parentheses): ARM Cortex-A17 (cortex-a17) and + initial support for its big.LITTLE combination with the ARM + Cortex-A7 (cortex-a17.cortex-a7), ARM Cortex-A72 (cortex-a72) and + initial support for its big.LITTLE combination with the ARM + Cortex-A53 (cortex-a72.cortex-a53), ARM Cortex-M7 (cortex-m7), + Applied Micro X-Gene 1 (xgene1), and Samsung Exynos M1 (exynos-m1). + The GCC identifiers can be used as arguments to the -mcpu or -mtune + options, for example: -mcpu=xgene1 or -mtune=cortex-a72.cortex-a53. + Using -mcpu=cortex-a72 requires a version of GNU binutils that has + support for the Cortex-A72. + * The deprecated option -mwords-little-endian has been removed. + * The options -mapcs, -mapcs-frame, -mtpcs-frame and + -mtpcs-leaf-frame which are only applicable to the old ABI have + been deprecated. + * The transitional options -mlra and -mno-lra have been removed. The + ARM back end now uses the local register allocator (LRA) only. + + [48]AVR + + * Support has been added for the devices ATtiny4/5/9/10/20/40. This + requires Binutils 2.25 or newer. + * The port uses a new scheme to describe supported devices: For each + supported device, the compiler provides a device-specific [49]spec + file. If the compiler is used together with AVR-LibC, this requires + at least GCC 5.2 and a version of AVR-LibC which implements + [50]feature #44574. + As a consequence, the compiler no more supports individual devices + like ATmega8. Specifying, say, -mmcu=atmega8 triggers the usage of + the device-specific [51]spec file specs-atmega8 which is part of + the installation and describes options for the sub-processes like + compiler proper, assembler and linker. You can add support for a + new device -mmcu=mydevice as follows: + 1. In an empty directory /someplace, create a new directory + device-specs. + 2. Copy a device spec file from the installed device-specs + folder, follow the comments in that file and then save it as + /someplace/device-specs/specs-mydevice. + 3. Add -B /someplace -mmcu=mydevice to the compiler's + command-line options. Notice that /someplace must specify an + absolute path and that mydevice must not start with "avr". + 4. Provided you have a device-specific library libmydevice.a + available, you can put it at /someplace, dito for a + device-specific startup file crtmydevice.o. + The contents of the device spec files depend on the compiler's + configuration, in particular on --with-avrlibc=no and whether or + not it is configured for RTEMS. + * A new command-line option -nodevicelib has been added. It prevents + the compiler from linking against AVR-LibC's device-specific + library libdevice.a. + * The following three command-line options have been added: + + -mrmw + Set if the device supports the read-modify-write + instructions LAC, LAS, LAT and XCH. + + -mn-flash=size + Specify the flash size of the device in units of 64 KiB, + rounded up to the next integer as needed. This option + affects the availability of the [52]AVR address-spaces. + + -mskip-bug + Set if the device is affected by the respective silicon + bug. + + These options are used internally in order to communicate between + the compiler and the device-spces file. They are set in the + device-specs file as needed. Don't set them by hand. + + [53]IA-32/x86-64 + + * New ISA extensions support AVX-512{BW,DQ,VL,IFMA,VBMI} of Intel's + CPU codenamed Skylake Server was added to GCC. That includes inline + assembly support, new intrinsics, and basic autovectorization. + These new AVX-512 extensions are available via the following GCC + switches: AVX-512 Vector Length EVEX feature: -mavx512vl, AVX-512 + Byte and Word instructions: -mavx512bw, AVX-512 Dword and Qword + instructions: -mavx512dq, AVX-512 FMA-52 instructions: -mavx512ifma + and for AVX-512 Vector Bit Manipulation Instructions: -mavx512vbmi. + * New ISA extensions support Intel MPX was added to GCC. This new + extension is available via the -mmpx compiler switch. Intel MPX is + a set of processor features which, with compiler, run-time library + and OS support, brings increased robustness to software by run-time + checking pointer references against their bounds. In GCC Intel MPX + is supported by Pointer Bounds Checker and libmpx run-time + libraries. + * The new -mrecord-mcount option for -pg generates a Linux kernel + style table of pointers to mcount or __fentry__ calls at the + beginning of functions. The new -mnop-mcount option in addition + also generates nops in place of the __fentry__ or mcount call, so + that a call per function can be later patched in. This can be used + for low overhead tracing or hot code patching. + * The new -malign-data option controls how GCC aligns variables. + -malign-data=compat uses increased alignment compatible with GCC + 4.8 and earlier, -malign-data=abi uses alignment as specified by + the psABI, and -malign-data=cacheline uses increased alignment to + match the cache line size. -malign-data=compat is the default. + * The new -mskip-rax-setup option skips setting up the RAX register + when SSE is disabled and there are no variable arguments passed in + vector registers. This can be used to optimize the Linux kernel. + + [54]MIPS + + * MIPS Releases 3 and 5 are now directly supported. Use the + command-line options -mips32r3, -mips64r3, -mips32r5 and -mips64r5 + to enable code-generation for these processors. + * The Imagination P5600 processor is now supported using the + -march=p5600 command-line option. + * The Cavium Octeon3 processor is now supported using the + -march=octeon3 command-line option. + * MIPS Release 6 is now supported using the -mips32r6 and -mips64r6 + command-line options. + * The o32 ABI has been modified and extended. The o32 64-bit + floating-point register support is now obsolete and has been + removed. It has been replaced by three ABI extensions FPXX, FP64A, + and FP64. The meaning of the -mfp64 command-line option has + changed. It is now used to enable the FP64A and FP64 ABI + extensions. + + The FPXX extension requires that code generated to access + double-precision values use even-numbered registers. Code that + adheres to this extension is link-compatible with all other + o32 double-precision ABI variants and will execute correctly + in all hardware FPU modes. The command-line options -mabi=32 + -mfpxx can be used to enable this extension. MIPS II is the + minimum processor required. + + The o32 FP64A extension requires that floating-point registers + be 64-bit and odd-numbered single-precision registers are not + allowed. Code that adheres to the o32 FP64A variant is + link-compatible with all other o32 double-precision ABI + variants. The command-line options -mabi=32 -mfp64 + -mno-odd-spreg can be used to enable this extension. MIPS32R2 + is the minimum processor required. + + The o32 FP64 extension also requires that floating-point + registers be 64-bit, but permits the use of single-precision + registers. Code that adheres to the o32 FP64 variant is + link-compatible with o32 FPXX and o32 FP64A variants only, + i.e. it is not compatible with the original o32 + double-precision ABI. The command-line options -mabi=32 -mfp64 + -modd-spreg can be used to enable this extension. MIPS32R2 is + the minimum processor required. + The new ABI variants can be enabled by default using the configure + time options --with-fp-32=[32|xx|64] and --with(out)-odd-sp-reg-32. + It is strongly recommended that all vendors begin to set o32 FPXX + as the default ABI. This will be required to run the generated code + on MIPSR5 cores in conjunction with future MIPS SIMD (MSA) code and + MIPSR6 cores. + * GCC will now pass all floating-point options to the assembler if + GNU binutils 2.25 is used. As a result, any inline assembly code + that uses hard-float instructions should be amended to include a + .set directive to override the global assembler options when + compiling for soft-float targets. + + [55]NDS32 + + * The variadic function ABI implementation is now compatible with + past Andes toolchains where the caller uses registers to pass + arguments and the callee is in charge of pushing them on stack. + * The options -mforce-fp-as-gp, -mforbid-fp-as-gp, and -mex9 have + been removed since they are not yet available in the nds32 port of + GNU binutils. + * A new option -mcmodel=[small|medium|large] supports varied code + models on code generation. The -mgp-direct option became + meaningless and can be discarded. + + [56]RX + + * A new command line option -mno-allow-string-insns can be used to + disable the generation of the SCMPU, SMOVU, SMOVB, SMOVF, SUNTIL, + SWHILE and RMPA instructions. An erratum released by Renesas shows + that it is unsafe to use these instructions on addresses within the + I/O space of the processor. The new option can be used when the + programmer is concerned that the I/O space might be accessed. The + default is still to enable these instructions. + + [57]SH + + * The compiler will now pass the appropriate --isa= option to the + assembler. + * The default handling for the GBR has been changed from call + clobbered to call preserved. The old behavior can be reinstated by + specifying the option -fcall-used-gbr. + * Support for the SH4A fpchg instruction has been added which will be + utilized when switching between single and double precision FPU + modes. + * The compiler no longer uses the __fpscr_values array for switching + between single and double FPU precision modes on non-SH4A targets. + Instead mode switching will now be performed by storing, modifying + and reloading the FPSCR, so that other FPSCR bits are preserved + across mode switches. The __fpscr_values array that is defined in + libgcc is still present for backwards compatibility, but it will + not be referenced by compiler generated code anymore. + * New builtin functions __builtin_sh_get_fpscr and + __builtin_sh_set_fpscr have been added. The __builtin_sh_set_fpscr + function will mask the specified bits in such a way that the SZ, PR + and FR mode bits will be preserved, while changing the other bits. + These new functions do not reference the __fpscr_values array. The + old functions __set_fpscr and __get_fpscr in libgcc which access + the __fpscr_values array are still present for backwards + compatibility, but their usage is highly discouraged. + * Some improvements to code generated for __atomic built-in + functions. + * When compiling for SH2E the compiler will no longer force the usage + of delay slots for conditional branch instructions bt and bf. The + old behavior can be reinstated (e.g. to work around a hardware bug + in the original SH7055) by specifying the new option + -mcbranch-force-delay-slot. + +[58]Operating Systems + + [59]AIX + + * GCC now supports stabs debugging continuation lines to allow long + stabs debug information without overflow that generates AIX linker + errors. + + [60]DragonFly BSD + + * GCC now supports the DragonFly BSD operating system. + + [61]FreeBSD + + * GCC now supports the FreeBSD operating system for the arm port + through the arm*-*-freebsd* target triplets. + + [62]VxWorks MILS + + * GCC now supports the MILS (Multiple Independent Levels of Security) + variant of WindRiver's VxWorks operating system for PowerPC + targets. + +Other significant improvements + + * The gcc-ar, gcc-nm, gcc-ranlib wrappers now understand a -B option + to set the compiler to use. + + * When the new command-line option -freport-bug is used, GCC + automatically generates a developer-friendly reproducer whenever an + internal compiler error is encountered. + + [63]GCC 5.2 + + This is the [64]list of problem reports (PRs) from GCC's bug tracking + system that are known to be fixed in the 5.2 release. This list might + not be complete (that is, it is possible that some PRs that have been + fixed are not listed here). + +Target Specific Changes + + IA-32/x86-64 + + * Support for new AMD instructions monitorx and mwaitx has been + added. This includes new intrinsic and built-in support. It is + enabled through option -mmwaitx. The instructions monitorx and + mwaitx implement the same functionality as the old monitor and + mwait instructions. In addition, mwaitx adds a configurable timer. + The timer value is received as third argument and stored in + register %ebx. + + S/390, System z, IBM z Systems + + * Support for the IBM z13 processor has been added. When using the + -march=z13 option, the compiler will generate code making use of + the new instructions and registers introduced with the vector + extension facility. The -mtune=z13 option enables z13 specific + instruction scheduling without making use of new instructions. + Compiling code with -march=z13 reduces the default alignment of + vector types bigger than 8 bytes to 8. This is an ABI change and + care must be taken when linking modules compiled with different + arch levels which interchange variables containing vector type + values. For newly compiled code the GNU linker will emit a warning. + * The -mzvector option enables a C/C++ language extension. This + extension provides a new keyword vector which can be used to define + vector type variables. (Note: This is not available when enforcing + strict standard compliance e.g. with -std=c99. Either enable GNU + extensions with e.g. -std=gnu99 or use __vector instead of vector.) + Additionally a set of overloaded builtins is provided which is + partially compatible to the PowerPC Altivec builtins. In order to + make use of these builtins the vecintrin.h header file needs to be + included. + + [65]GCC 5.3 + + This is the [66]list of problem reports (PRs) from GCC's bug tracking + system that are known to be fixed in the 5.3 release. This list might + not be complete (that is, it is possible that some PRs that have been + fixed are not listed here). + +Target Specific Changes + + IA-32/x86-64 + + * GCC now supports the Intel CPU named Skylake with AVX-512 + extensions through -march=skylake-avx512. The switch enables the + following ISA extensions: AVX-512F, AVX512VL, AVX-512CD, AVX-512BW, + AVX-512DQ. + + S/390, System z, IBM z Systems + + * With this version of GCC IBM z Systems support has been added to + the GO runtime environment. GCC 5.3 has proven to be able to + compile larger GO applications on IBM z Systems. + + [67]GCC 5.4 + + This is the [68]list of problem reports (PRs) from GCC's bug tracking + system that are known to be fixed in the 5.4 release. This list might + not be complete (that is, it is possible that some PRs that have been + fixed are not listed here). + + [69]GCC 5.5 + + This is the [70]list of problem reports (PRs) from GCC's bug tracking + system that are known to be fixed in the 5.5 release. This list might + not be complete (that is, it is possible that some PRs that have been + fixed are not listed here). + +Target Specific Changes + + IA-32/x86-64 + + * Support for the [71]deprecated pcommit instruction has been + removed. + + + For questions related to the use of GCC, please consult these web + pages and the [72]GCC manuals. If that fails, the + [73]gcc-help@gcc.gnu.org mailing list might help. Comments on these + web pages and the development of GCC are welcome on our developer + list at [74]gcc@gcc.gnu.org. All of [75]our lists have public + archives. + + Copyright (C) [76]Free Software Foundation, Inc. Verbatim copying and + distribution of this entire article is permitted in any medium, + provided this notice is preserved. + + These pages are [77]maintained by the GCC team. Last modified + 2025-02-28. + +References + + 1. https://gcc.gnu.org/gcc-5/changes.html#libstdcxx + 2. https://gcc.gnu.org/gcc-5/changes.html#general + 3. https://gcc.gnu.org/wiki/Intel MPX support in the GCC compiler + 4. https://gcc.gnu.org/gcc-5/changes.html#languages + 5. https://www.openmp.org/wp-content/uploads/OpenMP4.0.0.pdf + 6. https://www.openmp.org/wp-content/uploads/OpenMP4.0.0.Examples.pdf + 7. https://gcc.gnu.org/wiki/OpenACC + 8. https://gcc.gnu.org/gcc-5/changes.html#c-family + 9. https://gcc.gnu.org/install/configure.html + 10. https://isocpp.org/std/standing-documents/sd-6-sg10-feature-test-recommendations + 11. https://gcc.gnu.org/gcc-5/changes.html#c + 12. https://gcc.gnu.org/gcc-5/changes.html#cxx + 13. https://gcc.gnu.org/projects/cxx1y.html + 14. https://isocpp.org/std/standing-documents/sd-6-sg10-feature-test-recommendations + 15. https://gcc.gnu.org/projects/cxx1y.html + 16. https://gcc.gnu.org/projects/cxx1y.html + 17. https://gcc.gnu.org/projects/cxx1y.html + 18. https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3639.html + 19. https://gcc.gnu.org/gcc-5/changes.html#libstdcxx + 20. https://gcc.gnu.org/onlinedocs/libstdc++/manual/using_dual_abi.html + 21. https://gcc.gnu.org/onlinedocs/gcc-5.1.0/libstdc++/manual/manual/status.html#status.iso.2011 + 22. https://gcc.gnu.org/onlinedocs/gcc-5.1.0/libstdc++/manual/manual/status.html#status.iso.2014 + 23. https://gcc.gnu.org/onlinedocs/gcc-5.1.0/libstdc++/manual/manual/status.html#status.iso.2014 + 24. https://sourceware.org/gdb/current/onlinedocs/gdb#Xmethods-In-Python + 25. https://gcc.gnu.org/gcc-5/changes.html#fortran + 26. https://gcc.gnu.org/onlinedocs/gcc-5.1.0/gfortran/Error-and-Warning-Options.html + 27. https://gcc.gnu.org/onlinedocs/gcc-5.1.0/gcc/Language-Independent-Options.html + 28. https://gcc.gnu.org/install/configure.html + 29. https://gcc.gnu.org/onlinedocs/gcc-5.1.0/gfortran/Thread-safety-of-the-runtime-library.html + 30. https://gcc.gnu.org/wiki/Fortran2003Status + 31. https://gcc.gnu.org/wiki/Fortran2008Status + 32. https://gcc.gnu.org/wiki/Coarray + 33. http://www.opencoarrays.org/ + 34. https://gcc.gnu.org/gcc-5/changes.html#go + 35. https://pkg.go.dev/cmd/go + 36. https://pkg.go.dev/cmd/gofmt + 37. https://gcc.gnu.org/gcc-5/changes.html#jit + 38. https://gcc.gnu.org/onlinedocs/gcc-5.1.0/jit/intro/index.html + 39. https://gcc.gnu.org/onlinedocs/gcc-5.1.0/jit/cp/index.html + 40. https://github.com/davidmalcolm/pygccjit + 41. https://github.com/ibuclaw/gccjitd + 42. https://gcc.gnu.org/onlinedocs/gcc-5.1.0/jit/intro/tutorial04.html + 43. https://gcc.gnu.org/onlinedocs/gcc-5.1.0/jit/intro/tutorial05.html + 44. https://gcc.gnu.org/gcc-5/changes.html#targets + 45. https://gcc.gnu.org/gcc-5/changes.html#stack-usage + 46. https://gcc.gnu.org/gcc-5/changes.html#aarch64 + 47. https://gcc.gnu.org/gcc-5/changes.html#arm + 48. https://gcc.gnu.org/gcc-5/changes.html#avr + 49. https://gcc.gnu.org/onlinedocs/gcc/Spec-Files.html + 50. https://savannah.nongnu.org/bugs/?44574 + 51. https://gcc.gnu.org/onlinedocs/gcc/Spec-Files.html + 52. https://gcc.gnu.org/onlinedocs/gcc/Named-Address-Spaces.html + 53. https://gcc.gnu.org/gcc-5/changes.html#x86 + 54. https://gcc.gnu.org/gcc-5/changes.html#mips + 55. https://gcc.gnu.org/gcc-5/changes.html#nds32 + 56. https://gcc.gnu.org/gcc-5/changes.html#rx + 57. https://gcc.gnu.org/gcc-5/changes.html#sh + 58. https://gcc.gnu.org/gcc-5/changes.html#os + 59. https://gcc.gnu.org/gcc-5/changes.html#aix + 60. https://gcc.gnu.org/gcc-5/changes.html#dragonfly + 61. https://gcc.gnu.org/gcc-5/changes.html#freebsd + 62. https://gcc.gnu.org/gcc-5/changes.html#vxmils + 63. https://gcc.gnu.org/gcc-5/changes.html#GCC5.2 + 64. https://gcc.gnu.org/bugzilla/buglist.cgi?bug_status=RESOLVED&resolution=FIXED&target_milestone=5.2 + 65. https://gcc.gnu.org/gcc-5/changes.html#GCC5.3 + 66. https://gcc.gnu.org/bugzilla/buglist.cgi?bug_status=RESOLVED&resolution=FIXED&target_milestone=5.3 + 67. https://gcc.gnu.org/gcc-5/changes.html#GCC5.4 + 68. https://gcc.gnu.org/bugzilla/buglist.cgi?bug_status=RESOLVED&resolution=FIXED&target_milestone=5.4 + 69. https://gcc.gnu.org/gcc-5/changes.html#GCC5.5 + 70. https://gcc.gnu.org/bugzilla/buglist.cgi?bug_status=RESOLVED&resolution=FIXED&target_milestone=5.5 + 71. https://www.intel.com/content/www/us/en/developer/articles/technical/deprecate-pcommit-instruction.html + 72. https://gcc.gnu.org/onlinedocs/ + 73. mailto:gcc-help@gcc.gnu.org + 74. mailto:gcc@gcc.gnu.org + 75. https://gcc.gnu.org/lists.html + 76. https://www.fsf.org/ + 77. https://gcc.gnu.org/about.html +====================================================================== +http://gcc.gnu.org/gcc-4.9/index.html + GCC 4.9 Release Series + + (This release series is no longer supported.) + + Aug 3, 2016 + + The [1]GNU project and the GCC developers are pleased to announce the + release of GCC 4.9.4. + + This release is a bug-fix release, containing fixes for regressions in + GCC 4.9.3 relative to previous releases of GCC. + +Release History + + GCC 4.9.4 + Aug 3, 2016 ([2]changes, [3]documentation) + + GCC 4.9.3 + June 26, 2015 ([4]changes, [5]documentation) + + GCC 4.9.2 + October 30, 2014 ([6]changes, [7]documentation) + + GCC 4.9.1 + July 16, 2014 ([8]changes, [9]documentation) + + GCC 4.9.0 + April 22, 2014 ([10]changes, [11]documentation) + +References and Acknowledgements + + GCC used to stand for the GNU C Compiler, but since the compiler + supports several other languages aside from C, it now stands for the + GNU Compiler Collection. + + A list of [12]successful builds is updated as new information becomes + available. + + The GCC developers would like to thank the numerous people that have + contributed new features, improvements, bug fixes, and other changes as + well as test results to GCC. This [13]amazing group of volunteers is + what makes GCC successful. + + For additional information about GCC please refer to the [14]GCC + project web site or contact the [15]GCC development mailing list. + + To obtain GCC please use [16]our mirror sites or [17]our version + control system. + + + For questions related to the use of GCC, please consult these web + pages and the [18]GCC manuals. If that fails, the + [19]gcc-help@gcc.gnu.org mailing list might help. Comments on these + web pages and the development of GCC are welcome on our developer + list at [20]gcc@gcc.gnu.org. All of [21]our lists have public + archives. + + Copyright (C) [22]Free Software Foundation, Inc. Verbatim copying and + distribution of this entire article is permitted in any medium, + provided this notice is preserved. + + These pages are [23]maintained by the GCC team. Last modified + 2024-05-30. + +References + + 1. http://www.gnu.org/ + 2. https://gcc.gnu.org/gcc-4.9/changes.html + 3. https://gcc.gnu.org/onlinedocs/4.9.4/ + 4. https://gcc.gnu.org/gcc-4.9/changes.html + 5. https://gcc.gnu.org/onlinedocs/4.9.3/ + 6. https://gcc.gnu.org/gcc-4.9/changes.html + 7. https://gcc.gnu.org/onlinedocs/4.9.2/ + 8. https://gcc.gnu.org/gcc-4.9/changes.html + 9. https://gcc.gnu.org/onlinedocs/4.9.1/ + 10. https://gcc.gnu.org/gcc-4.9/changes.html + 11. https://gcc.gnu.org/onlinedocs/4.9.0/ + 12. https://gcc.gnu.org/gcc-4.9/buildstat.html + 13. https://gcc.gnu.org/onlinedocs/gcc/Contributors.html + 14. https://gcc.gnu.org/index.html + 15. mailto:gcc@gcc.gnu.org + 16. https://gcc.gnu.org/mirrors.html + 17. https://gcc.gnu.org/git.html + 18. https://gcc.gnu.org/onlinedocs/ + 19. mailto:gcc-help@gcc.gnu.org + 20. mailto:gcc@gcc.gnu.org + 21. https://gcc.gnu.org/lists.html + 22. https://www.fsf.org/ + 23. https://gcc.gnu.org/about.html +====================================================================== +http://gcc.gnu.org/gcc-4.9/changes.html + GCC 4.9 Release Series + Changes, New Features, and Fixes + +Caveats + + * The mudflap run time checker has been removed. The mudflap options + remain, but do nothing. + * Support for a number of older systems and recently unmaintained or + untested target ports of GCC has been declared obsolete in GCC 4.9. + Unless there is activity to revive them, the next release of GCC + will have their sources permanently removed. + The following ports for individual systems on particular + architectures have been obsoleted: + + Solaris 9 (*-*-solaris2.9). Details can be found in the + [1]announcement. + * On AArch64, the singleton vector types int64x1_t, uint64x1_t and + float64x1_t exported by arm_neon.h are defined to be the same as + their base types. This results in incorrect application of + parameter passing rules to arguments of types int64x1_t and + uint64x1_t, with respect to the AAPCS64 ABI specification. In + addition, names of C++ functions with parameters of these types + (including float64x1_t) are not mangled correctly. The current + typedef declarations also unintentionally allow implicit casting + between singleton vector types and their base types. These issues + will be resolved in a near future release. See [2]PR60825 for more + information. + + More information on porting to GCC 4.9 from previous versions of GCC + can be found in the [3]porting guide for this release. + +General Optimizer Improvements + + * AddressSanitizer, a fast memory error detector, is now available on + ARM. + * UndefinedBehaviorSanitizer (ubsan), a fast undefined behavior + detector, has been added and can be enabled via + -fsanitize=undefined. Various computations will be instrumented to + detect undefined behavior at runtime. UndefinedBehaviorSanitizer is + currently available for the C and C++ languages. + * Link-time optimization (LTO) improvements: + + Type merging was rewritten. The new implementation is + significantly faster and uses less memory. + + Better partitioning algorithm resulting in less streaming + during link time. + + Early removal of virtual methods reduces the size of object + files and improves link-time memory usage and compile time. + + Function bodies are now loaded on-demand and released early + improving overall memory usage at link time. + + C++ hidden keyed methods can now be optimized out. + + When using a linker plugin, compiling with the -flto option + now generates slim object files (.o) which only contain + intermediate language representation for LTO. Use + -ffat-lto-objects to create files which contain additionally + the object code. To generate static libraries suitable for LTO + processing, use gcc-ar and gcc-ranlib; to list symbols from a + slim object file use gcc-nm. (This requires that ar, ranlib + and nm have been compiled with plugin support.) + Memory usage building Firefox with debug enabled was reduced from + 15GB to 3.5GB; link time from 1700 seconds to 350 seconds. + * Inter-procedural optimization improvements: + + New type inheritance analysis module improving + devirtualization. Devirtualization now takes into account + anonymous name-spaces and the C++11 final keyword. + + New speculative devirtualization pass (controlled by + -fdevirtualize-speculatively. + + Calls that were speculatively made direct are turned back to + indirect where direct call is not cheaper. + + Local aliases are introduced for symbols that are known to be + semantically equivalent across shared libraries improving + dynamic linking times. + * Feedback directed optimization improvements: + + Profiling of programs using C++ inline functions is now more + reliable. + + New time profiling determines typical order in which functions + are executed. + + A new function reordering pass (controlled by + -freorder-functions) significantly reduces startup time of + large applications. Until binutils support is completed, it is + effective only with link-time optimization. + + Feedback driven indirect call removal and devirtualization now + handle cross-module calls when link-time optimization is + enabled. + +[4]New Languages and Language specific improvements + + * Version 4.0 of the [5]OpenMP specification is now supported in the + C and C++ compilers and starting with the 4.9.1 release also in the + Fortran compiler. The new -fopenmp-simd option can be used to + enable OpenMP's SIMD directives while ignoring other OpenMP + directives. The new [6]-fsimd-cost-model= option permits to tune + the vectorization cost model for loops annotated with OpenMP and + Cilk Plus simd directives. -Wopenmp-simd warns when the current + cost model overrides simd directives set by the user. + * The -Wdate-time option has been added for the C, C++ and Fortran + compilers, which warns when the __DATE__, __TIME__ or __TIMESTAMP__ + macros are used. Those macros might prevent bit-wise-identical + reproducible compilations. + + [7]Ada + + * GNAT switched to Ada 2012 instead of Ada 2005 by default. + + [8]C family + + * Support for colorizing diagnostics emitted by GCC has been added. + The [9]-fdiagnostics-color=auto will enable it when outputting to + terminals, -fdiagnostics-color=always unconditionally. The + GCC_COLORS environment variable can be used to customize the colors + or disable coloring. If GCC_COLORS variable is present in the + environment, the default is -fdiagnostics-color=auto, otherwise + -fdiagnostics-color=never. + Sample diagnostics output: + $ g++ -fdiagnostics-color=always -S -Wall test.C + test.C: In function ‘int foo()’: + test.C:1:14: warning: no return statement in function returning non-void [-W +return-type] + int foo () { } + ^ + test.C:2:46: error: template instantiation depth exceeds maximum of 900 (use + -ftemplate-depth= to increase the maximum) instantiating ‘struct X<100>’ + template struct X { static const int value = X::value; }; temp +late struct X<1000>; + ^ + test.C:2:46: recursively required from ‘const int X<999>::value’ + test.C:2:46: required from ‘const int X<1000>::value’ + test.C:2:88: required from here + + test.C:2:46: error: incomplete type ‘X<100>’ used in nested name specifier + + * With the new [10]#pragma GCC ivdep, the user can assert that there + are no loop-carried dependencies which would prevent concurrent + execution of consecutive iterations using SIMD (single instruction + multiple data) instructions. + * Support for Cilk Plus has been added and can be enabled with the + -fcilkplus option. Cilk Plus is an extension to the C and C++ + languages to support data and task parallelism. The present + implementation follows ABI version 1.2; all features but _Cilk_for + have been implemented. + + C + + * ISO C11 atomics (the _Atomic type specifier and qualifier and the + header) are now supported. + * ISO C11 generic selections (_Generic keyword) are now supported. + * ISO C11 thread-local storage (_Thread_local, similar to GNU C + __thread) is now supported. + * ISO C11 support is now at a similar level of completeness to ISO + C99 support: substantially complete modulo bugs, extended + identifiers (supported except for corner cases when + -fextended-identifiers is used), floating-point issues (mainly but + not entirely relating to optional C99 features from Annexes F and + G) and the optional Annexes K (Bounds-checking interfaces) and L + (Analyzability). + * A new C extension __auto_type provides a subset of the + functionality of C++11 auto in GNU C. + + [11]C++ + + * The G++ implementation of [12]C++1y return type deduction for + normal functions has been updated to conform to [13]N3638, the + proposal accepted into the working paper. Most notably, it adds + decltype(auto) for getting decltype semantics rather than the + template argument deduction semantics of plain auto: + +int& f(); + auto i1 = f(); // int +decltype(auto) i2 = f(); // int& + + * G++ supports [14]C++1y lambda capture initializers: + +[x = 42]{ ... }; + + Actually, they have been accepted since GCC 4.5, but now the + compiler doesn't warn about them with -std=c++1y, and supports + parenthesized and brace-enclosed initializers as well. + * G++ supports [15]C++1y variable length arrays. G++ has supported + GNU/C99-style VLAs for a long time, but now additionally supports + initializers and lambda capture by reference. In C++1y mode G++ + will complain about VLA uses that are not permitted by the draft + standard, such as forming a pointer to VLA type or applying sizeof + to a VLA variable. Note that it now appears that VLAs will not be + part of C++14, but will be part of a separate document and then + perhaps C++17. + +void f(int n) { + int a[n] = { 1, 2, 3 }; // throws std::bad_array_length if n < 3 + [&a]{ for (int i : a) { cout << i << endl; } }(); + &a; // error, taking address of VLA +} + + * G++ supports the [16]C++1y [[deprecated]] attribute modulo bugs in + the underlying [[gnu::deprecated]] attribute. Classes and functions + can be marked deprecated and a diagnostic message added: + +class A; +int bar(int n); +#if __cplusplus > 201103 +class [[deprecated("A is deprecated in C++14; Use B instead")]] A; +[[deprecated("bar is unsafe; use foo() instead")]] +int bar(int n); + +int foo(int n); +class B; +#endif +A aa; // warning: 'A' is deprecated : A is deprecated in C++14; Use B instead +int j = bar(2); // warning: 'int bar(int)' is deprecated : bar is unsafe; use fo +o() instead + + * G++ supports [17]C++1y digit separators. Long numeric literals can + be subdivided with a single quote ' to enhance readability: + +int i = 1048576; +int j = 1'048'576; +int k = 0x10'0000; +int m = 0'004'000'000; +int n = 0b0001'0000'0000'0000'0000'0000; + +double x = 1.602'176'565e-19; +double y = 1.602'176'565e-1'9; + + * G++ supports [18]C++1y generic (polymorphic) lambdas. + +// a functional object that will increment any type +auto incr = [](auto x) { return x++; }; + + * As a GNU extension, G++ supports explicit template parameter syntax + for generic lambdas. This can be combined in the expected way with + the standard auto syntax. + +// a functional object that will add two like-type objects +auto add = [] (T a, T b) { return a + b; }; + + * G++ supports unconstrained generic functions as specified by §4.1.2 + and §5.1.1 of [19]N3889: Concepts Lite Specification. Briefly, auto + may be used as a type-specifier in a parameter declaration of any + function declarator in order to introduce an implicit function + template parameter, akin to generic lambdas. + +// the following two function declarations are equivalent +auto incr(auto x) { return x++; } +template +auto incr(T x) { return x++; } + + Runtime Library (libstdc++) + + * [20]Improved support for C++11, including: + + support for ; + + The associative containers in and and the + unordered associative containers in and + meet the allocator-aware container + requirements; + * [21]Improved experimental support for the upcoming ISO C++ + standard, C++14, including: + + fixing constexpr member functions without const; + + implementation of the std::exchange() utility function; + + addressing tuples by type; + + implemention of std::make_unique; + + implemention of std::shared_lock; + + making std::result_of SFINAE-friendly; + + adding operator() to std::integral_constant; + + adding user-defined literals for standard library types + std::basic_string, std::chrono::duration, and std::complex; + + adding two range overloads to non-modifying sequence oprations + std::equal and std::mismatch; + + adding IO manipulators for quoted strings; + + adding constexpr members to , , , + and some containers; + + adding compile-time std::integer_sequence; + + adding cleaner transformation traits; + + making s operator functors easier to use and more + generic; + * An implementation of std::experimental::optional. + * An implementation of std::experimental::string_view. + * The non-standard function std::copy_exception has been deprecated + and will be removed in a future version. std::make_exception_ptr + should be used instead. + + [22]Fortran + + * Compatibility notice: + + Module files: The version of the module files (.mod) has been + incremented; additionally, module files are now compressed. + Fortran MODULEs compiled by earlier GCC versions have to be + recompiled, when they are USEd by files compiled with GCC 4.9. + GCC 4.9 is not able to read .mod files of earlier GCC + versions; attempting to do so gives an error message. Note: + The ABI of the produced assembler data itself has not changed: + object files and libraries are fully compatible with older + versions (except as stated below). + + ABI changes: + o The [23]argument passing ABI has changed for scalar dummy + arguments of type INTEGER, REAL, COMPLEX and LOGICAL, + which have both the VALUE and the OPTIONAL attributes. + o To support finalization the virtual table associated with + polymorphic variables has changed. Code containing CLASS + should be recompiled, including all files which define + derived types involved in the type definition used by + polymorphic variables. (Note: Due to the incremented + module version, trying to mix old code with new code will + usually give an error message.) + + GNU Fortran no longer deallocates allocatable variables or + allocatable components of variables declared in the main + program. Since Fortran 2008, the standard explicitly states + that variables declared in the Fortran main program + automatically have the SAVE attribute. + + When opening files, the close-on-exec flag is set if the + system supports such a feature. This is generally considered + good practice these days, but if there is a need to pass file + descriptors to child processes the parent process must now + remember to clear the close-on-exec flag by calling fcntl(), + e.g. via ISO_C_BINDING, before executing the child process. + * The deprecated command-line option -fno-whole-file has been + removed. (-fwhole-file is the default since GCC 4.6.) + -fwhole-file/-fno-whole-file continue to be accepted but do not + influence the code generation. + * The compiler no longer unconditionally warns about DO loops with + zero iterations. This warning is now controlled by the -Wzerotrip + option, which is implied by -Wall. + * The new NO_ARG_CHECK attribute of the [24]!GCC$ directive can be + used to disable the type-kind-rank (TKR) argument check for a dummy + argument. The feature is similar to ISO/IEC TS 29133:2012's + TYPE(*), except that it additionally also disables the rank check. + Variables with NO_ARG_CHECK have to be dummy arguments and may only + be used as argument to ISO_C_BINDING's C_LOC and as actual argument + to another NO_ARG_CHECK dummy argument; also the other constraints + of TYPE(*) apply. The dummy arguments should be declared as scalar + or assumed-size variable of type type(*) (recommended) – or of type + integer, real, complex or logical. With NO_ARG_CHECK, a pointer to + the data without further type or shape information is passed, + similar to C's void*. Note that also TS 29113's + type(*),dimension(..) accepts arguments of any type and rank; + contrary to NO_ARG_CHECK assumed-rank arguments pass an array + descriptor which contains the array shape and stride of the + argument. + * [25]Fortran 2003: + + Finalization is now supported. It is currently only done for a + subset of those situations in which it should occur. + + Experimental support for scalar character components with + deferred length (i.e. allocatable string length) in derived + types has been added. (Deferred-length character variables are + supported since GCC 4.6.) + * [26]Fortran 2008: + + When STOP or ERROR STOP are used to terminate the execution + and any exception (but inexact) is signaling, a warning is + printed to ERROR_UNIT, indicating which exceptions are + signaling. The [27]-ffpe-summary= command-line option can be + used to fine-tune for which exceptions the warning should be + shown. + + Rounding on input (READ) is now handled on systems where + strtod honours the rounding mode. (For output, rounding is + supported since GCC 4.5.) Note that for input, the compatible + rounding mode is handled as nearest (i.e., rounding to an even + least significant [cf. IEC 60559:1989] for a tie, while + compatible rounds away from zero in that case). + + [28]Go + + * GCC 4.9 provides a complete implementation of the Go 1.2.1 release. + +[29]New Targets and Target Specific Improvements + + [30]AArch64 + + * The ARMv8-A crypto and CRC instructions are now supported through + intrinsics. These are enabled when the architecture supports these + and are available through the -march=armv8-a+crc and + -march=armv8-a+crypto options. + * Initial support for ILP32 has now been added to the compiler. This + is now available through the command-line option -mabi=ilp32. + Support for ILP32 is considered experimental as the ABI + specification is still beta. + * Coverage of more of the ISA including the SIMD extensions has been + added. The Advanced SIMD intrinsics have also been improved. + * The new local register allocator (LRA) is now on by default for the + AArch64 back end. + * The REE (Redundant extension elimination) pass has now been enabled + by default for the AArch64 back end. + * Tuning for the Cortex-A53 and Cortex-A57 has been improved. + * Initial big.LITTLE tuning support for the combination of Cortex-A57 + and Cortex-A53 was added through the -mcpu=cortex-a57.cortex-a53 + option. + * A number of structural changes have been made to both the ARM and + AArch64 back ends to facilitate improved code-generation. + * As of GCC 4.9.2 a workaround for the ARM Cortex-A53 erratum 835769 + has been added and can be enabled by giving the + -mfix-cortex-a53-835769 option. Alternatively it can be enabled by + default by configuring GCC with the --enable-fix-cortex-a53-835769 + option. + + [31]ARC + + * A port for Synopsys Designware ARC has been contributed by Embecosm + and Synopsys Inc. + + [32]ARM + + * Use of Advanced SIMD (Neon) for 64-bit scalar computations has been + disabled by default. This was found to generate better code in only + a small number of cases. It can be turned back on with the + -mneon-for-64bits option. + * Further support for the ARMv8-A architecture, notably implementing + the restriction around IT blocks in the Thumb32 instruction set has + been added. The -mrestrict-it option can be used with + -march=armv7-a or the -march=armv7ve options to make code + generation fully compatible with the deprecated instructions in + ARMv8-A. + * Support has now been added for the ARMv7ve variant of the + architecture. This can be used by the -march=armv7ve option. + * The ARMv8-A crypto and CRC instructions are now supported through + intrinsics and are available through the -march=armv8-a+crc and + mfpu=crypto-neon-fp-armv8 options. + * LRA is now on by default for the ARM target. This can be turned off + using the -mno-lra option. This option is a purely transitionary + command-line option and will be removed in a future release. We are + interested in any bug reports regarding functional and performance + regressions with LRA. + * A new option -mslow-flash-data to improve performance of programs + fetching data on slow flash memory has now been introduced for the + ARMv7-M profile cores. + * A new option -mpic-data-is-text-relative for targets that allows + data segments to be relative to text segments has been added. This + is on by default for all targets except VxWorks RTP. + * A number of infrastructural changes have been made to both the ARM + and AArch64 back ends to facilitate improved code-generation. + * GCC now supports Cortex-A12 and the Cortex-R7 through the + -mcpu=cortex-a12 and -mcpu=cortex-r7 options. + * GCC now has tuning for the Cortex-A57 and Cortex-A53 through the + -mcpu=cortex-a57 and -mcpu=cortex-a53 options. + * Initial big.LITTLE tuning support for the combination of Cortex-A57 + and Cortex-A53 was added through the -mcpu=cortex-a57.cortex-a53 + option. Similar support was added for the combination of Cortex-A15 + and Cortex-A7 through the -mcpu=cortex-a15.cortex-a7 option. + * Further performance optimizations for the Cortex-A15 and the + Cortex-M4 have been added. + * A number of code generation improvements for Thumb2 to reduce code + size when compiling for the M-profile processors. + + [33]AVR + + * A new command-line option -mfract-convert-truncate has been added. + It allows compiler to use truncation instead of rounding towards + zero for fractional fixed-point types. + + [34]IA-32/x86-64 + + * -mfpmath=sse is now implied by -ffast-math on all targets where + SSE2 is supported. + * Intel AVX-512 support was added to GCC. That includes inline + assembly support, new registers and extending existing ones, new + intrinsics (covered by corresponding testsuite), and basic + autovectorization. AVX-512 instructions are available via the + following GCC switches: AVX-512 foundation instructions: -mavx512f, + AVX-512 prefetch instructions: -mavx512pf, AVX-512 exponential and + reciprocal instructions: -mavx512er, AVX-512 conflict detection + instructions: -mavx512cd. + * It is now possible to call x86 intrinsics from select functions in + a file that are tagged with the corresponding target attribute + without having to compile the entire file with the -mxxx option. + This improves the usability of x86 intrinsics and is particularly + useful when doing [35]Function Multiversioning. + * GCC now supports the new Intel microarchitecture named Silvermont + through -march=silvermont. + * GCC now supports the new Intel microarchitecture named Broadwell + through -march=broadwell. + * Optimizing for other Intel microarchitectures have been renamed to + -march=nehalem, westmere, sandybridge, ivybridge, haswell, bonnell. + * -march=generic has been retuned for better support of Intel core + and AMD Bulldozer architectures. Performance of AMD K7, K8, Intel + Pentium-M, and Pentium4 based CPUs is no longer considered + important for generic. + * -mtune=intel can now be used to generate code running well on the + most current Intel processors, which are Haswell and Silvermont for + GCC 4.9. + * Support to encode 32-bit assembly instructions in 16-bit format is + now available through the -m16 command-line option. + * Better inlining of memcpy and memset that is aware of value ranges + and produces shorter alignment prologues. + * -mno-accumulate-outgoing-args is now honored when unwind + information is output. Argument accumulation is also now turned off + for portions of programs optimized for size. + * Support for new AMD family 15h processors (Excavator core) is now + available through the -march=bdver4 and -mtune=bdver4 options. + + [36]MSP430 + + * A new command-line option -mcpu= has been added to the MSP430 back + end. This option is used to specify the ISA to be used. Accepted + values are msp430 (the default), msp430x and msp430xv2. The ISA is + no longer deduced from the -mmcu= option as there are far too many + different MCU names. The -mmcu= option is still supported, and this + is still used to select linker scripts and generate a C + preprocessor symbol that will be recognised by the msp430.h header + file. + + [37]NDS32 + + * A new nds32 port supports the 32-bit architecture from Andes + Technology Corporation. + * The port provides initial support for the V2, V3, V3m instruction + set architectures. + + [38]Nios II + + * A port for the Altera Nios II has been contributed by Mentor + Graphics. + + [39]PowerPC / PowerPC64 / RS6000 + + * GCC now supports Power ISA 2.07, which includes support for + Hardware Transactional Memory (HTM), Quadword atomics and several + VMX and VSX additions, including Crypto, 64-bit integer, 128-bit + integer and decimal integer operations. + * Support for the POWER8 processor is now available through the + -mcpu=power8 and -mtune=power8 options. + * The libitm library has been modified to add a HTM fastpath that + automatically uses POWER's HTM hardware instructions when it is + executing on a HTM enabled processor. + * Support for the new powerpc64le-linux platform has been added. It + defaults to generating code that conforms to the ELFV2 ABI. + + S/390, System z + + * Support for the Transactional Execution Facility included with the + IBM zEnterprise zEC12 processor has been added. A set of GCC style + builtins as well as XLC style builtins are provided. The builtins + are enabled by default when using the -march=zEC12 option but can + explicitly be disabled with -mno-htm. Using the GCC builtins also + libitm supports hardware transactions on S/390. + * The hotpatch features allows to prepare functions for hotpatching. + A certain amount of bytes is reserved before the function entry + label plus a NOP is inserted at its very beginning to implement a + backward jump when applying a patch. The feature can either be + enabled per compilation unit via the command-line option -mhotpatch + or per function using the hotpatch attribute. + * The shrink wrap optimization is now supported on S/390 and enabled + by default. + * A major rework of the routines to determine which registers need to + be saved and restored in function prologue/epilogue now allow to + use floating point registers as save slots. This will happen for + certain leaf function with -march=z10 or higher. + * The LRA rtl pass replaces reload by default on S/390. + + [40]RX + + * The port now allows to specify the RX100, RX200, and RX600 + processors with the command-line options -mcpu=rx100, -mcpu=rx200 + and -mcpu=rx600. + + [41]SH + + * Minor improvements to code generated for integer arithmetic and + code that involves the T bit. + * Added support for the SH2A clips and clipu instructions. The + compiler will now try to utilize them for min/max expressions such + as max (-128, min (127, x)). + * Added support for the cmp/str instruction through built-in + functions such as __builtin_strlen. When not optimizing for size, + the compiler will now expand calls to e.g. strlen as an inlined + sequences which utilize the cmp/str instruction. + * Improved code generated around volatile memory loads and stores. + * The option -mcbranchdi has been deprecated. Specifying it will + result in a warning and will not influence code generation. + * The option -mcmpeqdi has been deprecated. Specifying it will result + in a warning and will not influence code generation. + +[42]GCC 4.9.1 + + This is the [43]list of problem reports (PRs) from GCC's bug tracking + system that are known to be fixed in the 4.9.1 release. This list might + not be complete (that is, it is possible that some PRs that have been + fixed are not listed here). + + Version 4.0 of the OpenMP specification is supported even in Fortran, + not just C and C++. + +[44]GCC 4.9.2 + + This is the [45]list of problem reports (PRs) from GCC's bug tracking + system that are known to be fixed in the 4.9.2 release. This list might + not be complete (that is, it is possible that some PRs that have been + fixed are not listed here). + +[46]GCC 4.9.3 + + This is the [47]list of problem reports (PRs) from GCC's bug tracking + system that are known to be fixed in the 4.9.3 release. This list might + not be complete (that is, it is possible that some PRs that have been + fixed are not listed here). + +[48]GCC 4.9.4 + + This is the [49]list of problem reports (PRs) from GCC's bug tracking + system that are known to be fixed in the 4.9.4 release. This list might + not be complete (that is, it is possible that some PRs that have been + fixed are not listed here). + + + For questions related to the use of GCC, please consult these web + pages and the [50]GCC manuals. If that fails, the + [51]gcc-help@gcc.gnu.org mailing list might help. Comments on these + web pages and the development of GCC are welcome on our developer + list at [52]gcc@gcc.gnu.org. All of [53]our lists have public + archives. + + Copyright (C) [54]Free Software Foundation, Inc. Verbatim copying and + distribution of this entire article is permitted in any medium, + provided this notice is preserved. + + These pages are [55]maintained by the GCC team. Last modified + 2025-01-31. + +References + + 1. https://gcc.gnu.org/ml/gcc-patches/2013-05/msg00728.html + 2. https://gcc.gnu.org/PR60825 + 3. https://gcc.gnu.org/gcc-4.9/porting_to.html + 4. https://gcc.gnu.org/gcc-4.9/changes.html#languages + 5. https://www.openmp.org/specifications/ + 6. https://gcc.gnu.org/onlinedocs/gcc-4.9.2/gcc/Optimize-Options.html#index-fsimd-cost-model-908 + 7. https://gcc.gnu.org/gcc-4.9/changes.html#ada + 8. https://gcc.gnu.org/gcc-4.9/changes.html#c-family + 9. https://gcc.gnu.org/onlinedocs/gcc-4.9.2/gcc/Language-Independent-Options.html#index-fdiagnostics-color-252 + 10. https://gcc.gnu.org/onlinedocs/gcc-4.9.2/gcc/Loop-Specific-Pragmas.html + 11. https://gcc.gnu.org/gcc-4.9/changes.html#cxx + 12. https://gcc.gnu.org/projects/cxx1y.html + 13. https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3638.html + 14. https://gcc.gnu.org/projects/cxx1y.html + 15. https://gcc.gnu.org/projects/cxx1y.html + 16. https://gcc.gnu.org/projects/cxx1y.html + 17. https://gcc.gnu.org/projects/cxx1y.html + 18. https://gcc.gnu.org/projects/cxx1y.html + 19. https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n3889.pdf + 20. https://gcc.gnu.org/onlinedocs/gcc-4.9.2/libstdc++/manual/manual/status.html#status.iso.2011 + 21. https://gcc.gnu.org/onlinedocs/libstdc++/manual/status.html#status.iso.2014 + 22. https://gcc.gnu.org/gcc-4.9/changes.html#fortran + 23. https://gcc.gnu.org/onlinedocs/gcc-4.9.2/gfortran/Argument-passing-conventions.html + 24. https://gcc.gnu.org/onlinedocs/gcc-4.9.2/gfortran/GNU-Fortran-Compiler-Directives.html + 25. https://gcc.gnu.org/wiki/Fortran2003Status + 26. https://gcc.gnu.org/wiki/Fortran2008Status + 27. https://gcc.gnu.org/onlinedocs/gcc-4.9.2/gfortran/Debugging-Options.html + 28. https://gcc.gnu.org/gcc-4.9/changes.html#go + 29. https://gcc.gnu.org/gcc-4.9/changes.html#targets + 30. https://gcc.gnu.org/gcc-4.9/changes.html#aarch64 + 31. https://gcc.gnu.org/gcc-4.9/changes.html#arc + 32. https://gcc.gnu.org/gcc-4.9/changes.html#arm + 33. https://gcc.gnu.org/gcc-4.9/changes.html#avr + 34. https://gcc.gnu.org/gcc-4.9/changes.html#x86 + 35. https://gcc.gnu.org/onlinedocs/gcc-4.9.2/gcc/Function-Multiversioning.html + 36. https://gcc.gnu.org/gcc-4.9/changes.html#msp430 + 37. https://gcc.gnu.org/gcc-4.9/changes.html#nds32 + 38. https://gcc.gnu.org/gcc-4.9/changes.html#nios2 + 39. https://gcc.gnu.org/gcc-4.9/changes.html#powerpc + 40. https://gcc.gnu.org/gcc-4.9/changes.html#rx + 41. https://gcc.gnu.org/gcc-4.9/changes.html#sh + 42. https://gcc.gnu.org/gcc-4.9/changes.html#GCC4.9.1 + 43. https://gcc.gnu.org/bugzilla/buglist.cgi?bug_status=RESOLVED&resolution=FIXED&target_milestone=4.9.1 + 44. https://gcc.gnu.org/gcc-4.9/changes.html#GCC4.9.2 + 45. https://gcc.gnu.org/bugzilla/buglist.cgi?bug_status=RESOLVED&resolution=FIXED&target_milestone=4.9.2 + 46. https://gcc.gnu.org/gcc-4.9/changes.html#GCC4.9.3 + 47. https://gcc.gnu.org/bugzilla/buglist.cgi?bug_status=RESOLVED&resolution=FIXED&target_milestone=4.9.3 + 48. https://gcc.gnu.org/gcc-4.9/changes.html#GCC4.9.4 + 49. https://gcc.gnu.org/bugzilla/buglist.cgi?bug_status=RESOLVED&resolution=FIXED&target_milestone=4.9.4 + 50. https://gcc.gnu.org/onlinedocs/ + 51. mailto:gcc-help@gcc.gnu.org + 52. mailto:gcc@gcc.gnu.org + 53. https://gcc.gnu.org/lists.html + 54. https://www.fsf.org/ + 55. https://gcc.gnu.org/about.html +====================================================================== +http://gcc.gnu.org/gcc-4.8/index.html + GCC 4.8 Release Series + + (This release series is no longer supported.) + + June 23, 2015 + + The [1]GNU project and the GCC developers are pleased to announce the + release of GCC 4.8.5. + + This release is a bug-fix release, containing fixes for regressions in + GCC 4.8.4 relative to previous releases of GCC. + +Release History + + GCC 4.8.5 + June 23, 2015 ([2]changes, [3]documentation) + + GCC 4.8.4 + December 19, 2014 ([4]changes, [5]documentation) + + GCC 4.8.3 + May 22, 2014 ([6]changes, [7]documentation) + + GCC 4.8.2 + October 16, 2013 ([8]changes, [9]documentation) + + GCC 4.8.1 + May 31, 2013 ([10]changes, [11]documentation) + + GCC 4.8.0 + March 22, 2013 ([12]changes, [13]documentation) + +References and Acknowledgements + + GCC used to stand for the GNU C Compiler, but since the compiler + supports several other languages aside from C, it now stands for the + GNU Compiler Collection. + + A list of [14]successful builds is updated as new information becomes + available. + + The GCC developers would like to thank the numerous people that have + contributed new features, improvements, bug fixes, and other changes as + well as test results to GCC. This [15]amazing group of volunteers is + what makes GCC successful. + + For additional information about GCC please refer to the [16]GCC + project web site or contact the [17]GCC development mailing list. + + To obtain GCC please use [18]our mirror sites or [19]our version + control system. + + + For questions related to the use of GCC, please consult these web + pages and the [20]GCC manuals. If that fails, the + [21]gcc-help@gcc.gnu.org mailing list might help. Comments on these + web pages and the development of GCC are welcome on our developer + list at [22]gcc@gcc.gnu.org. All of [23]our lists have public + archives. + + Copyright (C) [24]Free Software Foundation, Inc. Verbatim copying and + distribution of this entire article is permitted in any medium, + provided this notice is preserved. + + These pages are [25]maintained by the GCC team. Last modified + 2022-10-26. + +References + + 1. http://www.gnu.org/ + 2. https://gcc.gnu.org/gcc-4.8/changes.html + 3. https://gcc.gnu.org/onlinedocs/4.8.5/ + 4. https://gcc.gnu.org/gcc-4.8/changes.html + 5. https://gcc.gnu.org/onlinedocs/4.8.4/ + 6. https://gcc.gnu.org/gcc-4.8/changes.html + 7. https://gcc.gnu.org/onlinedocs/4.8.3/ + 8. https://gcc.gnu.org/gcc-4.8/changes.html + 9. https://gcc.gnu.org/onlinedocs/4.8.2/ + 10. https://gcc.gnu.org/gcc-4.8/changes.html + 11. https://gcc.gnu.org/onlinedocs/4.8.1/ + 12. https://gcc.gnu.org/gcc-4.8/changes.html + 13. https://gcc.gnu.org/onlinedocs/4.8.0/ + 14. https://gcc.gnu.org/gcc-4.8/buildstat.html + 15. https://gcc.gnu.org/onlinedocs/gcc/Contributors.html + 16. https://gcc.gnu.org/index.html + 17. mailto:gcc@gcc.gnu.org + 18. https://gcc.gnu.org/mirrors.html + 19. https://gcc.gnu.org/git.html + 20. https://gcc.gnu.org/onlinedocs/ + 21. mailto:gcc-help@gcc.gnu.org + 22. mailto:gcc@gcc.gnu.org + 23. https://gcc.gnu.org/lists.html + 24. https://www.fsf.org/ + 25. https://gcc.gnu.org/about.html +====================================================================== +http://gcc.gnu.org/gcc-4.8/changes.html + GCC 4.8 Release Series + Changes, New Features, and Fixes + +Caveats + + GCC now uses C++ as its implementation language. This means that to + build GCC from sources, you will need a C++ compiler that understands + C++ 2003. For more details on the rationale and specific changes, + please refer to the [1]C++ conversion page. + + To enable the Graphite framework for loop optimizations you now need + CLooG version 0.18.0 and ISL version 0.11.1. Both can be obtained from + the [2]GCC infrastructure directory. The installation manual contains + more information about requirements to build GCC. + + GCC now uses a more aggressive analysis to derive an upper bound for + the number of iterations of loops using constraints imposed by language + standards. This may cause non-conforming programs to no longer work as + expected, such as SPEC CPU 2006 464.h264ref and 416.gamess. A new + option, -fno-aggressive-loop-optimizations, was added to disable this + aggressive analysis. In some loops that have known constant number of + iterations, but undefined behavior is known to occur in the loop before + reaching or during the last iteration, GCC will warn about the + undefined behavior in the loop instead of deriving lower upper bound of + the number of iterations for the loop. The warning can be disabled with + -Wno-aggressive-loop-optimizations. + + On ARM, a bug has been fixed in GCC's implementation of the AAPCS rules + for the layout of vectors that could lead to wrong code being + generated. Vectors larger than 8 bytes in size are now by default + aligned to an 8-byte boundary. This is an ABI change: code that makes + explicit use of vector types may be incompatible with binary objects + built with older versions of GCC. Auto-vectorized code is not affected + by this change. + + More information on porting to GCC 4.8 from previous versions of GCC + can be found in the [3]porting guide for this release. + +General Optimizer Improvements (and Changes) + + * DWARF4 is now the default when generating DWARF debug information. + When -g is used on a platform that uses DWARF debugging + information, GCC will now default to -gdwarf-4 + -fno-debug-types-section. + GDB 7.5, Valgrind 3.8.0 and elfutils 0.154 debug information + consumers support DWARF4 by default. Before GCC 4.8 the default + version used was DWARF2. To make GCC 4.8 generate an older DWARF + version use -g together with -gdwarf-2 or -gdwarf-3. The default + for Darwin and VxWorks is still -gdwarf-2 -gstrict-dwarf. + * A new general optimization level, -Og, has been introduced. It + addresses the need for fast compilation and a superior debugging + experience while providing a reasonable level of run-time + performance. Overall experience for development should be better + than the default optimization level -O0. + * A new option -ftree-partial-pre was added to control the partial + redundancy elimination (PRE) optimization. This option is enabled + by default at the -O3 optimization level, and it makes PRE more + aggressive. + * The option -fconserve-space has been removed; it was no longer + useful on most targets since GCC supports putting variables into + BSS without making them common. + * The struct reorg and matrix reorg optimizations (command-line + options -fipa-struct-reorg and -fipa-matrix-reorg) have been + removed. They did not always work correctly, nor did they work with + link-time optimization (LTO), hence were only applicable to + programs consisting of a single translation unit. + * Several scalability bottle-necks have been removed from GCC's + optimization passes. Compilation of extremely large functions, e.g. + due to the use of the flatten attribute in the "Eigen" C++ linear + algebra templates library, is significantly faster than previous + releases of GCC. + * Link-time optimization (LTO) improvements: + + LTO partitioning has been rewritten for better reliability and + maintanibility. Several important bugs leading to link + failures have been fixed. + * Interprocedural optimization improvements: + + A new symbol table has been implemented. It builds on existing + callgraph and varpool modules and provide a new API. Unusual + symbol visibilities and aliases are handled more consistently + leading to, for example, more aggressive unreachable code + removal with LTO. + + The inline heuristic can now bypass limits on the size of of + inlined functions when the inlining is particularly + profitable. This happens, for example, when loop bounds or + array strides get propagated. + + Values passed through aggregates (either by value or + reference) are now propagated at the inter-procedural level + leading to better inlining decisions (for example in the case + of Fortran array descriptors) and devirtualization. + * [4]AddressSanitizer , a fast memory error detector, has been added + and can be enabled via -fsanitize=address. Memory access + instructions will be instrumented to detect heap-, stack-, and + global-buffer overflow as well as use-after-free bugs. To get nicer + stacktraces, use -fno-omit-frame-pointer. The AddressSanitizer is + available on IA-32/x86-64/x32/PowerPC/PowerPC64 GNU/Linux and on + x86-64 Darwin. + * [5]ThreadSanitizer has been added and can be enabled via + -fsanitize=thread. Instructions will be instrumented to detect data + races. The ThreadSanitizer is available on x86-64 GNU/Linux. + * A new local register allocator (LRA) has been implemented, which + replaces the 26 year old reload pass and improves generated code + quality. For now it is active on the IA-32 and x86-64 targets. + * Support for transactional memory has been implemented on the + following architectures: IA-32/x86-64, ARM, PowerPC, SH, SPARC, and + Alpha. + +New Languages and Language specific improvements + + C family + + * Each diagnostic emitted now includes the original source line and a + caret '^' indicating the column. The option + -fno-diagnostics-show-caret suppresses this information. + * The option -ftrack-macro-expansion=2 is now enabled by default. + This allows the compiler to display the macro expansion stack in + diagnostics. Combined with the caret information, an example + diagnostic showing these two features is: + +t.c:1:94: error: invalid operands to binary < (have ‘struct mystruct’ and ‘float +’) + #define MYMAX(A,B) __extension__ ({ __typeof__(A) __a = (A); __typeof__(B) _ +_b = (B); __a < __b ? __b : __a; }) + + ^ +t.c:7:7: note: in expansion of macro 'MYMAX' + X = MYMAX(P, F); + ^ + + * A new -Wsizeof-pointer-memaccess warning has been added (also + enabled by -Wall) to warn about suspicious length parameters to + certain string and memory built-in functions if the argument uses + sizeof. This warning warns e.g. about memset (ptr, 0, sizeof + (ptr)); if ptr is not an array, but a pointer, and suggests a + possible fix, or about memcpy (&foo, ptr, sizeof (&foo));. + * The new option -Wpedantic is an alias for -pedantic, which is now + deprecated. The forms -Wno-pedantic, -Werror=pedantic, and + -Wno-error=pedantic work in the same way as for any other -W + option. One caveat is that -Werror=pedantic is not equivalent to + -pedantic-errors, since the latter makes into errors some warnings + that are not controlled by -Wpedantic, and the former only affects + diagnostics that are disabled when using -Wno-pedantic. + * The option -Wshadow no longer warns if a declaration shadows a + function declaration, unless the former declares a function or + pointer to function, because this is [6]a common and valid case in + real-world code. + + [7]C++ + + * G++ now implements the [8]C++11 thread_local keyword; this differs + from the GNU __thread keyword primarily in that it allows dynamic + initialization and destruction semantics. Unfortunately, this + support requires a run-time penalty for references to + non-function-local thread_local variables defined in a different + translation unit even if they don't need dynamic initialization, so + users may want to continue to use __thread for TLS variables with + static initialization semantics. + If the programmer can be sure that no use of the variable in a + non-defining TU needs to trigger dynamic initialization (either + because the variable is statically initialized, or a use of the + variable in the defining TU will be executed before any uses in + another TU), they can avoid this overhead with the + -fno-extern-tls-init option. + OpenMP threadprivate variables now also support dynamic + initialization and destruction by the same mechanism. + * G++ now implements the [9]C++11 attribute syntax, e.g. + +[[noreturn]] void f(); + + and also the alignment specifier, e.g. + +alignas(double) int i; + + * G++ now implements [10]C++11 inheriting constructors, e.g. + +struct A { A(int); }; +struct B: A { using A::A; }; // defines B::B(int) +B b(42); // OK + + * As of GCC 4.8.1, G++ implements the change to decltype semantics + from [11]N3276. + +struct A f(); +decltype(f()) g(); // OK, return type of f() is not required to be complete. + + * As of GCC 4.8.1, G++ implements [12]C++11 ref-qualifiers, e.g. + +struct A { int f() &; }; +int i = A().f(); // error, f() requires an lvalue object + + * G++ now supports a -std=c++1y option for experimentation with + features proposed for the next revision of the standard, expected + around 2014. Currently the only difference from -std=c++11 is + support for return type deduction in normal functions, as proposed + in [13]N3386. Status of C++1y features in GCC 4.8 can be found + [14]here. + * The G++ namespace association extension, __attribute ((strong)), + has been deprecated. Inline namespaces should be used instead. + * G++ now supports a -fext-numeric-literal option to control whether + GNU numeric literal suffixes are accepted as extensions or + processed as C++11 user-defined numeric literal suffixes. The flag + is on (use suffixes for GNU literals) by default for -std=gnu++*, + and -std=c++98. The flag is off (use suffixes for user-defined + literals) by default for -std=c++11 and later. + + Runtime Library (libstdc++) + + * [15]Improved experimental support for the new ISO C++ standard, + C++11, including: + + forward_list meets the allocator-aware container requirements; + + this_thread::sleep_for(), this_thread::sleep_until() and + this_thread::yield() are defined without requiring the + configure option --enable-libstdcxx-time; + * Improvements to : + + SSE optimized normal_distribution. + + Use of hardware RNG instruction for random_device on new x86 + processors (requires the assembler to support the + instruction.) + and : + + New random number engine simd_fast_mersenne_twister_engine + with an optimized SSE implementation. + + New random number distributions beta_distribution, + normal_mv_distribution, rice_distribution, + nakagami_distribution, pareto_distribution, k_distribution, + arcsine_distribution, hoyt_distribution. + * Added --disable-libstdcxx-verbose configure option to disable + diagnostic messages issued when a process terminates abnormally. + This may be useful for embedded systems to reduce the size of + executables that link statically to the library. + + [16]Fortran + + * Compatibility notice: + + Module files: The version of module files (.mod) has been + incremented. Fortran MODULEs compiled by earlier GCC versions + have to be recompiled, when they are USEd by files compiled + with GCC 4.8. GCC 4.8 is not able to read .mod files created + by earlier versions; attempting to do so gives an error + message. + Note: The ABI of the produced assembler data itself has not + changed; object files and libraries are fully compatible with + older versions except as noted below. + + ABI: Some internal names (used in the assembler/object file) + have changed for symbols declared in the specification part of + a module. If an affected module – or a file using it via use + association – is recompiled, the module and all files which + directly use such symbols have to be recompiled as well. This + change only affects the following kind of module symbols: + o Procedure pointers. Note: C-interoperable function + pointers (type(c_funptr)) are not affected nor are + procedure-pointer components. + o Deferred-length character strings. + * The [17]BACKTRACE intrinsic subroutine has been added. It shows a + backtrace at an arbitrary place in user code; program execution + continues normally afterwards. + * The [18]-Wc-binding-type warning option has been added (disabled by + default). It warns if the a variable might not be C interoperable; + in particular, if the variable has been declared using an intrinsic + type with default kind instead of using a kind parameter defined + for C interoperability in the intrinsic ISO_C_Binding module. + Before, this warning was always printed. The -Wc-binding-type + option is enabled by -Wall. + * The [19]-Wrealloc-lhs and -Wrealloc-lhs-all warning command-line + options have been added, which diagnose when code is inserted for + automatic (re)allocation of a variable during assignment. This + option can be used to decide whether it is safe to use + [20]-fno-realloc-lhs. Additionally, it can be used to find + automatic (re)allocation in hot loops. (For arrays, replacing + "var=" by "var(:)=" disables the automatic reallocation.) + * The [21]-Wcompare-reals command-line option has been added. When + this is set, warnings are issued when comparing REAL or COMPLEX + types for equality and inequality; consider replacing a == b by + abs(a−b) < eps with a suitable eps. -Wcompare-reals is enabled by + -Wextra. + * The [22]-Wtarget-lifetime command-line option has been added + (enabled with -Wall), which warns if the pointer in a pointer + assignment might outlive its target. + * Reading floating point numbers which use "q" for the exponential + (such as 4.0q0) is now supported as vendor extension for better + compatibility with old data files. It is strongly recommended to + use for I/O the equivalent but standard conforming "e" (such as + 4.0e0). + (For Fortran source code, consider replacing the "q" in + floating-point literals by a kind parameter (e.g. 4.0e0_qp with a + suitable qp). Note that – in Fortran source code – replacing "q" by + a simple "e" is not equivalent.) + * The GFORTRAN_TMPDIR environment variable for specifying a + non-default directory for files opened with STATUS="SCRATCH", is + not used anymore. Instead gfortran checks the POSIX/GNU standard + TMPDIR environment variable. If TMPDIR is not defined, gfortran + falls back to other methods to determine the directory for + temporary files as documented in the [23]user manual. + * [24]Fortran 2003: + + Support for unlimited polymorphic variables (CLASS(*)) has + been added. Nonconstant character lengths are not yet + supported. + * [25]TS 29113: + + Assumed types (TYPE(*)) are now supported. + + Experimental support for assumed-rank arrays (dimension(..)) + has been added. Note that currently gfortran's own array + descriptor is used, which is different from the one defined in + TS29113, see [26]gfortran's header file or use the [27]Chasm + Language Interoperability Tools. + + [28]Go + + * GCC 4.8.2 provides a complete implementation of the Go 1.1.2 + release. + * GCC 4.8.0 and 4.8.1 implement a preliminary version of the Go 1.1 + release. The library support is not quite complete. + * Go has been tested on GNU/Linux and Solaris platforms for various + processors including x86, x86_64, PowerPC, SPARC, and Alpha. It may + work on other platforms as well. + +[29]New Targets and Target Specific Improvements + + [30]AArch64 + + * A new port has been added to support AArch64, the new 64-bit + architecture from ARM. Note that this is a separate port from the + existing 32-bit ARM port. + * The port provides initial support for the Cortex-A53 and the + Cortex-A57 processors with the command line options + -mcpu=cortex-a53 and -mcpu=cortex-a57. + * As of GCC 4.8.4 a workaround for the ARM Cortex-A53 erratum 835769 + has been added and can be enabled by giving the + -mfix-cortex-a53-835769 option. Alternatively it can be enabled by + default by configuring GCC with the --enable-fix-cortex-a53-835769 + option. + + [31]ARM + + * Initial support has been added for the AArch32 extensions defined + in the ARMv8 architecture. + * Code generation improvements for the Cortex-A7 and Cortex-A15 CPUs. + * A new option, -mcpu=marvell-pj4, has been added to generate code + for the Marvell PJ4 processor. + * The compiler can now automatically generate the VFMA, VFMS, REVSH + and REV16 instructions. + * A new vectorizer cost model for Advanced SIMD configurations to + improve the auto-vectorization strategies used. + * The scheduler now takes into account the number of live registers + to reduce the amount of spilling that can occur. This should + improve code performance in large functions. The limit can be + removed by using the option -fno-sched-pressure. + * Improvements have been made to the Marvell iWMMX code generation + and support for the iWMMX2 SIMD unit has been added. The option + -mcpu=iwmmxt2 can be used to enable code generation for the latter. + * A number of code generation improvements for Thumb2 to reduce code + size when compiling for the M-profile processors. + * The RTEMS (arm-rtems) port has been updated to use the EABI. + * Code generation support for the old FPA and Maverick floating-point + architectures has been removed. Ports that previously relied on + these features have also been removed. This includes the targets: + + arm*-*-linux-gnu (use arm*-*-linux-gnueabi) + + arm*-*-elf (use arm*-*-eabi) + + arm*-*-uclinux* (use arm*-*-uclinux*eabi) + + arm*-*-ecos-elf (no alternative) + + arm*-*-freebsd (no alternative) + + arm*-wince-pe* (no alternative). + + [32]AVR + + * Support for the command-line option -mshort-calls has been removed. + It was deprecated in GCC 4.7. + * The configure option --with-avrlibc supported since GCC 4.7.2 is + turned on per default for all non-RTEMS configurations. This option + arranges for a better integration of [33]AVR-LibC with avr-gcc. For + technical details, see [34]PR54461. To turn off the option in + non-AVR-LibC configurations, use --with-avrlibc=no. If the compiler + is configured for RTEMS, the option is always turned off. + * Support for the "Embedded C" fixed-point has been added. For + details, see the [35]GCC wiki and the [36]user manual. The support + is not complete. + * A new print modifier %r for register operands in inline assembler + is supported. It will print the raw register number without the + register prefix 'r': + /* Return the most significant byte of 'val', a 64-bit value. */ + + unsigned char msb (long long val) + { + unsigned char c; + __asm__ ("mov %0, %r1+7" : "=r" (c) : "r" (val)); + return c; + } + The inline assembler in this example will generate code like + mov r24, 8+7 + provided c is allocated to R24 and val is allocated to R8…R15. This + works because the GNU assembler accepts plain register numbers + without register prefix. + * Static initializers with 3-byte symbols are supported now: + extern const __memx char foo; + const __memx void *pfoo = &foo; + This requires at least Binutils 2.23. + + IA-32/x86-64 + + * Allow -mpreferred-stack-boundary=3 for the x86-64 architecture with + SSE extensions disabled. Since the x86-64 ABI requires 16 byte + stack alignment, this is ABI incompatible and intended to be used + in controlled environments where stack space is an important + limitation. This option will lead to wrong code when functions + compiled with 16 byte stack alignment (such as functions from a + standard library) are called with misaligned stack. In this case, + SSE instructions may lead to misaligned memory access traps. In + addition, variable arguments will be handled incorrectly for 16 + byte aligned objects (including x87 long double and __int128), + leading to wrong results. You must build all modules with + -mpreferred-stack-boundary=3, including any libraries. This + includes the system libraries and startup modules. + * Support for the new Intel processor codename Broadwell with RDSEED, + ADCX, ADOX, PREFETCHW is available through -madx, -mprfchw, + -mrdseed command-line options. + * Support for the Intel RTM and HLE intrinsics, built-in functions + and code generation is available via -mrtm and -mhle. + * Support for the Intel FXSR, XSAVE and XSAVEOPT instruction sets. + Intrinsics and built-in functions are available via -mfxsr, -mxsave + and -mxsaveopt respectively. + * New -maddress-mode=[short|long] options for x32. + -maddress-mode=short overrides default 64-bit addresses to 32-bit + by emitting the 0x67 address-size override prefix. This is the + default address mode for x32. + * New built-in functions to detect run-time CPU type and ISA: + + A built-in function __builtin_cpu_is has been added to detect + if the run-time CPU is of a particular type. It returns a + positive integer on a match and zero otherwise. It accepts one + string literal argument, the CPU name. For example, + __builtin_cpu_is("westmere") returns a positive integer if the + run-time CPU is an Intel Core i7 Westmere processor. Please + refer to the [37]user manual for the list of valid CPU names + recognized. + + A built-in function __builtin_cpu_supports has been added to + detect if the run-time CPU supports a particular ISA feature. + It returns a positive integer on a match and zero otherwise. + It accepts one string literal argument, the ISA feature. For + example, __builtin_cpu_supports("ssse3") returns a positive + integer if the run-time CPU supports SSSE3 instructions. + Please refer to the [38]user manual for the list of valid ISA + names recognized. + Caveat: If these built-in functions are called before any static + constructors are invoked, like during IFUNC initialization, then + the CPU detection initialization must be explicitly run using this + newly provided built-in function, __builtin_cpu_init. The + initialization needs to be done only once. For example, this is how + the invocation would look like inside an IFUNC initializer: + static void (*some_ifunc_resolver(void))(void) + { + __builtin_cpu_init(); + if (__builtin_cpu_is("amdfam10h") ... + if (__builtin_cpu_supports("popcnt") ... + } + + * Function Multiversioning Support with G++: + It is now possible to create multiple function versions each + targeting a specific processor and/or ISA. Function versions have + the same signature but different target attributes. For example, + here is a program with function versions: + __attribute__ ((target ("default"))) + int foo(void) + { + return 1; + } + + __attribute__ ((target ("sse4.2"))) + int foo(void) + { + return 2; + } + + int main (void) + { + int (*p) = &foo; + assert ((*p)() == foo()); + return 0; + } + + Please refer to this [39]wiki for more information. + * The x86 back end has been improved to allow option -fschedule-insns + to work reliably. This option can be used to schedule instructions + better and leads to improved performace in certain cases. + * Windows MinGW-w64 targets (*-w64-mingw*) require at least r5437 + from the Mingw-w64 trunk. + * Support for new AMD family 15h processors (Steamroller core) is now + available through the -march=bdver3 and -mtune=bdver3 options. + * Support for new AMD family 16h processors (Jaguar core) is now + available through the -march=btver2 and -mtune=btver2 options. + + [40]FRV + + * This target now supports the -fstack-usage command-line option. + + [41]MIPS + + * GCC can now generate code specifically for the R4700, Broadcom XLP + and MIPS 34kn processors. The associated -march options are + -march=r4700, -march=xlp and -march=34kn respectively. + * GCC now generates better DSP code for MIPS 74k cores thanks to + further scheduling optimizations. + * The MIPS port now supports the -fstack-check option. + * GCC now passes the -mmcu and -mno-mcu options to the assembler. + * Previous versions of GCC would silently accept -fpic and -fPIC for + -mno-abicalls targets like mips*-elf. This combination was not + intended or supported, and did not generate position-independent + code. GCC 4.8 now reports an error when this combination is used. + + [42]PowerPC / PowerPC64 / RS6000 + + * SVR4 configurations (GNU/Linux, FreeBSD, NetBSD) no longer save, + restore or update the VRSAVE register by default. The respective + operating systems manage the VRSAVE register directly. + * Large TOC support has been added for AIX through the command line + option -mcmodel=large. + * Native Thread-Local Storage support has been added for AIX. + * VMX (Altivec) and VSX instruction sets now are enabled implicitly + when targetting processors that support those hardware features on + AIX 6.1 and above. + + [43]RX + + * This target will now issue a warning message whenever multiple fast + interrupt handlers are found in the same compilation unit. This + feature can be turned off by the new + -mno-warn-multiple-fast-interrupts command-line option. + + S/390, System z + + * Support for the IBM zEnterprise zEC12 processor has been added. + When using the -march=zEC12 option, the compiler will generate code + making use of the following new instructions: + + load and trap instructions + + 2 new compare and trap instructions + + rotate and insert selected bits - without CC clobber + The -mtune=zEC12 option enables zEC12 specific instruction + scheduling without making use of new instructions. + * Register pressure sensitive instruction scheduling is enabled by + default. + * The ifunc function attribute is enabled by default. + * memcpy and memcmp invokations on big memory chunks or with run time + lengths are not generated inline anymore when tuning for z10 or + higher. The purpose is to make use of the IFUNC optimized versions + in Glibc. + + [44]SH + + * The default alignment settings have been reduced to be less + aggressive. This results in more compact code for optimization + levels other than -Os. + * Improved support for the __atomic built-in functions: + + A new option -matomic-model=model selects the model for the + generated atomic sequences. The following models are + supported: + + soft-gusa + Software gUSA sequences (SH3* and SH4* only). On + SH4A targets this will now also partially utilize + the movco.l and movli.l instructions. This is the + default when the target is sh3*-*-linux* or + sh4*-*-linux*. + + hard-llcs + Hardware movco.l / movli.l sequences (SH4A only). + + soft-tcb + Software thread control block sequences. + + soft-imask + Software interrupt flipping sequences (privileged + mode only). This is the default when the target is + sh1*-*-linux* or sh2*-*-linux*. + + none + Generates function calls to the respective __atomic + built-in functions. This is the default for SH64 + targets or when the target is not sh*-*-linux*. + + + The option -msoft-atomic has been deprecated. It is now an + alias for -matomic-model=soft-gusa. + + A new option -mtas makes the compiler generate the tas.b + instruction for the __atomic_test_and_set built-in function + regardless of the selected atomic model. + + The __sync functions in libgcc now reflect the selected atomic + model when building the toolchain. + * Added support for the mov.b and mov.w instructions with + displacement addressing. + * Added support for the SH2A instructions movu.b and movu.w. + * Various improvements to code generated for integer arithmetic. + * Improvements to conditional branches and code that involves the T + bit. A new option -mzdcbranch tells the compiler to favor + zero-displacement branches. This is enabled by default for SH4* + targets. + * The pref instruction will now be emitted by the __builtin_prefetch + built-in function for SH3* targets. + * The fmac instruction will now be emitted by the fmaf standard + function and the __builtin_fmaf built-in function. + * The -mfused-madd option has been deprecated in favor of the + machine-independent -ffp-contract option. Notice that the fmac + instruction will now be generated by default for expressions like a + * b + c. This is due to the compiler default setting + -ffp-contract=fast. + * Added new options -mfsrra and -mfsca to allow the compiler using + the fsrra and fsca instructions on targets other than SH4A (where + they are already enabled by default). + * Added support for the __builtin_bswap32 built-in function. It is + now expanded as a sequence of swap.b and swap.w instructions + instead of a library function call. + * The behavior of the -mieee option has been fixed and the negative + form -mno-ieee has been added to control the IEEE conformance of + floating point comparisons. By default -mieee is now enabled and + the option -ffinite-math-only implicitly sets -mno-ieee. + * Added support for the built-in functions __builtin_thread_pointer + and __builtin_set_thread_pointer. This assumes that GBR is used to + hold the thread pointer of the current thread. Memory loads and + stores relative to the address returned by __builtin_thread_pointer + will now also utilize GBR based displacement address modes. + * The -mdiv= option for targets other than SHmedia has been fixed and + documented. + + [45]SPARC + + * Added optimized instruction scheduling for Niagara4. + + [46]TILE-Gx + + * Added support for the -mcmodel=MODEL command-line option. The + models supported are small and large. + + [47]V850 + + * This target now supports the E3V5 architecture via the use of the + new -mv850e3v5 command-line option. It also has experimental + support for the e3v5 LOOP instruction which can be enabled via the + new -mloop command-line option. + + [48]XStormy16 + + * This target now supports the -fstack-usage command-line option. + +[49]Operating Systems + + [50]OpenBSD + + * Support for OpenBSD/amd64 (x86_64-*-openbsd*) has been added and + support for OpenBSD/i386 (i386-*-openbsd*) has been rejuvenated. + + [51]Windows (Cygwin) + + * Executables are now linked against shared libgcc by default. The + previous default was to link statically, which can still be done by + explicitly specifying -static or static-libgcc on the command line. + However it is strongly advised against, as it will cause problems + for any application that makes use of DLLs compiled by GCC. It + should be alright for a monolithic stand-alone application that + only links against the Windows DLLs, but offers little or no + benefit. + +[52]GCC 4.8.1 + + This is the [53]list of problem reports (PRs) from GCC's bug tracking + system that are known to be fixed in the 4.8.1 release. This list might + not be complete (that is, it is possible that some PRs that have been + fixed are not listed here). + + The C++11 std::chrono::system_clock and + std::chrono::steady_clock classes have changed ABI in GCC 4.8.1, they + both are now separate (never typedefs of each other), both use + std::chrono::nanoseconds resolution, on most GNU/Linux configurations + std::chrono::steady_clock is now finally monotonic, and both classes + are mangled differently than in the previous GCC releases. + std::chrono::system_clock::now() with std::chrono::microseconds resp. + std::chrono::seconds resolution is still exported for backwards + compatibility with default configured libstdc++. Note that libstdc++ + configured with --enable-libstdcxx-time= used to be ABI incompatible + with default configured libstdc++ for those two classes and no ABI + compatibility can be offered for those configurations, so any C++11 + code that uses those classes and has been compiled and linked against + libstdc++ configured with the non-default --enable-libstdcxx-time= + configuration option needs to be recompiled. + +[54]GCC 4.8.2 + + This is the [55]list of problem reports (PRs) from GCC's bug tracking + system that are known to be fixed in the 4.8.2 release. This list might + not be complete (that is, it is possible that some PRs that have been + fixed are not listed here). + +[56]GCC 4.8.3 + + This is the [57]list of problem reports (PRs) from GCC's bug tracking + system that are known to be fixed in the 4.8.3 release. This list might + not be complete (that is, it is possible that some PRs that have been + fixed are not listed here). + + Support for the new powerpc64le-linux platform has been added. It + defaults to generating code that conforms to the ELFV2 ABI. + +[58]GCC 4.8.4 + + This is the [59]list of problem reports (PRs) from GCC's bug tracking + system that are known to be fixed in the 4.8.4 release. This list might + not be complete (that is, it is possible that some PRs that have been + fixed are not listed here). + +[60]GCC 4.8.5 + + This is the [61]list of problem reports (PRs) from GCC's bug tracking + system that are known to be fixed in the 4.8.5 release. This list might + not be complete (that is, it is possible that some PRs that have been + fixed are not listed here). + + + For questions related to the use of GCC, please consult these web + pages and the [62]GCC manuals. If that fails, the + [63]gcc-help@gcc.gnu.org mailing list might help. Comments on these + web pages and the development of GCC are welcome on our developer + list at [64]gcc@gcc.gnu.org. All of [65]our lists have public + archives. + + Copyright (C) [66]Free Software Foundation, Inc. Verbatim copying and + distribution of this entire article is permitted in any medium, + provided this notice is preserved. + + These pages are [67]maintained by the GCC team. Last modified + 2025-02-28. + +References + + 1. https://gcc.gnu.org/wiki/cxx-conversion + 2. ftp://gcc.gnu.org/pub/gcc/infrastructure/ + 3. https://gcc.gnu.org/gcc-4.8/porting_to.html + 4. https://github.com/google/sanitizers + 5. https://code.google.com/archive/p/data-race-test/wikis/ThreadSanitizer.wiki + 6. https://lkml.org/lkml/2006/11/28/239 + 7. https://gcc.gnu.org/gcc-4.8/changes.html#cxx + 8. https://gcc.gnu.org/gcc-4.8/cxx0x_status.html + 9. https://gcc.gnu.org/gcc-4.8/cxx0x_status.html + 10. https://gcc.gnu.org/gcc-4.8/cxx0x_status.html + 11. https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2011/n3276.pdf + 12. https://gcc.gnu.org/gcc-4.8/cxx0x_status.html + 13. https://www.open-std.org/JTC1/SC22/WG21/docs/papers/2012/n3386.html + 14. https://gcc.gnu.org/projects/cxx1y.html + 15. https://gcc.gnu.org/onlinedocs/gcc-4.8.4/libstdc++/manual/manual/status.html#status.iso.2011 + 16. https://gcc.gnu.org/gcc-4.8/changes.html#fortran + 17. https://gcc.gnu.org/onlinedocs/gfortran/BACKTRACE.html + 18. https://gcc.gnu.org/onlinedocs/gfortran/Error-and-Warning-Options.html + 19. https://gcc.gnu.org/onlinedocs/gfortran/Error-and-Warning-Options.html + 20. https://gcc.gnu.org/onlinedocs/gfortran/Code-Gen-Options.html + 21. https://gcc.gnu.org/onlinedocs/gfortran/Error-and-Warning-Options.html + 22. https://gcc.gnu.org/onlinedocs/gfortran/Error-and-Warning-Options.html + 23. https://gcc.gnu.org/onlinedocs/gfortran/TMPDIR.html + 24. https://gcc.gnu.org/wiki/Fortran2003Status + 25. https://gcc.gnu.org/wiki/TS29113Status + 26. https://gcc.gnu.org/git/?p=gcc.git;a=blob;f=libgfortran/libgfortran.h + 27. https://chasm-interop.sourceforge.net/ + 28. https://gcc.gnu.org/gcc-4.8/changes.html#go + 29. https://gcc.gnu.org/gcc-4.8/changes.html#targets + 30. https://gcc.gnu.org/gcc-4.8/changes.html#aarch64 + 31. https://gcc.gnu.org/gcc-4.8/changes.html#arm + 32. https://gcc.gnu.org/gcc-4.8/changes.html#avr + 33. http://www.nongnu.org/avr-libc/ + 34. https://gcc.gnu.org/PR54461 + 35. https://gcc.gnu.org/wiki/avr-gcc#Fixed-Point_Support + 36. https://gcc.gnu.org/onlinedocs/gcc/Fixed-Point.html + 37. https://gcc.gnu.org/onlinedocs/gcc/x86-Built-in-Functions.html + 38. https://gcc.gnu.org/onlinedocs/gcc/x86-Built-in-Functions.html + 39. https://gcc.gnu.org/wiki/FunctionMultiVersioning + 40. https://gcc.gnu.org/gcc-4.8/changes.html#frv + 41. https://gcc.gnu.org/gcc-4.8/changes.html#mips + 42. https://gcc.gnu.org/gcc-4.8/changes.html#powerpc + 43. https://gcc.gnu.org/gcc-4.8/changes.html#rx + 44. https://gcc.gnu.org/gcc-4.8/changes.html#sh + 45. https://gcc.gnu.org/gcc-4.8/changes.html#sparc + 46. https://gcc.gnu.org/gcc-4.8/changes.html#tilegx + 47. https://gcc.gnu.org/gcc-4.8/changes.html#v850 + 48. https://gcc.gnu.org/gcc-4.8/changes.html#xstormy16 + 49. https://gcc.gnu.org/gcc-4.8/changes.html#os + 50. https://gcc.gnu.org/gcc-4.8/changes.html#openbsd + 51. https://gcc.gnu.org/gcc-4.8/changes.html#windows + 52. https://gcc.gnu.org/gcc-4.8/changes.html#GCC4.8.1 + 53. https://gcc.gnu.org/bugzilla/buglist.cgi?bug_status=RESOLVED&resolution=FIXED&target_milestone=4.8.1 + 54. https://gcc.gnu.org/gcc-4.8/changes.html#GCC4.8.2 + 55. https://gcc.gnu.org/bugzilla/buglist.cgi?bug_status=RESOLVED&resolution=FIXED&target_milestone=4.8.2 + 56. https://gcc.gnu.org/gcc-4.8/changes.html#GCC4.8.3 + 57. https://gcc.gnu.org/bugzilla/buglist.cgi?bug_status=RESOLVED&resolution=FIXED&target_milestone=4.8.3 + 58. https://gcc.gnu.org/gcc-4.8/changes.html#GCC4.8.4 + 59. https://gcc.gnu.org/bugzilla/buglist.cgi?bug_status=RESOLVED&resolution=FIXED&target_milestone=4.8.4 + 60. https://gcc.gnu.org/gcc-4.8/changes.html#GCC4.8.5 + 61. https://gcc.gnu.org/bugzilla/buglist.cgi?bug_status=RESOLVED&resolution=FIXED&target_milestone=4.8.5 + 62. https://gcc.gnu.org/onlinedocs/ + 63. mailto:gcc-help@gcc.gnu.org + 64. mailto:gcc@gcc.gnu.org + 65. https://gcc.gnu.org/lists.html + 66. https://www.fsf.org/ + 67. https://gcc.gnu.org/about.html +====================================================================== +http://gcc.gnu.org/gcc-4.7/index.html + GCC 4.7 Release Series + + (This release series is no longer supported.) + + June 12, 2014 + + The [1]GNU project and the GCC developers are pleased to announce the + release of GCC 4.7.4. + + This release is a bug-fix release, containing fixes for regressions in + GCC 4.7.3 relative to previous releases of GCC. + +Release History + + GCC 4.7.4 + June 12, 2014 ([2]changes, [3]documentation) + + GCC 4.7.3 + April 11, 2013 ([4]changes, [5]documentation) + + GCC 4.7.2 + September 20, 2012 ([6]changes, [7]documentation) + + GCC 4.7.1 + June 14, 2012 ([8]changes, [9]documentation) + + GCC 4.7.0 + March 22, 2012 ([10]changes, [11]documentation) + +References and Acknowledgements + + GCC used to stand for the GNU C Compiler, but since the compiler + supports several other languages aside from C, it now stands for the + GNU Compiler Collection. + + A list of [12]successful builds is updated as new information becomes + available. + + The GCC developers would like to thank the numerous people that have + contributed new features, improvements, bug fixes, and other changes as + well as test results to GCC. This [13]amazing group of volunteers is + what makes GCC successful. + + For additional information about GCC please refer to the [14]GCC + project web site or contact the [15]GCC development mailing list. + + To obtain GCC please use [16]our mirror sites or [17]our version + control system. + + + For questions related to the use of GCC, please consult these web + pages and the [18]GCC manuals. If that fails, the + [19]gcc-help@gcc.gnu.org mailing list might help. Comments on these + web pages and the development of GCC are welcome on our developer + list at [20]gcc@gcc.gnu.org. All of [21]our lists have public + archives. + + Copyright (C) [22]Free Software Foundation, Inc. Verbatim copying and + distribution of this entire article is permitted in any medium, + provided this notice is preserved. + + These pages are [23]maintained by the GCC team. Last modified + 2022-10-26. + +References + + 1. http://www.gnu.org/ + 2. https://gcc.gnu.org/gcc-4.7/changes.html + 3. https://gcc.gnu.org/onlinedocs/4.7.4/ + 4. https://gcc.gnu.org/gcc-4.7/changes.html + 5. https://gcc.gnu.org/onlinedocs/4.7.3/ + 6. https://gcc.gnu.org/gcc-4.7/changes.html + 7. https://gcc.gnu.org/onlinedocs/4.7.2/ + 8. https://gcc.gnu.org/gcc-4.7/changes.html + 9. https://gcc.gnu.org/onlinedocs/4.7.1/ + 10. https://gcc.gnu.org/gcc-4.7/changes.html + 11. https://gcc.gnu.org/onlinedocs/4.7.0/ + 12. https://gcc.gnu.org/gcc-4.7/buildstat.html + 13. https://gcc.gnu.org/onlinedocs/gcc/Contributors.html + 14. https://gcc.gnu.org/index.html + 15. mailto:gcc@gcc.gnu.org + 16. https://gcc.gnu.org/mirrors.html + 17. https://gcc.gnu.org/git.html + 18. https://gcc.gnu.org/onlinedocs/ + 19. mailto:gcc-help@gcc.gnu.org + 20. mailto:gcc@gcc.gnu.org + 21. https://gcc.gnu.org/lists.html + 22. https://www.fsf.org/ + 23. https://gcc.gnu.org/about.html +====================================================================== +http://gcc.gnu.org/gcc-4.7/changes.html + GCC 4.7 Release Series + Changes, New Features, and Fixes + +Caveats + + * The -fconserve-space flag has been deprecated. The flag had no + effect for most targets: only targets without a global .bss section + and without support for switchable sections. Furthermore, the flag + only had an effect for G++, where it could result in wrong + semantics (please refer to the GCC manual for further details). The + flag will be removed in GCC 4.8 + * Support for a number of older systems and recently unmaintained or + untested target ports of GCC has been declared obsolete in GCC 4.7. + Unless there is activity to revive them, the next release of GCC + will have their sources permanently removed. + All GCC ports for the following processor architectures have been + declared obsolete: + + picoChip (picochip-*) + The following ports for individual systems on particular + architectures have been obsoleted: + + IRIX 6.5 (mips-sgi-irix6.5) + + MIPS OpenBSD (mips*-*-openbsd*) + + Solaris 8 (*-*-solaris2.8). Details can be found in the + [1]announcement. + + Tru64 UNIX V5.1 (alpha*-dec-osf5.1*) + * On ARM, when compiling for ARMv6 (but not ARMv6-M), ARMv7-A, + ARMv7-R, or ARMv7-M, the new option -munaligned-access is active by + default, which for some sources generates code that accesses memory + on unaligned addresses. This requires the kernel of those systems + to enable such accesses (controlled by CP15 register c1, refer to + ARM documentation). Alternatively, or for compatibility with + kernels where unaligned accesses are not supported, all code has to + be compiled with -mno-unaligned-access. Upstream Linux kernel + releases have automatically and unconditionally supported unaligned + accesses as emitted by GCC due to this option being active since + version 2.6.28. + * Support on ARM for the legacy floating-point accelerator (FPA) and + the mixed-endian floating-point format that it used has been + obsoleted. The ports that still use this format have been obsoleted + as well. Many legacy ARM ports already provide an alternative that + uses the VFP floating-point format. The obsolete ports will be + deleted in the next release. + The obsolete ports with alternatives are: + + arm*-*-rtems (use arm*-*-rtemseabi) + + arm*-*-linux-gnu (use arm*-*-linux-gnueabi) + + arm*-*-elf (use arm*-*-eabi) + + arm*-*-uclinux* (use arm*-*-uclinux*eabi) + Note, however, that these alternatives are not binary compatible + with their legacy counterparts (although some can support running + legacy applications). + The obsolete ports that currently lack a modern alternative are: + + arm*-*-ecos-elf + + arm*-*-freebsd + + arm*-wince-pe* + New ports that support more recent versions of the architecture are + welcome. + * Support for the Maverick co-processor on ARM has been obsoleted. + Code to support it will be deleted in the next release. + * Support has been removed for Unix International threads on Solaris + 2, so the --enable-threads=solaris configure option and the + -threads compiler option don't work any longer. + * Support has been removed for the Solaris BSD Compatibility Package, + which lives in /usr/ucbinclude and /usr/ucblib. It has been removed + from Solaris 11, and was only intended as a migration aid from + SunOS 4 to SunOS 5. The -compat-bsd compiler option is not + recognized any longer. + * The ARM port's -mwords-little-endian option has been deprecated. It + will be removed in a future release. + * Support has been removed for the NetWare x86 configuration + obsoleted in GCC 4.6. + * It is no longer possible to use the "l" constraint in MIPS16 asm + statements. + * GCC versions 4.7.0 and 4.7.1 had changes to the C++ standard + library which affected the ABI in C++11 mode: a data member was + added to std::list changing its size and altering the definitions + of some member functions, and std::pair's move constructor was + non-trivial which altered the calling convention for functions with + std::pair arguments or return types. The ABI incompatibilities have + been fixed for GCC version 4.7.2 but as a result C++11 code + compiled with GCC 4.7.0 or 4.7.1 may be incompatible with C++11 + code compiled with different GCC versions and with C++98/C++03 code + compiled with any version. + * On ARM, a bug has been fixed in GCC's implementation of the AAPCS + rules for the layout of vectors that could lead to wrong code being + generated. Vectors larger than 8 bytes in size are now by default + aligned to an 8-byte boundary. This is an ABI change: code that + makes explicit use of vector types may be incompatible with binary + objects built with older versions of GCC. Auto-vectorized code is + not affected by this change. (This change affects GCC versions + 4.7.2 and later.) + * More information on porting to GCC 4.7 from previous versions of + GCC can be found in the [2]porting guide for this release. + +General Optimizer Improvements + + * Support for a new parameter --param case-values-threshold=n was + added to allow users to control the cutoff between doing switch + statements as a series of if statements and using a jump table. + * Link-time optimization (LTO) improvements: + + Improved scalability and reduced memory usage. Link time + optimization of Firefox now requires 3GB of RAM on a 64-bit + system, while over 8GB was needed previously. Linking time has + been improved, too. The serial stage of linking Firefox has + been sped up by about a factor of 10. + + Reduced size of object files and temporary storage used during + linking. + + Streaming performance (both outbound and inbound) has been + improved. + + ld -r is now supported with LTO. + + Several bug fixes, especially in symbol table handling and + merging. + * Interprocedural optimization improvements: + + Heuristics now take into account that after inlining code will + be optimized out because of known values (or properties) of + function parameters. For example: +void foo(int a) +{ + if (a > 10) + ... huge code ... +} +void bar (void) +{ + foo (0); +} + + The call of foo will be inlined into bar even when optimizing + for code size. Constructs based on __builtin_constant_p are + now understood by the inliner and code size estimates are + evaluated a lot more realistically. + + The representation of C++ virtual thunks and aliases (both + implicit and defined via the alias attribute) has been + re-engineered. Aliases no longer pose optimization barriers + and calls to an alias can be inlined and otherwise optimized. + + The inter-procedural constant propagation pass has been + rewritten. It now performs generic function specialization. + For example when compiling the following: +void foo(bool flag) +{ + if (flag) + ... do something ... + else + ... do something else ... +} +void bar (void) +{ + foo (false); + foo (true); + foo (false); + foo (true); + foo (false); + foo (true); +} + + GCC will now produce two copies of foo. One with flag being + true, while other with flag being false. This leads to + performance improvements previously possible only by inlining + all calls. Cloning causes a lot less code size growth. + * A string length optimization pass has been added. It attempts to + track string lengths and optimize various standard C string + functions like strlen, strchr, strcpy, strcat, stpcpy and their + _FORTIFY_SOURCE counterparts into faster alternatives. This pass is + enabled by default at -O2 or above, unless optimizing for size, and + can be disabled by the -fno-optimize-strlen option. The pass can + e.g. optimize +char *bar (const char *a) +{ + size_t l = strlen (a) + 2; + char *p = malloc (l); if (p == NULL) return p; + strcpy (p, a); strcat (p, "/"); return p; +} + + into: +char *bar (const char *a) +{ + size_t tmp = strlen (a); + char *p = malloc (tmp + 2); if (p == NULL) return p; + memcpy (p, a, tmp); memcpy (p + tmp, "/", 2); return p; +} + + or for hosted compilations where stpcpy is available in the runtime + and headers provide its prototype, e.g. +void foo (char *a, const char *b, const char *c, const char *d) +{ + strcpy (a, b); strcat (a, c); strcat (a, d); +} + + can be optimized into: +void foo (char *a, const char *b, const char *c, const char *d) +{ + strcpy (stpcpy (stpcpy (a, b), c), d); +} + +New Languages and Language specific improvements + + * Version 3.1 of the OpenMP specification is now supported for the C, + C++, and Fortran compilers. + + Ada + + * The command-line option -feliminate-unused-debug-types has been + re-enabled by default, as it is for the other languages, leading to + a reduction in debug info size of 12.5% and more for relevant + cases, as well as to a small compilation speedup. + + C family + + * A new built-in, __builtin_assume_aligned, has been added, through + which the compiler can be hinted about pointer alignment and can + use it to improve generated code. + * A new warning option -Wunused-local-typedefs was added for C, C++, + Objective-C and Objective-C++. This warning diagnoses typedefs + locally defined in a function, and otherwise not used. + * A new experimental command-line option -ftrack-macro-expansion was + added for C, C++, Objective-C, Objective-C++ and Fortran. It allows + the compiler to emit diagnostic about the current macro expansion + stack when a compilation error occurs in a macro expansion. + * Experimental support for transactional memory has been added. It + includes support in the compiler, as well as a supporting runtime + library called libitm. To compile code with transactional memory + constructs, use the -fgnu-tm option. + Support is currently available for Alpha, ARM, PowerPC, SH, SPARC, + and 32-bit/64-bit x86 platforms. + For more details on transactional memory see [3]the GCC WiKi. + * Support for atomic operations specifying the C++11/C11 memory model + has been added. These new __atomic routines replace the existing + __sync built-in routines. + Atomic support is also available for memory blocks. Lock-free + instructions will be used if a memory block is the same size and + alignment as a supported integer type. Atomic operations which do + not have lock-free support are left as function calls. A set of + library functions is available on the GCC atomic wiki in the + "External Atomics Library" section. + For more details on the memory models and features, see the + [4]atomic wiki. + * When a binary operation is performed on vector types and one of the + operands is a uniform vector, it is possible to replace the vector + with the generating element. For example: +typedef int v4si __attribute__ ((vector_size (16))); +v4si res, a = {1,2,3,4}; +int x; + +res = 2 + a; /* means {2,2,2,2} + a */ +res = a - x; /* means a - {x,x,x,x} */ + + C + + * There is support for some more features from the C11 revision of + the ISO C standard. GCC now accepts the options -std=c11 and + -std=gnu11, in addition to the previous -std=c1x and -std=gnu1x. + + Unicode strings (previously supported only with options such + as -std=gnu11, now supported with -std=c11), and the + predefined macros __STDC_UTF_16__ and __STDC_UTF_32__. + + Nonreturning functions (_Noreturn and ). + + Alignment support (_Alignas, _Alignof, max_align_t, + ). + + A built-in function __builtin_complex is provided to support C + library implementation of the CMPLX family of macros. + + [5]C++ + + * G++ now accepts the -std=c++11, -std=gnu++11, and -Wc++11-compat + options, which are equivalent to -std=c++0x, -std=gnu++0x, and + -Wc++0x-compat, respectively. + * G++ now implements [6]C++11 extended friend syntax: + +template +class Q +{ + static const int I = 2; +public: + friend W; +}; + +struct B +{ + int ar[Q::I]; +}; + + * Thanks to Ville Voutilainen, G++ now implements [7]C++11 explicit + override control. + +struct B { + virtual void f() const final; + virtual void f(int); +}; + +struct D : B { + void f() const; // error: D::f attempts to override final B::f + void f(long) override; // error: doesn't override anything + void f(int) override; // ok +}; + +struct E final { }; +struct F: E { }; // error: deriving from final class + + * G++ now implements [8]C++11 non-static data member initializers. + +struct A { + int i = 42; +} a; // initializes a.i to 42 + + * Thanks to Ed Smith-Rowland, G++ now implements [9]C++11 + user-defined literals. + +// Not actually a good approximation. :) +constexpr long double operator"" _degrees (long double d) { return d * 0.0175; } +long double pi = 180.0_degrees; + + * G++ now implements [10]C++11 alias-declarations. + +template using Ptr = T*; +Ptr ip; // decltype(ip) is int* + + * Thanks to Ville Voutilainen and Pedro Lamarão, G++ now implements + [11]C++11 delegating constructors. + +struct A { + A(int); + A(): A(42) { } // delegate to the A(int) constructor +}; + + * G++ now fully implements C++11 atomic classes rather than just + integer derived classes. + +class POD { + int a; + int b; +}; +std::atomic my_atomic_POD; + + * G++ now sets the predefined macro __cplusplus to the correct value, + 199711L for C++98/03, and 201103L for C++11. + * G++ now correctly implements the two-phase lookup rules such that + an unqualified name used in a template must have an appropriate + declaration found either in scope at the point of definition of the + template or by argument-dependent lookup at the point of + instantiation. As a result, code that relies on a second + unqualified lookup at the point of instantiation to find functions + declared after the template or in dependent bases will be rejected. + The compiler will suggest ways to fix affected code, and using the + -fpermissive compiler flag will allow the code to compile with a + warning. + +template +void f() { g(T()); } // error, g(int) not found by argument-dependent lookup +void g(int) { } // fix by moving this declaration before the declaration of f + +template +struct A: T { + // error, B::g(B) not found by argument-dependent lookup + void f() { g(T()); } // fix by using this->g or A::g +}; + +struct B { void g(B); }; + +int main() +{ + f(); + A().f(); +} + + * G++ now properly re-uses stack space allocated for temporary + objects when their lifetime ends, which can significantly lower + stack consumption for some C++ functions. As a result of this, some + code with undefined behavior will now break: + +const int &f(const int &i) { return i; } +.... +const int &x = f(1); +const int &y = f(2); + + Here, x refers to the temporary allocated to hold the 1 argument, + which only lives until the end of the initialization; it + immediately becomes a dangling reference. So the next statement + re-uses the stack slot to hold the 2 argument, and users of x get + that value instead. + Note that this should not cause any change of behavior for + temporaries of types with non-trivial destructors, as they are + already destroyed at end of full-expression; the change is that now + the storage is released as well. + * A new command-line option -Wdelete-non-virtual-dtor has been added + to warn when delete is used to destroy an instance of a class which + has virtual functions and non-virtual destructor. It is unsafe to + delete an instance of a derived class through a pointer to a base + class if the base class does not have a virtual destructor. This + warning is enabled by -Wall. + * A new command-line option -Wzero-as-null-pointer-constant has been + added to warn when a literal '0' is used as null pointer constant. + It can be useful to facilitate the conversion to nullptr in C++11. + * As per C++98, access-declarations are now deprecated by G++. + Using-declarations are to be used instead. Furthermore, some + efforts have been made to improve the support of class scope + using-declarations. In particular, using-declarations referring to + a dependent type now work as expected ([12]bug c++/14258). + * The ELF symbol visibility of a template instantiation is now + properly constrained by the visibility of its template arguments + ([13]bug c++/35688). + + Runtime Library (libstdc++) + + * [14]Improved experimental support for the new ISO C++ standard, + C++11, including: + + using noexcept in most of the library; + + implementations of pointer_traits, allocator_traits and + scoped_allocator_adaptor; + + uses-allocator construction for tuple; + + vector meets the allocator-aware container requirements; + + replacing monotonic_clock with steady_clock; + + enabling the thread support library on most POSIX targets; + + many small improvements to conform to the FDIS. + * Added --enable-clocale=newlib configure option. + * Debug Mode iterators for unordered associative containers. + * Avoid polluting the global namespace and do not include . + + [15]Fortran + + * The compile flag [16]-fstack-arrays has been added, which causes + all local arrays to be put on stack memory. For some programs this + will improve the performance significantly. If your program uses + very large local arrays, it is possible that you will have to + extend your runtime limits for stack memory. + * The [17]-Ofast flag now also implies [18]-fno-protect-parens and + [19]-fstack-arrays. + * Front-end optimizations can now be selected by the + [20]-ffrontend-optimize option and deselected by the + -fno-frontend-optimize option. + * When front-end optimization removes a function call, + [21]-Wfunction-elimination warns about that. + * When performing front-end-optimization, the + [22]-faggressive-function-elimination option allows the removal of + duplicate function calls even for impure functions. + * The flag [23]-Wreal-q-constant has been added, which warns if + floating-point literals have been specified using q (such as + 1.0q0); the q marker is now supported as a vendor extension to + denote quad precision (REAL(16) or, if not available, REAL(10)). + Consider using a kind parameter (such as in 1.0_qp) instead, which + can be obtained via [24]SELECTED_REAL_KIND. + * The GFORTRAN_USE_STDERR environment variable has been removed. GNU + Fortran now always prints error messages to standard error. If you + wish to redirect standard error, please consult the manual for your + OS, shell, batch environment etc. as appropriate. + * The -fdump-core option and GFORTRAN_ERROR_DUMPCORE environment + variable have been removed. When encountering a serious error, + gfortran will now always abort the program. Whether a core dump is + generated depends on the user environment settings; see the ulimit + -c setting for POSIX shells, limit coredumpsize for C shells, and + the [25]WER user-mode dumps settings on Windows. + * The [26]-fbacktrace option is now enabled by default. When + encountering a fatal error, gfortran will attempt to print a + backtrace to standard error before aborting. It can be disabled + with -fno-backtrace. Note: On POSIX targets with the addr2line + utility from GNU binutils, GNU Fortran can print a backtrace with + function name, file name, line number information in addition to + the addresses; otherwise only the addresses are printed. + * [27]Fortran 2003: + + Generic interface names which have the same name as derived + types are now supported, which allows to write constructor + functions. Note that Fortran does not support static + constructor functions; only default initialization or an + explicit structure-constructor initialization are available. + + [28]Polymorphic (class) arrays are now supported. + * [29]Fortran 2008: + + Support for the DO CONCURRENT construct has been added, which + allows the user to specify that individual loop iterations + have no interdependencies. + + [30]Coarrays: Full single-image support except for polymorphic + coarrays. Additionally, preliminary support for multiple + images via an MPI-based [31]coarray communication library has + been added. Note: The library version is not yet usable as + remote coarray access is not yet possible. + * [32]TS 29113: + + New flag [33]-std=f2008ts permits programs that are expected + to conform to the Fortran 2008 standard and the draft + Technical Specification (TS) 29113 on Further Interoperability + of Fortran with C. + + The OPTIONAL attribute is now allowed for dummy arguments of + BIND(C) procedures. + + The RANK intrinsic has been added. + + The implementation of the ASYNCHRONOUS attribute in GCC is + compatible with the candidate draft of TS 29113 (since GCC + 4.6). + + [34]Go + + * GCC 4.7 implements the [35]Go 1 language standard. The library + support in 4.7.0 is not quite complete, due to release timing. + Release 4.7.1 includes complete support for Go 1. The Go library is + from the Go 1.0.1 release. + * Go has been tested on GNU/Linux and Solaris platforms. It may work + on other platforms as well. + +[36]New Targets and Target Specific Improvements + + [37]ARM + + * GCC now supports the Cortex-A7 processor implementing the v7-a + version of the architecture using the option -mcpu=cortex-a7. + * The default vector size in auto-vectorization for NEON is now 128 + bits. If vectorization fails thusly, the vectorizer tries again + with 64-bit vectors. + * A new option -mvectorize-with-neon-double was added to allow users + to change the vector size to 64 bits. + + [38]AVR + + * The AVR port's libgcc has been improved and its multilib structure + has been enhanced. As a result, all objects contributing to an + application must either be compiled with GCC versions up to 4.6.x + or with GCC versions 4.7.1 or later. If the compiler is used with + AVR-LibC, you need a version that supports the new layout, i.e. + implements [39]#35407. + * The -mshort-calls command-line option has been deprecated. It will + be removed in the GCC 4.8 release. See -mrelax for a replacement. + * The compiled code only references startup code that clears .bss and + the common section resp. initializes the .data and .rodata section + provided respective sections (or subsections thereof) are not + empty, see [40]PR18145. Applications that put all static storage + objects into non-standard sections and / or define all static + storage objects in assembler modules, must reference __do_clear_bss + resp. __do_copy_data by hand or undefine the symbol(s) by means of + -Wl,-u,__do_clear_bss resp. -Wl,-u,__do_copy_data. + * GCC now supports the XMEGA architecture. This requires GNU Binutils + 2.22 or later. + * Support for the [41]named address spaces __flash, __flash1, …, + __flash5 and __memx has been added. These address spaces locate + read-only data in flash memory and allow reading from flash memory + by means of ordinary C code, i.e. without the need of (inline) + assembler code: + +const __flash int values[] = { 42, 31 }; + +int add_values (const __flash int *p, int i) +{ + return values[i] + *p; +} + + * Support has been added for the AVR-specific configure option + --with-avrlibc=yes in order to arrange for better integration of + [42]AVR-Libc. This configure option is supported in avr-gcc v4.7.2 + and newer and will only take effect in non-RTEMS configurations. If + avr-gcc is configured for RTEMS, the option will be ignored which + is the same as specifying --with-avrlibc=no. See [43]PR54461 for + more technical details. + * Support for AVR-specific [44]built-in functions has been added. + * Support has been added for the signed and unsigned 24-bit scalar + integer types __int24 and __uint24. + * New command-line options -maccumulate-args, -mbranch-cost=cost and + -mstrict-X were added to allow better fine-tuning of code + optimization. + * The command-line option -fdata-sections now also takes affect on + the section names of variables with the progmem attribute. + * A new inline assembler print modifier %i to print a RAM address as + I/O address has been added: + +#include /* Port Definitions from AVR-LibC */ + +void set_portb (uint8_t value) +{ + asm volatile ("out %i0, %1" :: "n" (&PORTB), "r" (value) : "memory"); +} + + The offset between an I/O address and the RAM address for that I/O + location is device-specific. This offset is taken into account when + printing a RAM address with the %i modifier so that the address is + suitable to be used as operand in an I/O command. The address must + be a constant integer known at compile time. + * The inline assembler constraint "R" to represent integers in the + range −6 … 5 has been removed without replacement. + * Many optimizations to: + + 64-bit integer arithmetic + + Widening multiplication + + Integer division by a constant + + Avoid constant reloading in multi-byte instructions. + + Micro-optimizations for special instruction sequences. + + Generic built-in functions like __builtin_ffs*, + __builtin_clz*, etc. + + If-else decision trees generated by switch instructions + + Merging of data located in flash memory + + New libgcc variants for devices with 8-bit wide stack pointer + + … + * Better documentation: + + Handling of EIND and indirect jumps on devices with more than + 128 KiB of program memory. + + Handling of the RAMPD, RAMPX, RAMPY and RAMPZ special function + registers. + + Function attributes OS_main and OS_task. + + AVR-specific built-in macros. + + C6X + + * Support has been added for the Texas Instruments C6X family of + processors. + + CR16 + + * Support has been added for National Semiconductor's CR16 + architecture. + + Epiphany + + * Support has been added for Adapteva's Epiphany architecture. + + IA-32/x86-64 + + * Support for Intel AVX2 intrinsics, built-in functions and code + generation is available via -mavx2. + * Support for Intel BMI2 intrinsics, built-in functions and code + generation is available via -mbmi2. + * Implementation and automatic generation of __builtin_clz* using the + lzcnt instruction is available via -mlzcnt. + * Support for Intel FMA3 intrinsics and code generation is available + via -mfma. + * A new -mfsgsbase command-line option is available that makes GCC + generate new segment register read/write instructions through + dedicated built-ins. + * Support for the new Intel rdrnd instruction is available via + -mrdrnd. + * Two additional AVX vector conversion instructions are available via + -mf16c. + * Support for new Intel processor codename IvyBridge with RDRND, + FSGSBASE and F16C is available through -march=core-avx-i. + * Support for the new Intel processor codename Haswell with AVX2, + FMA, BMI, BMI2, LZCNT is available through -march=core-avx2. + * Support for new AMD family 15h processors (Piledriver core) is now + available through -march=bdver2 and -mtune=bdver2 options. + * Support for [45]the x32 psABI is now available through the -mx32 + option. + * Windows mingw targets are using the -mms-bitfields option by + default. + * Windows x86 targets are using the __thiscall calling convention for + C++ class-member functions. + * Support for the configure option --with-threads=posix for Windows + mingw targets. + + [46]MIPS + + * GCC now supports thread-local storage (TLS) for MIPS16. This + requires GNU binutils 2.22 or later. + * GCC can now generate code specifically for the Cavium Octeon+ and + Octeon2 processors. The associated command-line options are + -march=octeon+ and -march=octeon2 respectively. Both options + require GNU binutils 2.22 or later. + * GCC can now work around certain 24k errata, under the control of + the command-line option -mfix-24k. These workarounds require GNU + binutils 2.20 or later. + * 32-bit MIPS GNU/Linux targets such as mips-linux-gnu can now build + n32 and n64 multilibs. The result is effectively a 64-bit GNU/Linux + toolchain that generates 32-bit code by default. Use the + configure-time option --enable-targets=all to select these extra + multilibs. + * Passing -fno-delayed-branch now also stops the assembler from + automatically filling delay slots. + + PowerPC/PowerPC64 + + * Vectors of type vector long long or vector long are passed and + returned using the same method as other vectors with the VSX + instruction set. Previously GCC did not adhere to the ABI for + 128-bit vectors with 64-bit integer base types (PR 48857). This + will also be fixed in the GCC 4.6.1 and 4.5.4 releases. + * A new option -mno-pointers-to-nested-functions was added to allow + AIX 32-bit/64-bit and GNU/Linux 64-bit PowerPC users to specify + that the compiler should not load up the chain register (r11) + before calling a function through a pointer. If you use this + option, you cannot call nested functions through a pointer, or call + other languages that might use the static chain. + * A new option msave-toc-indirect was added to allow AIX + 32-bit/64-bit and GNU/Linux 64-bit PowerPC users control whether we + save the TOC in the prologue for indirect calls or generate the + save inline. This can speed up some programs that call through a + function pointer a lot, but it can slow down other functions that + only call through a function pointer in exceptional cases. + * The PowerPC port will now enable machine-specific built-in + functions when the user switches the target machine using the + #pragma GCC target or __attribute__ ((__target__ ("target"))) code + sequences. In addition, the target macros are updated. However, due + to the way the -save-temps switch is implemented, you won't see the + effect of these additional macros being defined in preprocessor + output. + + SH + + * A new option -msoft-atomic has been added. When it is specified, + GCC will generate GNU/Linux-compatible gUSA atomic sequences for + the new __atomic routines. + * Since it is neither supported by GAS nor officially documented, + code generation for little endian SH2A has been disabled. + Specifying -ml with -m2a* will now result in a compiler error. + * The defunct -mbranch-cost option has been fixed. + * Some improvements to the generated code of: + + Utilization of the tst #imm,R0 instruction. + + Dynamic shift instructions on SH2A. + + Integer absolute value calculations. + * The -mdiv= option for targets other than SHmedia has been fixed and + documented. + + SPARC + + * The option -mflat has been reinstated. When it is specified, the + compiler will generate code for a single register window model. + This is essentially a new implementation and the corresponding + debugger support has been added to GDB 7.4. + * Support for the options -mtune=native and -mcpu=native has been + added on selected native platforms (GNU/Linux and Solaris). + * Support for the SPARC T3 (Niagara 3) processor has been added. + * VIS: + + An intrinsics header visintrin.h has been added. + + Builtin intrinsics for the VIS 1.0 edge handling and pixel + compare instructions have been added. + + The little-endian version of alignaddr is now supported. + + When possible, VIS builtins are marked const, which should + increase the compiler's ability to optimize VIS operations. + + The compiler now properly tracks the %gsr register and how it + behaves as an input for various VIS instructions. + + Akin to fzero, the compiler can now generate fone instructions + in order to set all of the bits of a floating-point register + to 1. + + The documentation for the VIS intrinsics in the GCC manual has + been brought up to date and many inaccuracies were fixed. + + Intrinsics for the VIS 2.0 bmask, bshuffle, and + non-condition-code setting edge instructions have been added. + Their availability is controlled by the new -mvis2 and + -mno-vis2 options. They are enabled by default on + UltraSPARC-III and later CPUs. + * Support for UltraSPARC Fused Multiply-Add floating-point extensions + has been added. These instructions are enabled by default on SPARC + T3 (Niagara 3) and later CPUs. + + TILE-Gx/TILEPro + + * Support has been added for the Tilera TILE-Gx and TILEPro families + of processors. + +Other significant improvements + + * A new option (-grecord-gcc-switches) was added that appends + compiler command-line options that might affect code generation to + the DW_AT_producer attribute string in the DWARF debugging + information. + * GCC now supports various new GNU extensions to the DWARF debugging + information format, like [47]entry value and [48]call site + information, [49]typed DWARF stack or [50]a more compact macro + representation. Support for these extensions has been added to GDB + 7.4. They can be disabled through the -gstrict-dwarf command-line + option. + +[51]GCC 4.7.1 + + This is the [52]list of problem reports (PRs) from GCC's bug tracking + system that are known to be fixed in the 4.7.1 release. This list might + not be complete (that is, it is possible that some PRs that have been + fixed are not listed here). + + The Go front end in the 4.7.1 release fully supports the [53]Go 1 + language standard. + +[54]GCC 4.7.2 + + This is the [55]list of problem reports (PRs) from GCC's bug tracking + system that are known to be fixed in the 4.7.2 release. This list might + not be complete (that is, it is possible that some PRs that have been + fixed are not listed here). + +[56]GCC 4.7.3 + + This is the [57]list of problem reports (PRs) from GCC's bug tracking + system that are known to be fixed in the 4.7.3 release. This list might + not be complete (that is, it is possible that some PRs that have been + fixed are not listed here). + +[58]GCC 4.7.4 + + This is the [59]list of problem reports (PRs) from GCC's bug tracking + system that are known to be fixed in the 4.7.4 release. This list might + not be complete (that is, it is possible that some PRs that have been + fixed are not listed here). + + + For questions related to the use of GCC, please consult these web + pages and the [60]GCC manuals. If that fails, the + [61]gcc-help@gcc.gnu.org mailing list might help. Comments on these + web pages and the development of GCC are welcome on our developer + list at [62]gcc@gcc.gnu.org. All of [63]our lists have public + archives. + + Copyright (C) [64]Free Software Foundation, Inc. Verbatim copying and + distribution of this entire article is permitted in any medium, + provided this notice is preserved. + + These pages are [65]maintained by the GCC team. Last modified + 2025-02-28. + +References + + 1. https://gcc.gnu.org/ml/gcc-patches/2011-03/msg01263.html + 2. https://gcc.gnu.org/gcc-4.7/porting_to.html + 3. https://gcc.gnu.org/wiki/TransactionalMemory + 4. https://gcc.gnu.org/wiki/Atomic/GCCMM + 5. https://gcc.gnu.org/gcc-4.7/changes.html#cxx + 6. https://gcc.gnu.org/gcc-4.7/cxx0x_status.html + 7. https://gcc.gnu.org/gcc-4.7/cxx0x_status.html + 8. https://gcc.gnu.org/gcc-4.7/cxx0x_status.html + 9. https://gcc.gnu.org/gcc-4.7/cxx0x_status.html + 10. https://gcc.gnu.org/gcc-4.7/cxx0x_status.html + 11. https://gcc.gnu.org/gcc-4.7/cxx0x_status.html + 12. https://gcc.gnu.org/PR14258 + 13. https://gcc.gnu.org/PR35688 + 14. https://gcc.gnu.org/onlinedocs/gcc-4.7.4/libstdc++/manual/manual/status.html#status.iso.2011 + 15. https://gcc.gnu.org/gcc-4.7/changes.html#fortran + 16. https://gcc.gnu.org/onlinedocs/gcc-4.7.1/gfortran/Code-Gen-Options.html#index-g_t_0040code_007bfstack-arrays_007d-254 + 17. https://gcc.gnu.org/onlinedocs/gcc-4.7.1/gcc/Optimize-Options.html#index-Ofast-689 + 18. https://gcc.gnu.org/onlinedocs/gcc-4.7.1/gfortran/Code-Gen-Options.html#index-g_t_0040code_007bfno-protect-parens_007d-270 + 19. https://gcc.gnu.org/onlinedocs/gcc-4.7.1/gfortran/Code-Gen-Options.html#index-g_t_0040code_007bfstack-arrays_007d-254 + 20. https://gcc.gnu.org/onlinedocs/gcc-4.7.1/gfortran/Code-Gen-Options.html#index-g_t_0040code_007bfrontend-optimize_007d-275 + 21. https://gcc.gnu.org/onlinedocs/gcc-4.7.1/gfortran/Error-and-Warning-Options.html#index-g_t_0040code_007bWfunction-elimination_007d-170 + 22. https://gcc.gnu.org/onlinedocs/gcc-4.7.1/gfortran/Code-Gen-Options.html#index-g_t_0040code_007bfaggressive-function-elimination_007d-270 + 23. https://gcc.gnu.org/onlinedocs/gcc-4.7.1/gfortran/Error-and-Warning-Options.html#index-g_t_0040code_007bWreal-q-constant_007d-149 + 24. https://gcc.gnu.org/onlinedocs/gcc-4.7.1/gfortran/SELECTED_005fREAL_005fKIND.html + 25. https://learn.microsoft.com/en-us/windows/win32/wer/collecting-user-mode-dumps + 26. https://gcc.gnu.org/onlinedocs/gcc-4.7.1/gfortran/Debugging-Options.html#index-g_t_0040code_007bfno-backtrace_007d-183 + 27. https://gcc.gnu.org/wiki/Fortran2003Status + 28. https://gcc.gnu.org/wiki/OOP + 29. https://gcc.gnu.org/wiki/Fortran2008Status + 30. https://gcc.gnu.org/wiki/Coarray + 31. https://gcc.gnu.org/wiki/CoarrayLib + 32. https://gcc.gnu.org/wiki/TS29113Status + 33. https://gcc.gnu.org/onlinedocs/gcc-4.7.1/gfortran/Fortran-Dialect-Options.html#index-g_t_0040code_007bstd_003d_007d_0040var_007bstd_007d-option-53 + 34. https://gcc.gnu.org/gcc-4.7/changes.html#go + 35. https://go.dev/doc/go1 + 36. https://gcc.gnu.org/gcc-4.7/changes.html#targets + 37. https://gcc.gnu.org/gcc-4.7/changes.html#arm + 38. https://gcc.gnu.org/gcc-4.7/changes.html#avr + 39. http://savannah.nongnu.org/bugs/?35407 + 40. https://gcc.gnu.org/PR18145 + 41. https://gcc.gnu.org/onlinedocs/gcc-4.7.1/gcc/Named-Address-Spaces.html + 42. http://www.nongnu.org/avr-libc/ + 43. https://gcc.gnu.org/PR54461 + 44. https://gcc.gnu.org/onlinedocs/gcc-4.7.1/gcc/AVR-Built_002din-Functions.html + 45. https://sites.google.com/site/x32abi/ + 46. https://gcc.gnu.org/gcc-4.7/changes.html#mips + 47. https://dwarfstd.org/issues/100909.1.html + 48. https://dwarfstd.org/issues/100909.2.html + 49. https://dwarfstd.org/issues/140425.1.html + 50. https://dwarfstd.org/issues/110722.1.html + 51. https://gcc.gnu.org/gcc-4.7/changes.html#GCC4.7.1 + 52. https://gcc.gnu.org/bugzilla/buglist.cgi?bug_status=RESOLVED&resolution=FIXED&target_milestone=4.7.1 + 53. https://go.dev/doc/go1 + 54. https://gcc.gnu.org/gcc-4.7/changes.html#GCC4.7.2 + 55. https://gcc.gnu.org/bugzilla/buglist.cgi?bug_status=RESOLVED&resolution=FIXED&target_milestone=4.7.2 + 56. https://gcc.gnu.org/gcc-4.7/changes.html#GCC4.7.3 + 57. https://gcc.gnu.org/bugzilla/buglist.cgi?bug_status=RESOLVED&resolution=FIXED&target_milestone=4.7.3 + 58. https://gcc.gnu.org/gcc-4.7/changes.html#GCC4.7.4 + 59. https://gcc.gnu.org/bugzilla/buglist.cgi?bug_status=RESOLVED&resolution=FIXED&target_milestone=4.7.4 + 60. https://gcc.gnu.org/onlinedocs/ + 61. mailto:gcc-help@gcc.gnu.org + 62. mailto:gcc@gcc.gnu.org + 63. https://gcc.gnu.org/lists.html + 64. https://www.fsf.org/ + 65. https://gcc.gnu.org/about.html +====================================================================== +http://gcc.gnu.org/gcc-4.6/index.html + GCC 4.6 Release Series + + (This release series is no longer supported.) + + April 12, 2013 + + The [1]GNU project and the GCC developers are pleased to announce the + release of GCC 4.6.4. + + This release is a bug-fix release, containing fixes for regressions in + GCC 4.6.3 relative to previous releases of GCC. + +Release History + + GCC 4.6.4 + April 12, 2013 ([2]changes, [3]documentation) + + GCC 4.6.3 + March 1, 2012 ([4]changes, [5]documentation) + + GCC 4.6.2 + October 26, 2011 ([6]changes, [7]documentation) + + GCC 4.6.1 + June 27, 2011 ([8]changes, [9]documentation) + + GCC 4.6.0 + March 25, 2011 ([10]changes, [11]documentation) + +References and Acknowledgements + + GCC used to stand for the GNU C Compiler, but since the compiler + supports several other languages aside from C, it now stands for the + GNU Compiler Collection. + + A list of [12]successful builds is updated as new information becomes + available. + + The GCC developers would like to thank the numerous people that have + contributed new features, improvements, bug fixes, and other changes as + well as test results to GCC. This [13]amazing group of volunteers is + what makes GCC successful. + + For additional information about GCC please refer to the [14]GCC + project web site or contact the [15]GCC development mailing list. + + To obtain GCC please use [16]our mirror sites or [17]our version + control system. + + + For questions related to the use of GCC, please consult these web + pages and the [18]GCC manuals. If that fails, the + [19]gcc-help@gcc.gnu.org mailing list might help. Comments on these + web pages and the development of GCC are welcome on our developer + list at [20]gcc@gcc.gnu.org. All of [21]our lists have public + archives. + + Copyright (C) [22]Free Software Foundation, Inc. Verbatim copying and + distribution of this entire article is permitted in any medium, + provided this notice is preserved. + + These pages are [23]maintained by the GCC team. Last modified + 2022-10-26. + +References + + 1. http://www.gnu.org/ + 2. https://gcc.gnu.org/gcc-4.6/changes.html + 3. https://gcc.gnu.org/onlinedocs/4.6.4/ + 4. https://gcc.gnu.org/gcc-4.6/changes.html + 5. https://gcc.gnu.org/onlinedocs/4.6.3/ + 6. https://gcc.gnu.org/gcc-4.6/changes.html + 7. https://gcc.gnu.org/onlinedocs/4.6.2/ + 8. https://gcc.gnu.org/gcc-4.6/changes.html + 9. https://gcc.gnu.org/onlinedocs/4.6.1/ + 10. https://gcc.gnu.org/gcc-4.6/changes.html + 11. https://gcc.gnu.org/onlinedocs/4.6.0/ + 12. https://gcc.gnu.org/gcc-4.6/buildstat.html + 13. https://gcc.gnu.org/onlinedocs/gcc/Contributors.html + 14. https://gcc.gnu.org/index.html + 15. mailto:gcc@gcc.gnu.org + 16. https://gcc.gnu.org/mirrors.html + 17. https://gcc.gnu.org/git.html + 18. https://gcc.gnu.org/onlinedocs/ + 19. mailto:gcc-help@gcc.gnu.org + 20. mailto:gcc@gcc.gnu.org + 21. https://gcc.gnu.org/lists.html + 22. https://www.fsf.org/ + 23. https://gcc.gnu.org/about.html +====================================================================== +http://gcc.gnu.org/gcc-4.6/changes.html + GCC 4.6 Release Series + Changes, New Features, and Fixes + +Caveats + + * The options -b and -V have been removed because + they were unreliable. Instead, users should directly run + -gcc when cross-compiling, or -gcc- to + run a different version of gcc. + * GCC now has stricter checks for invalid command-line options. In + particular, when gcc was called to link object files rather than + compile source code, it would previously accept and ignore all + options starting with --, including linker options such as + --as-needed and --export-dynamic, although such options would + result in errors if any source code was compiled. Such options, if + unknown to the compiler, are now rejected in all cases; if the + intent was to pass them to the linker, options such as + -Wl,--as-needed should be used. + * Versions of the GNU C library up to and including 2.11.1 included + an [1]incorrect implementation of the cproj function. GCC optimizes + its builtin cproj according to the behavior specified and allowed + by the ISO C99 standard. If you want to avoid discrepancies between + the C library and GCC's builtin transformations when using cproj in + your code, use GLIBC 2.12 or later. If you are using an older GLIBC + and actually rely on the incorrect behavior of cproj, then you can + disable GCC's transformations using -fno-builtin-cproj. + * The C-only intermodule optimization framework (IMA, enabled by + -combine) has been removed in favor of the new generic link-time + optimization framework (LTO) introduced in [2]GCC 4.5.0. + * GCC now ships with the LGPL-licensed libquadmath library, which + provides quad-precision mathematical functions for targets with a + __float128 datatype. __float128 is available for targets on 32-bit + x86, x86-64 and Itanium architectures. The libquadmath library is + automatically built on such targets when building the Fortran + compiler. + * New -Wunused-but-set-variable and -Wunused-but-set-parameter + warnings were added for C, C++, Objective-C and Objective-C++. + These warnings diagnose variables respective parameters which are + only set in the code and never otherwise used. Usually such + variables are useless and often even the value assigned to them is + computed needlessly, sometimes expensively. The + -Wunused-but-set-variable warning is enabled by default by -Wall + flag and -Wunused-but-set-parameter by -Wall -Wextra flags. + * On ARM, a bug has been fixed in GCC's implementation of the AAPCS + rules for the layout of vectors that could lead to wrong code being + generated. Vectors larger than 8 bytes in size are now by default + aligned to an 8-byte boundary. This is an ABI change: code that + makes explicit use of vector types may be incompatible with binary + objects built with older versions of GCC. Auto-vectorized code is + not affected by this change. (This change affects GCC versions + 4.6.4 and later, with the exception of versions 4.7.0 and 4.7.1.) + * On AVR, variables with the progmem attribute to locate data in + flash memory must be qualified as const. + * Support for a number of older systems and recently unmaintained or + untested target ports of GCC has been declared obsolete in GCC 4.6. + Unless there is activity to revive them, the next release of GCC + will have their sources permanently removed. + All GCC ports for the following processor architectures have been + declared obsolete: + + Argonaut ARC (arc-*) + + National Semiconductor CRX (crx-*) + + Motorola 68HC11 and 68HC12 (m68hc11-*-*, m6811-*-*, + m68hc12-*-*, m6812-*-*) + + Sunplus S+core (score-*) + The following ports for individual systems on particular + architectures have been obsoleted: + + Interix (i[34567]86-*-interix3*) + + NetWare x86 (i[3456x]86-*-netware*) + + Generic ARM PE (arm-*-pe* other than arm*-wince-pe*) + + MCore PE (mcore-*-pe*) + + SH SymbianOS (sh*-*-symbianelf*) + + GNU Hurd on Alpha and PowerPC (alpha*-*-gnu*, powerpc*-*-gnu*) + + M68K uClinux old ABI (m68k-*-uclinuxoldabi*) + + a.out NetBSD (arm*-*-netbsd*, i[34567]86-*-netbsd*, + vax-*-netbsd*, but not *-*-netbsdelf*) + The i[34567]86-*-pe alias for Cygwin targets has also been + obsoleted; users should configure for i[34567]86-*-cygwin* instead. + Certain configure options to control the set of libraries built + with GCC on some targets have been obsoleted. On ARM targets, the + options --disable-fpu, --disable-26bit, --disable-underscore, + --disable-interwork, --disable-biendian and --disable-nofmult have + been obsoleted. On MIPS targets, the options + --disable-single-float, --disable-biendian and --disable-softfloat + have been obsoleted. + * Support has been removed for all the [3]configurations obsoleted in + GCC 4.5. + * More information on porting to GCC 4.6 from previous versions of + GCC can be found in the [4]porting guide for this release. + +General Optimizer Improvements + + * A new general optimization level, -Ofast, has been introduced. It + combines the existing optimization level -O3 with options that can + affect standards compliance but result in better optimized code. + For example, -Ofast enables -ffast-math. + * Link-time optimization improvements: + + The [5]Scalable Whole Program Optimizer (WHOPR) project has + stabilized to the point of being usable. It has become the + default mode when using the LTO optimization model. Link time + optimization can now split itself into multiple parallel + compilations. Parallelism is controlled with -flto=n (where n + specifies the number of compilations to execute in parallel). + GCC can also cooperate with a GNU make job server by + specifying the -flto=jobserver option and adding + to the + beginning of the Makefile rule executing the linker. + Classical LTO mode can be enforced by -flto-partition=none. + This may result in small code quality improvements. + + A large number of bugs were fixed. GCC itself, Mozilla Firefox + and other large applications can be built with LTO enabled. + + The linker plugin support improvements + o Linker plugin is now enabled by default when the linker + is detected to have plugin support. This is the case for + GNU ld 2.21.51 or newer (on ELF and Cygwin targets) and + the Gold linker on ELF targets. Plugin support of the + Apple linker on Darwin is not compatible with GCC. The + linker plugin can also be controlled by the + -fuse-linker-plugin command-line option. + o Resolution information from the linker plugin is used to + drive whole program assumptions. Use of the linker plugin + results in more aggressive optimization on binaries and + on shared libraries that use the hidden visibility + attribute. Consequently the use of -fwhole-program is not + necessary in addition to LTO. + + Hidden symbols used from non-LTO objects now have to be + explicitly annotated with externally_visible when the linker + plugin is not used. + + C++ inline functions and virtual tables are now privatized + more aggressively, leading to better inter-procedural + optimization and faster dynamic linking. + + Memory usage and intermediate language streaming performance + have been improved. + + Static constructors and destructors from individual units are + inlined into a single function. This can significantly improve + startup times of large C++ applications where static + constructors are very common. For example, static constructors + are used when including the iostream header. + + Support for the Ada language has been added. + * Interprocedural optimization improvements + + The interprocedural framework was re-tuned for link time + optimization. Several scalability issues were resolved. + + Improved auto-detection of const and pure functions. Newly, + noreturn functions are auto-detected. + The [6]-Wsuggest-attribute=[const|pure|noreturn] flag is + available that informs users when adding attributes to headers + might improve code generation. + + A number of inlining heuristic improvements. In particular: + o Partial inlining is now supported and enabled by default + at -O2 and greater. The feature can be controlled via + -fpartial-inlining. + Partial inlining splits functions with short hot path to + return. This allows more aggressive inlining of the hot + path leading to better performance and often to code size + reductions (because cold parts of functions are not + duplicated). + o Scalability for large compilation units was improved + significantly. + o Inlining of callbacks is now more aggressive. + o Virtual methods are considered for inlining when the + caller is inlined and devirtualization is then possible. + o Inlining when optimizing for size (either in cold regions + of a program or when compiling with -Os) was improved to + better handle C++ programs with larger abstraction + penalty, leading to smaller and faster code. + + The IPA reference optimization pass detecting global variables + used or modified by functions was strengthened and sped up. + + Functions whose address was taken are now optimized out when + all references to them are dead. + + A new inter-procedural static profile estimation pass detects + functions that are executed once or unlikely to be executed. + Unlikely executed functions are optimized for size. Functions + executed once are optimized for size except for the inner + loops. + + On most targets with named section support, functions used + only at startup (static constructors and main), functions used + only at exit and functions detected to be cold are placed into + separate text segment subsections. This extends the + -freorder-functions feature and is controlled by the same + switch. The goal is to improve the startup time of large C++ + programs. + Proper function placement requires linker support. GNU ld + 2.21.51 on ELF targets was updated to place those functions + together within the text section leading to better code + locality and faster startup times of large C++ programs. The + feature is also supported in the Apple linker. Support in the + gold linker is planned. + * A new switch -fstack-usage has been added. It makes the compiler + output stack usage information for the program, on a per-function + basis, in an auxiliary file. + * A new switch -fcombine-stack-adjustments has been added. It can be + used to enable or disable the compiler's stack-slot combining pass + which before was enabled automatically at -O1 and above, but could + not be controlled on its own. + * A new switch -fstrict-volatile-bitfields has been added. Using it + indicates that accesses to volatile bitfields should use a single + access of the width of the field's type. This option can be useful + for precisely defining and accessing memory-mapped peripheral + registers from C or C++. + +Compile time and memory usage improvements + + * Datastructures used by the dataflow framework in GCC were + reorganized for better memory usage and more cache locality. + Compile time is improved especially on units with large functions + (possibly resulting from a lot of inlining) not fitting into the + processor cache. The compile time of the GCC C compiler binary with + link-time optimization went down by over 10% (benchmarked on x86-64 + target). + +New Languages and Language specific improvements + + Ada + + * Stack checking has been improved on selected architectures (Alpha, + IA-32/x86-64, RS/6000 and SPARC): it now will detect stack + overflows in all cases on these architectures. + * Initial support for Ada 2012 has been added. + + C family + + * A new warning, enabled by -Wdouble-promotion, has been added that + warns about cases where a value of type float is implicitly + promoted to double. This is especially helpful for CPUs that handle + the former in hardware, but emulate the latter in software. + * A new function attribute leaf was introduced. This attribute allows + better inter-procedural optimization across calls to functions that + return to the current unit only via returning or exception + handling. This is the case for most library functions that have no + callbacks. + * Support for a new data type __int128 for targets having wide enough + machine-mode support. + * The new function attribute callee_pop_aggregate allows to specify + if the caller or callee is responsible for popping the aggregate + return pointer value from the stack. + * Support for selectively enabling and disabling warnings via #pragma + GCC diagnostic has been added. For instance: +#pragma GCC diagnostic error "-Wuninitialized" + foo(a); /* error is given for this one */ +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wuninitialized" + foo(b); /* no diagnostic for this one */ +#pragma GCC diagnostic pop + foo(c); /* error is given for this one */ +#pragma GCC diagnostic pop + foo(d); /* depends on command-line options */ + + * The -fmax-errors=N option is now supported. Using this option + causes the compiler to exit after N errors have been issued. + + [7]C + + * There is now experimental support for some features from the + upcoming C1X revision of the ISO C standard. This support may be + selected with -std=c1x, or -std=gnu1x for C1X with GNU extensions. + Note that this support is experimental and may change incompatibly + in future releases for consistency with changes to the C1X standard + draft. The following features are newly supported as described in + the N1539 draft of C1X (with changes agreed at the March 2011 WG14 + meeting); some other features were already supported with no + compiler changes being needed, or have some support but not in full + accord with N1539 (as amended). + + Static assertions (_Static_assert keyword) + + Typedef redefinition + + New macros in + + Anonymous structures and unions + * The new -fplan9-extensions option directs the compiler to support + some extensions for anonymous struct fields which are implemented + by the Plan 9 compiler. A pointer to a struct may be automatically + converted to a pointer to an anonymous field when calling a + function, in order to make the types match. An anonymous struct + field whose type is a typedef name may be referred to using the + typedef name. + + [8]C++ + + * Improved [9]experimental support for the upcoming C++0x ISO C++ + standard, including support for constexpr (thanks to Gabriel Dos + Reis and Jason Merrill), nullptr (thanks to Magnus Fromreide), + noexcept, unrestricted unions, range-based for loops (thanks to + Rodrigo Rivas Costa), opaque enum declarations (thanks also to + Rodrigo), implicitly deleted functions and implicit move + constructors. + * When an extern declaration within a function does not match a + declaration in the enclosing context, G++ now properly declares the + name within the namespace of the function rather than the namespace + which was open just before the function definition ([10]c++/43145). + * GCC now warns by default when casting integers to larger pointer + types. These warnings can be disabled with the option + -Wno-int-to-pointer-cast, which is now also available in C++. + * G++ no longer optimizes using the assumption that a value of + enumeration type will fall within the range specified by the + standard, since that assumption is easily violated with a + conversion from integer type ([11]c++/43680). The old behavior can + be restored with -fstrict-enums. + * The new -fnothrow-opt flag changes the semantics of a throw() + exception specification to match the proposed semantics of the + noexcept specification: just call terminate if an exception tries + to propagate out of a function with such an exception + specification. This dramatically reduces or eliminates the code + size overhead from adding the exception specification. + * The new -Wnoexcept flag will suggest adding a noexcept qualifier to + a function that the compiler can tell doesn't throw if it would + change the value of a noexcept expression. + * The -Wshadow option now warns if a local variable or type + declaration shadows another type in C++. Note that the compiler + will not warn if a local variable shadows a struct/class/enum, but + will warn if it shadows an explicit typedef. + * When an identifier is not found in the current scope, G++ now + offers suggestions about which identifier might have been intended. + * G++ now issues clearer diagnostics for missing semicolons after + class, struct, and union definitions. + * G++ now issues clearer diagnostics for missing semicolons after + class member declarations. + * G++ now issues clearer diagnostics when a colon is used in a place + where a double-colon was intended. + * G++ no longer accepts mutable on reference members ([12]c++/33558). + Use -fpermissive to allow the old, non-conforming behaviour. + * A few mangling fixes have been made, to attribute const/volatile on + function pointer types, decltype of a plain decl, and use of a + function parameter in the declaration of another parameter. By + default the compiler still uses the old mangling, but emits aliases + with the new mangling on targets that support strong aliases. Users + can switch over entirely to the new mangling with -fabi-version=5 + or -fabi-version=0. -Wabi will now warn about code that uses the + old mangling. + * In 4.6.0 and 4.6.1 G++ no longer allows objects of const-qualified + type to be default initialized unless the type has a user-declared + default constructor. In 4.6.2 G++ implements the proposed + resolution of [13]DR 253, so default initialization is allowed if + it initializes all subobjects. Code that fails to compile can be + fixed by providing an initializer e.g. + struct A { A(); }; + struct B : A { int i; }; + const B b = B(); + Use -fpermissive to allow the old, non-conforming behaviour. + + Runtime Library (libstdc++) + + * [14]Improved experimental support for the upcoming ISO C++ + standard, C++0x, including using constexpr and nullptr. + * Performance improvements to the [15]Debug Mode, thanks to François + Dumont. + * Atomic operations used for reference-counting are annotated so that + they can be understood by race detectors such as Helgrind, see + [16]Data Race Hunting. + * Most libstdc++ standard headers have been changed to no longer + include the cstddef header as an implementation detail. Code that + relied on that header being included as side-effect of including + other standard headers will need to include cstddef explicitly. + + [17]Fortran + + * On systems supporting the libquadmath library, GNU Fortran now also + supports a quad-precision, kind=16 floating-point data type + (REAL(16), COMPLEX(16)). As the data type is not fully supported in + hardware, calculations might be one to two orders of magnitude + slower than with the 4, 8 or 10 bytes floating-point data types. + This change does not affect systems which support REAL(16) in + hardware nor those which do not support libquadmath. + * Much improved compile time for large array constructors. + * In order to reduce execution time and memory consumption, use of + temporary arrays in assignment expressions is avoided for many + cases. The compiler now reverses loops in order to avoid generating + a temporary array where possible. + * Improved diagnostics, especially with -fwhole-file. + * The -fwhole-file flag is now enabled by default. This improves code + generation and diagnostics. It can be disabled using the deprecated + -fno-whole-file flag. + * Support the generation of Makefile dependencies via the [18]-M... + flags of GCC; you may need to specify the -cpp option in addition. + The dependencies take modules, Fortran's include, and CPP's + #include into account. Note: Using -M for the module path is no + longer supported, use -J instead. + * The flag -Wconversion has been modified to only issue warnings + where a conversion leads to information loss. This drastically + reduces the number of warnings; -Wconversion is thus now enabled + with -Wall. The flag -Wconversion-extra has been added and also + warns about other conversions; -Wconversion-extra typically issues + a huge number of warnings, most of which can be ignored. + * A new command-line option -Wunused-dummy-argument warns about + unused dummy arguments and is included in -Wall. Before, + -Wunused-variable also warned about unused dummy arguments. + * Fortran 2003 support has been extended: + + Improved support for polymorphism between libraries and + programs and for complicated inheritance patterns (cf. + [19]object-oriented programming). + + Experimental support of the ASSOCIATE construct. + + In pointer assignments it is now possible to specify the lower + bounds of the pointer and, for a rank-1 or a simply contiguous + data-target, to remap the bounds. + + Automatic (re)allocation: In intrinsic assignments to + allocatable variables the left-hand side will be automatically + allocated (if unallocated) or reallocated (if the shape or + type parameter is different). To avoid the small performance + penalty, you can use a(:) = ... instead of a = ... for arrays + and character strings – or disable the feature using -std=f95 + or -fno-realloc-lhs. + + Deferred type parameter: For scalar allocatable and pointer + variables the character length can be deferred. + + Namelist variables with allocatable and pointer attribute and + nonconstant length type parameter are supported. + * Fortran 2008 support has been extended: + + Experimental [20]coarray support (for one image only, i.e. + num_images() == 1); use the [21]-fcoarray=single flag to + enable it. + + The STOP and the new ERROR STOP statements now support all + constant expressions. + + Support for the CONTIGUOUS attribute. + + Support for ALLOCATE with MOLD. + + Support for the STORAGE_SIZE intrinsic inquiry function. + + Support of the NORM2 and PARITY intrinsic functions. + + The following bit intrinsics were added: POPCNT and POPPAR for + counting the number of 1 bits and returning the parity; BGE, + BGT, BLE, and BLT for bitwise comparisons; DSHIFTL and DSHIFTR + for combined left and right shifts, MASKL and MASKR for simple + left and right justified masks, MERGE_BITS for a bitwise merge + using a mask, SHIFTA, SHIFTL and SHIFTR for shift operations, + and the transformational bit intrinsics IALL, IANY and + IPARITY. + + Support of the EXECUTE_COMMAND_LINE intrinsic subroutine. + + Support for the IMPURE attribute for procedures, which allows + for ELEMENTAL procedures without the restrictions of PURE. + + Null pointers (including NULL()) and not allocated variables + can be used as actual argument to optional non-pointer, + non-allocatable dummy arguments, denoting an absent argument. + + Non-pointer variables with TARGET attribute can be used as + actual argument to POINTER dummies with INTENT(IN) + + Pointers including procedure pointers and those in a derived + type (pointer components) can now be initialized by a target + instead of only by NULL. + + The EXIT statement (with construct-name) can now be used to + leave not only the DO but also the ASSOCIATE, BLOCK, IF, + SELECT CASE and SELECT TYPE constructs. + + Internal procedures can now be used as actual argument. + + The named constants INTEGER_KINDS, LOGICAL_KINDS, REAL_KINDS + and CHARACTER_KINDS of the intrinsic module ISO_FORTRAN_ENV + have been added; these arrays contain the supported kind + values for the respective types. + + The module procedures C_SIZEOF of the intrinsic module + ISO_C_BINDINGS and COMPILER_VERSION and COMPILER_OPTIONS of + ISO_FORTRAN_ENV have been implemented. + + Minor changes: obsolescence diagnostics for ENTRY was added + for -std=f2008; a line may start with a semicolon; for + internal and module procedures END can be used instead of END + SUBROUTINE and END FUNCTION; SELECTED_REAL_KIND now also takes + a RADIX argument; intrinsic types are supported for + TYPE(intrinsic-type-spec); multiple type-bound procedures can + be declared in a single PROCEDURE statement; implied-shape + arrays are supported for named constants (PARAMETER). The + transformational, three argument versions of BESSEL_JN and + BESSEL_YN were added – the elemental, two-argument version had + been added in GCC 4.4; note that the transformational + functions use a recurrence algorithm. + + [22]Go + + Support for the Go programming language has been added to GCC. It is + not enabled by default when you build GCC; use the --enable-languages + configure option to build it. The driver program for compiling Go code + is gccgo. + + Go is currently known to work on GNU/Linux and RTEMS. Solaris support + is in progress. It may or may not work on other platforms. + + [23]Objective-C and Objective-C++ + + * The -fobjc-exceptions flag is now required to enable Objective-C + exception and synchronization syntax (introduced by the keywords + @try, @catch, @finally and @synchronized). + * A number of Objective-C 2.0 features and extensions are now + supported by GCC. These features are enabled by default; you can + disable them by using the new -fobjc-std=objc1 command-line option. + * The Objective-C 2.0 dot-syntax is now supported. It is an + alternative syntax for using getters and setters; object.count is + automatically converted into [object count] or [object setCount: + ...] depending on context; for example if (object.count > 0) is + automatically compiled into the equivalent of if ([object count] > + 0) while object.count = 0; is automatically compiled into the + equivalent ot [object setCount: 0];. The dot-syntax can be used + with instance and class objects and with any setters or getters, no + matter if they are part of a declared property or not. + * Objective-C 2.0 declared properties are now supported. They are + declared using the new @property keyword, and are most commonly + used in conjunction with the new Objective-C 2.0 dot-syntax. The + nonatomic, readonly, readwrite, assign, retain, copy, setter and + getter attributes are all supported. Marking declared properties + with __attribute__ ((deprecated)) is supported too. + * The Objective-C 2.0 @synthesize and @dynamic keywords are + supported. @synthesize causes the compiler to automatically + synthesize a declared property, while @dynamic is used to disable + all warnings for a declared property for which no implementation is + provided at compile time. Synthesizing declared properties requires + runtime support in most useful cases; to be able to use it with the + GNU runtime, appropriate helper functions have been added to the + GNU Objective-C runtime ABI, and are implemented by the GNU + Objective-C runtime library shipped with GCC. + * The Objective-C 2.0 fast enumeration syntax is supported in + Objective-C. This is currently not yet available in Objective-C++. + Fast enumeration requires support in the runtime, and such support + has been added to the GNU Objective-C runtime library (shipped with + GCC). + * The Objective-C 2.0 @optional keyword is supported. It allows you + to mark methods or properties in a protocol as optional as opposed + to required. + * The Objective-C 2.0 @package keyword is supported. It has currently + the same effect as the @public keyword. + * Objective-C 2.0 method attributes are supported. Currently the + supported attributes are deprecated, sentinel, noreturn and format. + * Objective-C 2.0 method argument attributes are supported. The most + widely used attribute is unused, to mark an argument as unused in + the implementation. + * Objective-C 2.0 class and protocol attributes are supported. + Currently the only supported attribute is deprecated. + * Objective-C 2.0 class extensions are supported. A class extension + has the same syntax as a category declaration with no category + name, and the methods and properties declared in it are added + directly to the main class. It is mostly used as an alternative to + a category to add methods to a class without advertising them in + the public headers, with the advantage that for class extensions + the compiler checks that all the privately declared methods are + actually implemented. + * As a result of these enhancements, GCC can now be used to build + Objective-C and Objective-C++ software that uses Foundation and + other important system frameworks with the NeXT runtime on Darwin 9 + and Darwin 10 (OSX 10.5 and 10.6). + * Many bugs in the compiler have been fixed in this release; in + particular, LTO can now be used when compiling Objective-C and + Objective-C++ and the parser is much more robust in dealing with + invalid code. + + Runtime Library (libobjc) + + * The GNU Objective-C runtime library now defines the macro + __GNU_LIBOBJC__ (with a value that is increased at every release + where there is any change to the API) in objc/objc.h, making it + easy to determine if the GNU Objective-C runtime library is being + used, and if so, which version. Previous versions of the GNU + Objective-C runtime library (and other Objective-C runtime + libraries such as the Apple one) do not define this macro. + * A new Objective-C 2.0 API, almost identical to the one implemented + by the Apple Objective-C runtime, has been implemented in the GNU + Objective-C runtime library. The new API hides the internals of + most runtime structures but provides a more extensive set of + functions to operate on them. It is much easier, for example, to + create or modify classes at runtime. The new API also makes it + easier to port software from Apple to GNU as almost no changes + should be required. The old API is still supported for backwards + compatibility; including the old objc/objc-api.h header file + automatically selects the old API, while including the new + objc/runtime.h header file automatically selects the new API. + Support for the old API is being phased out and upgrading the + software to use the new API is strongly recommended. To check for + the availability of the new API, the __GNU_LIBOBJC__ macro can be + used as older versions of the GNU Objective-C runtime library, + which do not support the new API, do not define such a macro. + * Runtime support for @synchronized has been added. + * Runtime support for Objective-C 2.0 synthesized property accessors + has been added. + * Runtime support for Objective-C 2.0 fast enumeration has been + added. + +[24]New Targets and Target Specific Improvements + + [25]ARM + + * GCC now supports the Cortex-M4 processor implementing the v7-em + version of the architecture using the option -mcpu=cortex-m4. + * Scheduling descriptions for the Cortex-M4, the Neon and the + floating point units of the Cortex-A9 and a pipeline description + for the Cortex-A5 have been added. + * Synchronization primitives such as __sync_fetch_and_add and friends + are now inlined for supported architectures rather than calling + into a kernel helper function. + * SSA loop prefetching is enabled by default for the Cortex-A9 at + -O3. + * Several improvements were committed to improve code generation for + the ARM architecture including a rewritten implementation for load + and store multiples. + * Several enhancements were committed to improve SIMD code generation + for NEON by adding support for widening instructions, misaligned + loads and stores, vector conditionals and support for 64-bit + arithmetic. + * Support was added for the Faraday cores fa526, fa606te, fa626te, + fmp626te, fmp626 and fa726te and can be used with the respective + names as parameters to the -mcpu= option. + * Basic support was added for Cortex-A15 and is available through + -mcpu=cortex-a15. + * GCC for AAPCS configurations now more closely adheres to the AAPCS + specification by enabling -fstrict-volatile-bitfields by default. + + IA-32/x86-64 + + * The new -fsplit-stack option permits programs to use a + discontiguous stack. This is useful for threaded programs, in that + it is no longer necessary to specify the maximum stack size when + creating a thread. This feature is currently only implemented for + 32-bit and 64-bit x86 GNU/Linux targets. + * Support for emitting profiler counter calls before function + prologues. This is enabled via a new command-line option -mfentry. + * Optimization for the Intel Core 2 processors is now available + through the -march=core2 and -mtune=core2 options. + * Support for Intel Core i3/i5/i7 processors is now available through + the -march=corei7 and -mtune=corei7 options. + * Support for Intel Core i3/i5/i7 processors with AVX is now + available through the -march=corei7-avx and -mtune=corei7-avx + options. + * Support for AMD Bobcat (family 14) processors is now available + through the -march=btver1 and -mtune=btver1 options. + * Support for AMD Bulldozer (family 15) processors is now available + through the -march=bdver1 and -mtune=bdver1 options. + * The default setting (when not optimizing for size) for 32-bit + GNU/Linux and Darwin x86 targets has been changed to + -fomit-frame-pointer. The default can be reverted to + -fno-omit-frame-pointer by configuring GCC with the + --enable-frame-pointer configure option. + * Darwin, FreeBSD, Solaris 2, MinGW and Cygwin now all support + __float128 on 32-bit and 64-bit x86 targets. + * AVX floating-point arithmetic can now be enabled by default at + configure time with the new --with-fpmath=avx option. + * The SSA loop prefetching pass is enabled when using -O3 when + optimizing for CPUs where prefetching is beneficial (AMD CPUs newer + than K6). + * Support for TBM (Trailing Bit Manipulation) built-in functions and + code generation is available via -mtbm. + * Support for AMD's BMI (Bit Manipulation) built-in functions and + code generation is available via -mbmi. + + [26]MicroBlaze + + * Support has been added for the Xilinx MicroBlaze softcore processor + (microblaze-elf) embedded target. This configurable processor is + supported on several Xilinx Spartan and Virtex FPGAs. + + MIPS + + * GCC now supports the Loongson 3A processor. Its canonical -march= + and -mtune= name is loongson3a. + + [27]MN10300 / AM33 + + * The inline assembly register constraint "A" has been renamed "c". + This constraint is used to select a floating-point register that + can be used as the destination of a multiply-accumulate + instruction. + * New inline assembly register constraints "A" and "D" have been + added. These constraint letters resolve to all general registers + when compiling for AM33, and resolve to address registers only or + data registers only when compiling for MN10300. + * The MDR register is represented in the compiler. One can access the + register via the "z" constraint in inline assembly. It can be + marked as clobbered or used as a local register variable via the + "mdr" name. The compiler uses the RETF instruction if the function + does not modify the MDR register, so it is important that inline + assembly properly annotate any usage of the register. + + PowerPC/PowerPC64 + + * GCC now supports the Applied Micro Titan processor with + -mcpu=titan. + * The -mrecip option has been added, which indicates whether the + reciprocal and reciprocal square root instructions should be used. + * The -mveclibabi=mass option can be used to enable the compiler to + autovectorize mathematical functions using the Mathematical + Acceleration Subsystem library. + * The -msingle-pic-base option has been added, which instructs the + compiler to avoid loading the PIC base register in function + prologues. The PIC base register must be initialized by the runtime + system. + * The -mblock-move-inline-limit option has been added, which enables + the user to control the maximum size of inlined memcpy calls and + similar. + * PowerPC64 GNU/Linux support for applications requiring a large TOC + section has been improved. A new command-line option, + -mcmodel=MODEL, controls this feature; valid values for MODEL are + small, medium, or large. + * The Altivec builtin functions vec_ld and vec_st have been modified + to generate the Altivec memory instructions LVX and STVX, even if + the -mvsx option is used. In the initial GCC 4.5 release, these + builtin functions were changed to generate VSX memory reference + instructions instead of Altivec memory instructions, but there are + differences between the two instructions. If the VSX instruction + set is available, you can now use the new builtin functions + vec_vsx_ld and vec_vsx_st which always generates the VSX memory + instructions. + * The GCC compiler on AIX now defaults to a process layout with a + larger data space allowing larger programs to be compiled. + * The GCC long double type on AIX 6.1 and above has reverted to + 64-bit double precision, matching the AIX XL compiler default, + because of missing C99 symbols required by the GCC runtime. + * The default processor scheduling model and tuning for PowerPC64 + GNU/Linux and for AIX 6.1 and above now is POWER7. + * Starting with GCC 4.6.1, vectors of type vector long long or vector + long are passed and returned in the same method as other vectors + with the VSX instruction set. Previously the GCC compiler did not + adhere to the ABI for 128-bit vectors with 64-bit integer base + types (PR 48857). This is also fixed in the GCC 4.5.4 release. + + S/390, zSeries and System z9/z10, IBM zEnterprise z196 + + * Support for the zEnterprise z196 processor has been added. When + using the -march=z196 option, the compiler will generate code + making use of the following instruction facilities: + + Conditional load/store + + Distinct-operands + + Floating-point-extension + + Interlocked-access + + Population-count + The -mtune=z196 option avoids the compare and branch instructions + as well as the load address instruction with an index register as + much as possible and performs instruction scheduling appropriate + for the new out-of-order pipeline architecture. + * When using the -m31 -mzarch options the generated code still + conforms to the 32-bit ABI but uses the general purpose registers + as 64-bit registers internally. This requires a Linux kernel saving + the whole 64-bit registers when doing a context switch. Kernels + providing that feature indicate that by the 'highgprs' string in + /proc/cpuinfo. + * The SSA loop prefetching pass is enabled when using -O3. + + SPARC + + * GCC now supports the LEON series of SPARC V8 processors. The code + generated by the compiler can either be tuned to it by means of the + --with-tune=leon configure option and -mtune=leon compilation + option, or the compiler can be built for the sparc-leon-{elf,linux} + and sparc-leon3-{elf,linux} targets directly. + * GCC has stopped sign/zero-extending parameter registers in the + callee for functions taking parameters with sub-word size in 32-bit + mode, since this is redundant with the specification of the ABI. + GCC has never done so in 64-bit mode since this is also redundant. + * The command-line option -mfix-at697f has been added to enable the + documented workaround for the single erratum of the Atmel AT697F + processor. + +[28]Operating Systems + + [29]Android + + * GCC now supports the Bionic C library and provides a convenient way + of building native libraries and applications for the Android + platform. Refer to the documentation of the -mandroid and -mbionic + options for details on building native code. At the moment, Android + support is enabled only for ARM. + + [30]Darwin/Mac OS X + + * General + + Initial support for CFString types has been added. + This allows GCC to build projects including the system Core + Foundation frameworks. The GCC Objective-C family supports + CFString "toll-free bridged" as per the Mac OS X system tools. + CFString is also recognized in the context of format + attributes and arguments (see the documentation for format + attributes for limitations). At present, 8-bit character types + are supported. + + Object file size reduction. + The Darwin zeroed memory allocators have been re-written to + make more use of .zerofill sections. For non-debug code, this + can reduce object file size significantly. + + Objective-C family 64-bit support (NeXT ABI 2). + Initial support has been added to support 64-bit Objective-C + code using the Darwin/OS X native (NeXT) runtime. ABI version + 2 will be selected automatically when 64-bit code is built. + + Objective-C family 32-bit ABI 1. + For 32-bit code ABI 1 is also now also allowed. At present it + must be selected manually using -fobjc-abi-version=1 where + applicable - i.e. on Darwin 9/10 (OS X 10.5/10.6). + * x86 Architecture + + The -mdynamic-no-pic option has been enabled. + Code supporting -mdynamic-no-pic optimization has been added + and is applicable to -m32 builds. The compiler bootstrap uses + the option where appropriate. + + The default value for -mtune= has been changed. + Since Darwin systems are primarily Xeon, Core-2 or similar the + default tuning has been changed to -mtune=core2. + + Enable 128-bit long double (__float128) support on Darwin. + * PPC Architecture + + Darwin64 ABI. + Several significant bugs have been fixed, such that GCC now + produces code compatible with the Darwin64 PowerPC ABI. + + libffi and boehm-gc. + The Darwin ports of the libffi and boehm-gc libraries have + been upgraded to include a Darwin64 implementation. This means + that powerpc*-*-darwin9 platforms may now, for example, build + Java applications with -m64 enabled. + + Plug-in support has been enabled. + + The -fsection-anchors option is now available although, + presently, not heavily tested. + + [31]Solaris 2 + + New Features + + * Support symbol versioning with the Sun linker. + * Allow libstdc++ to leverage full ISO C99 support on Solaris 10+. + * Support thread-local storage (TLS) with the Sun assembler on + Solaris 2/x86. + * Support TLS on Solaris 8/9 if prerequisites are met. + * Support COMDAT group with the GNU assembler and recent Sun linker. + * Support the Sun assembler visibility syntax. + * Default Solaris 2/x86 to -march=pentium4 (Solaris 10+) resp. + -march=pentiumpro (Solaris 8/9). + * Don't use SSE on Solaris 8/9 x86 by default. + * Enable 128-bit long double (__float128) support on Solaris 2/x86. + + ABI Change + + * Change the ABI for returning 8-byte vectors like __m64 in MMX + registers on Solaris 10+/x86 to match the Sun Studio 12.1+ + compilers. This is an incompatible change. If you use such types, + you must either recompile all your code with the new compiler or + use the new -mvect8-ret-in-mem option to remain compatible with + previous versions of GCC and Sun Studio. + + [32]Windows x86/x86_64 + + * Initial support for decimal floating point. + * Support for the __thiscall calling-convention. + * Support for hot-patchable function prologues via the + ms_hook_prologue attribute for x86_64 in addition to 32-bit x86. + * Improvements of stack-probing and stack-allocation mechanisms. + * Support of push/pop-macro pragma as preprocessor command. + With #pragma push_macro("macro-name") the current definition of + macro-name is saved and can be restored with #pragma + pop_macro("macro-name") to its saved definition. + * Enable 128-bit long double (__float128) support on MinGW and + Cygwin. + +Other significant improvements + + Installation changes + + * An install-strip make target is provided that installs stripped + executables, and may install libraries with unneeded or debugging + sections stripped. + * On Power7 systems, there is a potential problem if you build the + GCC compiler with a host compiler using options that enable the VSX + instruction set generation. If the host compiler has been patched + so that the vec_ld and vec_st builtin functions generate Altivec + memory instructions instead of VSX memory instructions, then you + should be able to build the compiler with VSX instruction + generation. + +Changes for GCC Developers + + Note: these changes concern developers that develop GCC itself or + software that integrates with GCC, such as plugins, and not the general + GCC users. + * The gengtype utility, which previously was internal to the GCC + build process, has been enchanced to provide GC root information + for plugins as necessary. + * The old GC allocation interface of ggc_alloc and friends was + replaced with a type-safe alternative. + +[33]GCC 4.6.1 + + This is the [34]list of problem reports (PRs) from GCC's bug tracking + system that are known to be fixed in the 4.6.1 release. This list might + not be complete (that is, it is possible that some PRs that have been + fixed are not listed here). + +[35]GCC 4.6.2 + + This is the [36]list of problem reports (PRs) from GCC's bug tracking + system that are known to be fixed in the 4.6.2 release. This list might + not be complete (that is, it is possible that some PRs that have been + fixed are not listed here). + +[37]GCC 4.6.3 + + This is the [38]list of problem reports (PRs) from GCC's bug tracking + system that are known to be fixed in the 4.6.3 release. This list might + not be complete (that is, it is possible that some PRs that have been + fixed are not listed here). + +[39]GCC 4.6.4 + + This is the [40]list of problem reports (PRs) from GCC's bug tracking + system that are known to be fixed in the 4.6.4 release. This list might + not be complete (that is, it is possible that some PRs that have been + fixed are not listed here). + + + For questions related to the use of GCC, please consult these web + pages and the [41]GCC manuals. If that fails, the + [42]gcc-help@gcc.gnu.org mailing list might help. Comments on these + web pages and the development of GCC are welcome on our developer + list at [43]gcc@gcc.gnu.org. All of [44]our lists have public + archives. + + Copyright (C) [45]Free Software Foundation, Inc. Verbatim copying and + distribution of this entire article is permitted in any medium, + provided this notice is preserved. + + These pages are [46]maintained by the GCC team. Last modified + 2025-01-31. + +References + + 1. https://sourceware.org/bugzilla/show_bug.cgi?id=10401 + 2. https://gcc.gnu.org/gcc-4.5/changes.html + 3. https://gcc.gnu.org/gcc-4.5/changes.html#obsoleted + 4. https://gcc.gnu.org/gcc-4.6/porting_to.html + 5. https://gcc.gnu.org/projects/lto/whopr.pdf + 6. https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#Warning-Options + 7. https://gcc.gnu.org/gcc-4.6/changes.html#c + 8. https://gcc.gnu.org/gcc-4.6/changes.html#cplusplus + 9. https://gcc.gnu.org/gcc-4.6/cxx0x_status.html + 10. https://gcc.gnu.org/PR43145 + 11. https://gcc.gnu.org/PR43680 + 12. https://gcc.gnu.org/PR33558 + 13. https://www.open-std.org/jtc1/sc22/wg21/docs/cwg_active.html#253 + 14. https://gcc.gnu.org/onlinedocs/gcc-4.6.4/libstdc++/manual/manual/status.html#status.iso.200x + 15. https://gcc.gnu.org/onlinedocs/libstdc++/manual/debug_mode.html + 16. https://gcc.gnu.org/onlinedocs/libstdc++/manual/debug.html#debug.races + 17. https://gcc.gnu.org/gcc-4.6/changes.html#fortran + 18. https://gcc.gnu.org/onlinedocs/gcc/Preprocessor-Options.html + 19. https://gcc.gnu.org/wiki/OOP + 20. https://gcc.gnu.org/wiki/Coarray + 21. https://gcc.gnu.org/onlinedocs/gfortran/Code-Gen-Options.html#index-g_t_0040code_007bfcoarray_007d-233 + 22. https://gcc.gnu.org/gcc-4.6/changes.html#go + 23. https://gcc.gnu.org/gcc-4.6/changes.html#objective-c + 24. https://gcc.gnu.org/gcc-4.6/changes.html#targets + 25. https://gcc.gnu.org/gcc-4.6/changes.html#arm + 26. https://gcc.gnu.org/gcc-4.6/changes.html#microblaze + 27. https://gcc.gnu.org/gcc-4.6/changes.html#mn10300 + 28. https://gcc.gnu.org/gcc-4.6/changes.html#os + 29. https://gcc.gnu.org/gcc-4.6/changes.html#android + 30. https://gcc.gnu.org/gcc-4.6/changes.html#darwin + 31. https://gcc.gnu.org/gcc-4.6/changes.html#solaris + 32. https://gcc.gnu.org/gcc-4.6/changes.html#windows + 33. https://gcc.gnu.org/gcc-4.6/changes.html#GCC4.6.1 + 34. https://gcc.gnu.org/bugzilla/buglist.cgi?bug_status=RESOLVED&resolution=FIXED&target_milestone=4.6.1 + 35. https://gcc.gnu.org/gcc-4.6/changes.html#GCC4.6.2 + 36. https://gcc.gnu.org/bugzilla/buglist.cgi?bug_status=RESOLVED&resolution=FIXED&target_milestone=4.6.2 + 37. https://gcc.gnu.org/gcc-4.6/changes.html#GCC4.6.3 + 38. https://gcc.gnu.org/bugzilla/buglist.cgi?bug_status=RESOLVED&resolution=FIXED&target_milestone=4.6.3 + 39. https://gcc.gnu.org/gcc-4.6/changes.html#GCC4.6.4 + 40. https://gcc.gnu.org/bugzilla/buglist.cgi?bug_status=RESOLVED&resolution=FIXED&target_milestone=4.6.4 + 41. https://gcc.gnu.org/onlinedocs/ + 42. mailto:gcc-help@gcc.gnu.org + 43. mailto:gcc@gcc.gnu.org + 44. https://gcc.gnu.org/lists.html + 45. https://www.fsf.org/ + 46. https://gcc.gnu.org/about.html +====================================================================== +http://gcc.gnu.org/gcc-4.5/index.html + GCC 4.5 Release Series + + (This release series is no longer supported.) + + Jul 2, 2012 + + The [1]GNU project and the GCC developers are pleased to announce the + release of GCC 4.5.4. + + This release is a bug-fix release, containing fixes for regressions in + GCC 4.5.3 relative to previous releases of GCC. + +Release History + + GCC 4.5.4 + Jul 2, 2012 ([2]changes) + + GCC 4.5.3 + Apr 28, 2011 ([3]changes) + + GCC 4.5.2 + Dec 16, 2010 ([4]changes) + + GCC 4.5.1 + Jul 31, 2010 ([5]changes) + + GCC 4.5.0 + April 14, 2010 ([6]changes) + +References and Acknowledgements + + GCC used to stand for the GNU C Compiler, but since the compiler + supports several other languages aside from C, it now stands for the + GNU Compiler Collection. + + A list of [7]successful builds is updated as new information becomes + available. + + The GCC developers would like to thank the numerous people that have + contributed new features, improvements, bug fixes, and other changes as + well as test results to GCC. This [8]amazing group of volunteers is + what makes GCC successful. + + For additional information about GCC please refer to the [9]GCC project + web site or contact the [10]GCC development mailing list. + + To obtain GCC please use [11]our mirror sites or [12]our version + control system. + + + For questions related to the use of GCC, please consult these web + pages and the [13]GCC manuals. If that fails, the + [14]gcc-help@gcc.gnu.org mailing list might help. Comments on these + web pages and the development of GCC are welcome on our developer + list at [15]gcc@gcc.gnu.org. All of [16]our lists have public + archives. + + Copyright (C) [17]Free Software Foundation, Inc. Verbatim copying and + distribution of this entire article is permitted in any medium, + provided this notice is preserved. + + These pages are [18]maintained by the GCC team. Last modified + 2022-10-26. + +References + + 1. http://www.gnu.org/ + 2. https://gcc.gnu.org/gcc-4.5/changes.html + 3. https://gcc.gnu.org/gcc-4.5/changes.html + 4. https://gcc.gnu.org/gcc-4.5/changes.html + 5. https://gcc.gnu.org/gcc-4.5/changes.html + 6. https://gcc.gnu.org/gcc-4.5/changes.html + 7. https://gcc.gnu.org/gcc-4.5/buildstat.html + 8. https://gcc.gnu.org/onlinedocs/gcc/Contributors.html + 9. https://gcc.gnu.org/index.html + 10. mailto:gcc@gcc.gnu.org + 11. https://gcc.gnu.org/mirrors.html + 12. https://gcc.gnu.org/git.html + 13. https://gcc.gnu.org/onlinedocs/ + 14. mailto:gcc-help@gcc.gnu.org + 15. mailto:gcc@gcc.gnu.org + 16. https://gcc.gnu.org/lists.html + 17. https://www.fsf.org/ + 18. https://gcc.gnu.org/about.html +====================================================================== +http://gcc.gnu.org/gcc-4.5/changes.html + GCC 4.5 Release Series + Changes, New Features, and Fixes + +Caveats + + * GCC now requires the [1]MPC library in order to build. See the + [2]prerequisites page for version requirements. + * Support for a number of older systems and recently unmaintained or + untested target ports of GCC has been declared obsolete in GCC 4.5. + Unless there is activity to revive them, the next release of GCC + will have their sources permanently removed. + The following ports for individual systems on particular + architectures have been obsoleted: + + IRIX releases before 6.5 (mips-sgi-irix5*, + mips-sgi-irix6.[0-4]) + + Solaris 7 (*-*-solaris2.7) + + Tru64 UNIX releases before V5.1 (alpha*-dec-osf4*, + alpha-dec-osf5.0*) + + Details for the IRIX, Solaris 7, and Tru64 UNIX obsoletions + can be found in the [3]announcement. + Support for the classic POWER architecture implemented in the + original RIOS and RIOS2 processors of the old IBM RS/6000 product + line has been obsoleted in the rs6000 port. This does not affect + the new generation Power and PowerPC architectures. + * Support has been removed for all the [4]configurations obsoleted in + GCC 4.4. + * Support has been removed for the protoize and unprotoize utilities, + obsoleted in GCC 4.4. + * Support has been removed for tuning for Itanium1 (Merced) variants. + Note that code tuned for Itanium2 should also run correctly on + Itanium1. + * GCC now generates unwind info also for epilogues. DWARF debuginfo + generated by GCC now uses more features of DWARF3 than before, and + also some DWARF4 features. GDB older than 7.0 is not able to handle + either of these, so to debug GCC 4.5 generated binaries or + libraries GDB 7.0 or later is needed. You can disable use of DWARF4 + features with the -gdwarf-3 -gstrict-dwarf options, or use + -gdwarf-2 -gstrict-dwarf to restrict GCC to just DWARF2, but + epilogue unwind info is emitted unconditionally whenever unwind + info is emitted. + * On x86 targets, code containing floating-point calculations may run + significantly more slowly when compiled with GCC 4.5 in strict C99 + conformance mode than they did with earlier GCC versions. This is + due to stricter standard conformance of the compiler and can be + avoided by using the option -fexcess-precision=fast; also see + [5]below. + * The function attribute noinline no longer prevents GCC from cloning + the function. A new attribute noclone has been introduced for this + purpose. Cloning a function means that it is duplicated and the new + copy is specialized for certain contexts (for example when a + parameter is a known constant). + +General Optimizer Improvements + + * The -save-temps now takes an optional argument. The -save-temps and + -save-temps=cwd switches write the temporary files in the current + working directory based on the original source file. The + -save-temps=obj switch will write files into the directory + specified with the -o option, and the intermediate filenames are + based on the output file. This will allow the user to get the + compiler intermediate files when doing parallel builds without two + builds of the same filename located in different directories from + interfering with each other. + * Debugging dumps are now created in the same directory as the object + file rather than in the current working directory. This allows the + user to get debugging dumps when doing parallel builds without two + builds of the same filename interfering with each other. + * GCC has been integrated with the MPC library. This allows GCC to + evaluate complex arithmetic at compile time [6]more accurately. It + also allows GCC to evaluate calls to complex built-in math + functions having constant arguments and replace them at compile + time with their mathematically equivalent results. In doing so, GCC + can generate correct results regardless of the math library + implementation or floating point precision of the host platform. + This also allows GCC to generate identical results regardless of + whether one compiles in native or cross-compile configurations to a + particular target. The following built-in functions take advantage + of this new capability: cacos, cacosh, casin, casinh, catan, + catanh, ccos, ccosh, cexp, clog, cpow, csin, csinh, csqrt, ctan, + and ctanh. The float and long double variants of these functions + (e.g. csinf and csinl) are also handled. + * A new link-time optimizer has been added ([7]-flto). When this + option is used, GCC generates a bytecode representation of each + input file and writes it to specially-named sections in each object + file. When the object files are linked together, all the function + bodies are read from these named sections and instantiated as if + they had been part of the same translation unit. This enables + interprocedural optimizations to work across different files (and + even different languages), potentially improving the performance of + the generated code. To use the link-timer optimizer, -flto needs to + be specified at compile time and during the final link. If the + program does not require any symbols to be exported, it is possible + to combine -flto and the experimental [8]-fwhopr with + [9]-fwhole-program to allow the interprocedural optimizers to use + more aggressive assumptions. + * The automatic parallelization pass was enhanced to support + parallelization of outer loops. + * Automatic parallelization can be enabled as part of Graphite. In + addition to -ftree-parallelize-loops=, specify + -floop-parallelize-all to enable the Graphite-based optimization. + * The infrastructure for optimizing based on [10]restrict qualified + pointers has been rewritten and should result in code generation + improvements. Optimizations based on restrict qualified pointers + are now also available when using -fno-strict-aliasing. + * There is a new optimization pass that attempts to change prototype + of functions to avoid unused parameters, pass only relevant parts + of structures and turn arguments passed by reference to arguments + passed by value when possible. It is enabled by -O2 and above as + well as -Os and can be manually invoked using the new command-line + switch -fipa-sra. + * GCC now optimize exception handling code. In particular cleanup + regions that are proved to not have any effect are optimized out. + +New Languages and Language specific improvements + + All languages + + * The -fshow-column option is now on by default. This means error + messages now have a column associated with them. + + Ada + + * Compilation of programs heavily using discriminated record types + with variant parts has been sped up and generates more compact + code. + * Stack checking now works reasonably well on most plaforms. In some + specific cases, stack overflows may still fail to be detected, but + a compile-time warning will be issued for these cases. + + C family + + * If a header named in a #include directive is not found, the + compiler exits immediately. This avoids a cascade of errors arising + from declarations expected to be found in that header being + missing. + * A new built-in function __builtin_unreachable() has been added that + tells the compiler that control will never reach that point. It may + be used after asm statements that terminate by transferring control + elsewhere, and in other places that are known to be unreachable. + * The -Wlogical-op option now warns for logical expressions such as + (c == 1 && c == 2) and (c != 1 || c != 2), which are likely to be + mistakes. This option is disabled by default. + * An asm goto feature has been added to allow asm statements that + jump to C labels. + * C++0x raw strings are supported for C++ and for C with -std=gnu99. + * The deprecated attribute now takes an optional string argument, for + example, __attribute__((deprecated("text string"))), that will be + printed together with the deprecation warning. + + C + + * The -Wenum-compare option, which warns when comparing values of + different enum types, now works for C. It formerly only worked for + C++. This warning is enabled by -Wall. It may be avoided by using a + type cast. + * The -Wcast-qual option now warns about casts which are unsafe in + that they permit const-correctness to be violated without further + warnings. Specifically, it warns about cases where a qualifier is + added when all the lower types are not const. For example, it warns + about a cast from char ** to const char **. + * The -Wc++-compat option is significantly improved. It issues new + warnings for: + + Using C++ reserved operator names as identifiers. + + Conversions to enum types without explicit casts. + + Using va_arg with an enum type. + + Using different enum types in the two branches of ?:. + + Using ++ or -- on a variable of enum type. + + Using the same name as both a struct, union or enum tag and a + typedef, unless the typedef refers to the tagged type itself. + + Using a struct, union, or enum which is defined within another + struct or union. + + A struct field defined using a typedef if there is a field in + the struct, or an enclosing struct, whose name is the typedef + name. + + Duplicate definitions at file scope. + + Uninitialized const variables. + + A global variable with an anonymous struct, union, or enum + type. + + Using a string constant to initialize a char array whose size + is the length of the string. + * The new -Wjump-misses-init option warns about cases where a goto or + switch skips the initialization of a variable. This sort of branch + is an error in C++ but not in C. This warning is enabled by + -Wc++-compat. + * GCC now ensures that a C99-conforming is present on most + targets, and uses information about the types in this header to + implement the Fortran bindings to those types. GCC does not ensure + the presence of such a header, and does not implement the Fortran + bindings, on the following targets: NetBSD, VxWorks, VMS, + SymbianOS, WinCE, LynxOS, Netware, QNX, Interix, TPF. + * GCC now implements C90- and C99-conforming rules for constant + expressions. This may cause warnings or errors for some code using + expressions that can be folded to a constant but are not constant + expressions as defined by ISO C. + * All known target-independent C90 and C90 Amendment 1 conformance + bugs, and all known target-independent C99 conformance bugs not + related to floating point or extended identifiers, have been fixed. + * The C decimal floating point support now includes support for the + FLOAT_CONST_DECIMAL64 pragma. + * The named address space feature from ISO/IEC TR 18037 is now + supported. This is currently only implemented for the SPU + processor. + + [11]C++ + + * Improved [12]experimental support for the upcoming C++0x ISO C++ + standard, including support for raw strings, lambda expressions and + explicit type conversion operators. + * When printing the name of a class template specialization, G++ will + now omit any template arguments which come from default template + arguments. This behavior (and the pretty-printing of function + template specializations as template signature and arguments) can + be disabled with the -fno-pretty-templates option. + * Access control is now applied to typedef names used in a template, + which may cause G++ to reject some ill-formed code that was + accepted by earlier releases. The -fno-access-control option can be + used as a temporary workaround until the code is corrected. + * Compilation time for code that uses templates should now scale + linearly with the number of instantiations rather than + quadratically, as template instantiations are now looked up using + hash tables. + * Declarations of functions that look like builtin declarations of + library functions are only considered to be redeclarations if they + are declared with extern "C". This may cause problems with code + that omits extern "C" on hand-written declarations of C library + functions such as abort or memcpy. Such code is ill-formed, but was + accepted by earlier releases. + * Diagnostics that used to complain about passing non-POD types to + ... or jumping past the declaration of a non-POD variable now check + for triviality rather than PODness, as per C++0x. + * In C++0x mode local and anonymous classes are now allowed as + template arguments, and in declarations of variables and functions + with linkage, so long as any such declaration that is used is also + defined ([13]DR 757). + * Labels may now have attributes, as has been permitted for a while + in C. This is only permitted when the label definition and the + attribute specifier is followed by a semicolon—i.e., the label + applies to an empty statement. The only useful attribute for a + label is unused. + * G++ now implements [14]DR 176. Previously G++ did not support using + the injected-class-name of a template base class as a type name, + and lookup of the name found the declaration of the template in the + enclosing scope. Now lookup of the name finds the + injected-class-name, which can be used either as a type or as a + template, depending on whether or not the name is followed by a + template argument list. As a result of this change, some code that + was previously accepted may be ill-formed because + 1. The injected-class-name is not accessible because it's from a + private base, or + 2. The injected-class-name cannot be used as an argument for a + template template parameter. + In either of these cases, the code can be fixed by adding a + nested-name-specifier to explicitly name the template. The first + can be worked around with -fno-access-control; the second is only + rejected with -pedantic. + * A new standard mangling for SIMD vector types has been added, to + avoid name clashes on systems with vectors of varying length. By + default the compiler still uses the old mangling, but emits aliases + with the new mangling on targets that support strong aliases. Users + can switch over entirely to the new mangling with -fabi-version=4 + or -fabi-version=0. -Wabi will now warn about code that uses the + old mangling. + * The command-line option -ftemplate-depth-N is now written as + -ftemplate-depth=N and the old form is deprecated. + * Conversions between NULL and non-pointer types are now warned by + default. The new option -Wno-conversion-null disables these + warnings. Previously these warnings were only available when using + -Wconversion explicitly. + + Runtime Library (libstdc++) + + * Improved experimental support for the upcoming ISO C++ standard, + C++0x, including: + + Support for , , and . + + Existing facilities now exploit explicit operators and the + newly implemented core C++0x features. + + The header has been renamed to . + * An experimental [15]profile mode has been added. This is an + implementation of many C++ standard library constructs with an + additional analysis layer that gives performance improvement advice + based on recognition of suboptimal usage patterns. For example, +#include +int main() +{ + std::vector v; + for (int k = 0; k < 1024; ++k) + v.insert(v.begin(), k); +} + + When instrumented via the profile mode, can return suggestions + about the initial size and choice of the container used as follows: +vector-to-list: improvement = 5: call stack = 0x804842c ... + : advice = change std::vector to std::list +vector-size: improvement = 3: call stack = 0x804842c ... + : advice = change initial container size from 0 to 1024 + + These constructs can be substituted for the normal libstdc++ + constructs on a piecemeal basis, or all existing components can be + transformed via the -D_GLIBCXX_PROFILE macro. + * [16]Support for decimal floating-point arithmetic (aka ISO C++ TR + 24733) has been added. This support is in header file + , uses namespace std::decimal, and includes + classes decimal32, decimal64, and decimal128. + * Sources have been audited for application of function attributes + nothrow, const, pure, and noreturn. + * Python pretty-printers have been added for many standard library + components that simplify the internal representation and present a + more intuitive view of components when used with + appropriately-advanced versions of GDB. For more information, + please consult the more [17]detailed description. + * The default behavior for comparing typeinfo names has changed, so + in , __GXX_MERGED_TYPEINFO_NAMES now defaults to zero. + * The new -static-libstdc++ option directs g++ to link the C++ + library statically, even if the default would normally be to link + it dynamically. + + [18]Fortran + + * The COMMON default padding has been changed – instead of adding the + padding before a variable it is now added afterwards, which + increases the compatibility with other vendors and helps to obtain + the correct output in some cases. Cf. also the -falign-commons + option ([19]added in 4.4). + * The -finit-real= option now also supports the value snan for + signaling not-a-number; to be effective, one additionally needs to + enable trapping (e.g. via -ffpe-trap=). Note: Compile-time + optimizations can turn a signaling NaN into a quiet one. + * The new option -fcheck= has been added with the options bounds, + array-temps, do, pointer, and recursive. The bounds and array-temps + options are equivalent to -fbounds-check and + -fcheck-array-temporaries. The do option checks for invalid + modification of loop iteration variables, and the recursive option + tests for recursive calls to subroutines/functions which are not + marked as recursive. With pointer pointer association checks in + calls are performed; however, neither undefined pointers nor + pointers in expressions are handled. Using -fcheck=all enables all + these run-time checks. + * The run-time checking -fcheck=bounds now warns about invalid string + lengths of character dummy arguments. Additionally, more + compile-time checks have been added. + * The new option [20]-fno-protect-parens has been added; if set, the + compiler may reorder REAL and COMPLEX expressions without regard to + parentheses. + * GNU Fortran no longer links against libgfortranbegin. As before, + MAIN__ (assembler symbol name) is the actual Fortran main program, + which is invoked by the main function. However, main is now + generated and put in the same object file as MAIN__. For the time + being, libgfortranbegin still exists for backward compatibility. + For details see the new [21]Mixed-Language Programming chapter in + the manual. + * The I/O library was restructured for performance and cleaner code. + * Array assignments and WHERE are now run in parallel when OpenMP's + WORKSHARE is used. + * The experimental option -fwhole-file was added. The option allows + whole-file checking of procedure arguments and allows for better + optimizations. It can also be used with -fwhole-program, which is + now also supported in gfortran. + * More Fortran 2003 and Fortran 2008 mathematical functions can now + be used as initialization expressions. + * Some extended attributes such as STDCALL are now supported via the + [22]GCC$ compiler directive. + * For Fortran 77 compatibility: If -fno-sign-zero is used, the SIGN + intrinsic behaves now as if zero were always positive. + * For legacy compatibiliy: On Cygwin and MinGW, the special files + CONOUT$ and CONIN$ (and CONERR$ which maps to CONOUT$) are now + supported. + * Fortran 2003 support has been extended: + + Procedure-pointer function results and procedure-pointer + components (including PASS), + + allocatable scalars (experimental), + + DEFERRED type-bound procedures, + + the ERRMSG= argument of the ALLOCATE and DEALLOCATE statements + have been implemented. + + The ALLOCATE statement supports type-specs and the SOURCE= + argument. + + OPERATOR(*) and ASSIGNMENT(=) are now allowed as GENERIC + type-bound procedure (i.e. as type-bound operators). + + Rounding (ROUND=, RZ, ...) for output is now supported. + + The INT_FAST{8,16,32,64,128}_T kind type parameters of the + intrinsic module ISO_C_BINDING are now supported, except for + the targets listed above as ones where GCC does not have + type information. + + Extensible derived types with type-bound procedure or + procedure pointer with PASS attribute now have to use CLASS in + line with the Fortran 2003 standard; the workaround to use + TYPE is no longer supported. + + [23]Experimental, incomplete support for polymorphism, + including CLASS, SELECT TYPE and dynamic dispatch of + type-bound procedure calls. Some features do not work yet such + as unlimited polymorphism (CLASS(*)). + * Fortran 2008 support has been extended: + + The OPEN statement now supports the NEWUNIT= option, which + returns a unique file unit, thus preventing inadvertent use of + the same unit in different parts of the program. + + Support for unlimited format items has been added. + + The INT{8,16,32} and REAL{32,64,128} kind type parameters of + the intrinsic module ISO_FORTRAN_ENV are now supported. + + Using complex arguments with TAN, SINH, COSH, TANH, ASIN, + ACOS, and ATAN is now possible; the functions ASINH, ACOSH, + and ATANH have been added (for real and complex arguments) and + ATAN(Y,X) is now an alias for ATAN2(Y,X). + + The BLOCK construct has been implemented. + +[24]New Targets and Target Specific Improvements + + AIX + + * Full cross-toolchain support now available with GNU Binutils + + ARM + + * GCC now supports the Cortex-M0 and Cortex-A5 processors. + * GCC now supports the ARM v7E-M architecture. + * GCC now supports VFPv4-based FPUs and FPUs with + single-precision-only VFP. + * GCC has many improvements to optimization for other ARM processors, + including scheduling support for the integer pipeline on Cortex-A9. + * GCC now supports the IEEE 754-2008 half-precision floating-point + type, and a variant ARM-specific half-precision type. This type is + specified using __fp16, with the layout determined by + -mfp16-format. With appropriate -mfpu options, the Cortex-A9 and + VFPv4 half-precision instructions will be used. + * GCC now supports the variant of AAPCS that uses VFP registers for + parameter passing and return values. + + AVR + + * The -mno-tablejump option has been removed because it has the same + effect as the -fno-jump-tables option. + * Added support for these new AVR devices: + + ATmega8U2 + + ATmega16U2 + + ATmega32U2 + + [25]IA-32/x86-64 + + * GCC now will set the default for -march= based on the configure + target. + * GCC now supports handling floating-point excess precision arising + from use of the x87 floating-point unit in a way that conforms to + ISO C99. This is enabled with -fexcess-precision=standard and with + standards conformance options such as -std=c99, and may be disabled + using -fexcess-precision=fast. + * Support for the Intel Atom processor is now available through the + -march=atom and -mtune=atom options. + * A new -mcrc32 option is now available to enable crc32 intrinsics. + * A new -mmovbe option is now available to enable GCC to use the + movbe instruction to implement __builtin_bswap32 and + __builtin_bswap64. + * SSE math now can be enabled by default at configure time with the + new --with-fpmath=sse option. + * There is a new intrinsic header file, . It should be + included before using any IA-32/x86-64 intrinsics. + * Support for the XOP, FMA4, and LWP instruction sets for the AMD + Orochi processors are now available with the -mxop, -mfma4, and + -mlwp options. + * The -mabm option enables GCC to use the popcnt and lzcnt + instructions on AMD processors. + * The -mpopcnt option enables GCC to use the popcnt instructions on + both AMD and Intel processors. + + M68K/ColdFire + + * GCC now supports ColdFire 51xx, 5221x, 5225x, 52274, 52277, 5301x + and 5441x devices. + * GCC now supports thread-local storage (TLS) on M68K and ColdFire + processors. + + [26]MeP + + Support has been added for the Toshiba Media embedded Processor (MeP, + or mep-elf) embedded target. + + MIPS + + * GCC now supports MIPS 1004K processors. + * GCC can now be configured with options --with-arch-32, + --with-arch-64, --with-tune-32 and --with-tune-64 to control the + default optimization separately for 32-bit and 64-bit modes. + * MIPS targets now support an alternative _mcount interface, in which + register $12 points to the function's save slot for register $31. + This interface is selected by the -mcount-ra-address option; see + the documentation for more details. + * GNU/Linux targets can now generate read-only .eh_frame sections. + This optimization requires GNU binutils 2.20 or above, and is only + available if GCC is configured with a suitable version of binutils. + * GNU/Linux targets can now attach special relocations to indirect + calls, so that the linker can turn them into direct jumps or + branches. This optimization requires GNU binutils 2.20 or later, + and is automatically selected if GCC is configured with an + appropriate version of binutils. It can be explicitly enabled or + disabled using the -mrelax-pic-calls command-line option. + * GCC now generates more heavily-optimized atomic operations on + Octeon processors. + * MIPS targets now support the -fstack-protector option. + * GCC now supports an -msynci option, which specifies that synci is + enough to flush the instruction cache, without help from the + operating system. GCC uses this information to optimize + automatically-generated cache flush operations, such as those used + for nested functions in C. There is also a --with-synci + configure-time option, which makes -msynci the default. + * GCC supports four new function attributes for interrupt handlers: + interrupt, use_shadow_register_set, keep_interrupts_masked and + use_debug_exception_return. See the documentation for more details + about these attributes. + + [27]RS/6000 (POWER/PowerPC) + + * GCC now supports the Power ISA 2.06, which includes the VSX + instructions that add vector 64-bit floating point support, new + population count instructions, and conversions between floating + point and unsigned types. + * Support for the power7 processor is now available through the + -mcpu=power7 and -mtune=power7. + * GCC will now vectorize loops that contain simple math functions + like copysign when generating code for altivec or VSX targets. + * Support for the A2 processor is now available through the -mcpu=a2 + and -mtune=a2 options. + * Support for the 476 processor is now available through the + -mcpu={476,476fp} and -mtune={476,476fp} options. + * Support for the e500mc64 processor is now available through the + -mcpu=e500mc64 and -mtune=e500mc64 options. + * GCC can now be configured with options --with-cpu-32, + --with-cpu-64, --with-tune-32 and --with-tune-64 to control the + default optimization separately for 32-bit and 64-bit modes. + * Starting with GCC 4.5.4, vectors of type vector long long or vector + long are passed and returned in the same method as other vectors + with the VSX instruction set. Previously the GCC compiler did not + adhere to the ABI for 128-bit vectors with 64-bit integer base + types (PR 48857). This is also fixed in the GCC 4.6.1 release. + + [28]RX + + Support has been added for the Renesas RX Processor (rx-elf) target. + +[29]Operating Systems + + [30]Windows (Cygwin and MinGW) + + * GCC now installs all the major language runtime libraries as DLLs + when configured with the --enable-shared option. + * GCC now makes use of the new support for aligned common variables + in versions of binutils >= 2.20 to fix bugs in the support for SSE + data types. + * Improvements to the libffi support library increase the reliability + of code generated by GCJ on all Windows platforms. Libgcj is + enabled by default for the first time. + * Libtool improvements simplify installation by placing the generated + DLLs in the correct binaries directory. + * Numerous other minor bugfixes and improvements, and substantial + enhancements to the Fortran language support library. + + > + +Other significant improvements + + Plugins + + * It is now possible to extend the compiler without having to modify + its source code. A new option -fplugin=file.so tells GCC to load + the shared object file.so and execute it as part of the compiler. + The internal documentation describes the details on how plugins can + interact with the compiler. + + Installation changes + + * The move to newer autotools changed default installation + directories and switches to control them: The --with-datarootdir, + --with-docdir, --with-pdfdir, and --with-htmldir switches are not + used any more. Instead, you can now use --datarootdir, --docdir, + --htmldir, and --pdfdir. The default installation directories have + changed as follows according to the GNU Coding Standards: + + datarootdir read-only architecture-independent data root [PREFIX/share] + localedir locale-specific message catalogs [DATAROOTDIR/locale] + docdir documentation root [DATAROOTDIR/doc/PACKAGE] + htmldir html documentation [DOCDIR] + dvidir dvi documentation [DOCDIR] + pdfdir pdf documentation [DOCDIR] + psdir ps documentation [DOCDIR] + The following variables have new default values: + + datadir read-only architecture-independent data [DATAROOTDIR] + infodir info documentation [DATAROOTDIR/info] + mandir man documentation [DATAROOTDIR/man] + +[31]GCC 4.5.1 + + This is the [32]list of problem reports (PRs) from GCC's bug tracking + system that are known to be fixed in the 4.5.1 release. This list might + not be complete (that is, it is possible that some PRs that have been + fixed are not listed here). + + All languages + + * GCC's new link-time optimizer ([33]-flto) now also works on a few + non-ELF targets: + + Cygwin (*-cygwin*) + + MinGW (*-mingw*) + + Darwin on x86-64 (x86_64-apple-darwin*) + LTO is not enabled by default for these targets. To enable LTO, you + should configure with the --enable-lto option. + +[34]GCC 4.5.2 + + This is the [35]list of problem reports (PRs) from GCC's bug tracking + system that are known to be fixed in the 4.5.2 release. This list might + not be complete (that is, it is possible that some PRs that have been + fixed are not listed here). + +[36]GCC 4.5.3 + + This is the [37]list of problem reports (PRs) from GCC's bug tracking + system that are known to be fixed in the 4.5.3 release. This list might + not be complete (that is, it is possible that some PRs that have been + fixed are not listed here). + + On the PowerPC compiler, the Altivec builtin functions vec_ld and + vec_st have been modified to generate the Altivec memory instructions + LVX and STVX, even if the -mvsx option is used. In the initial GCC 4.5 + release, these builtin functions were changed to generate VSX memory + reference instructions instead of Altivec memory instructions, but + there are differences between the two instructions. If the VSX + instruction set is available, you can now use the new builtin functions + vec_vsx_ld and vec_vsx_st which always generates the VSX memory + instructions. + +[38]GCC 4.5.4 + + This is the [39]list of problem reports (PRs) from GCC's bug tracking + system that are known to be fixed in the 4.5.4 release. This list might + not be complete (that is, it is possible that some PRs that have been + fixed are not listed here). + + + For questions related to the use of GCC, please consult these web + pages and the [40]GCC manuals. If that fails, the + [41]gcc-help@gcc.gnu.org mailing list might help. Comments on these + web pages and the development of GCC are welcome on our developer + list at [42]gcc@gcc.gnu.org. All of [43]our lists have public + archives. + + Copyright (C) [44]Free Software Foundation, Inc. Verbatim copying and + distribution of this entire article is permitted in any medium, + provided this notice is preserved. + + These pages are [45]maintained by the GCC team. Last modified + 2025-01-31. + +References + + 1. https://www.multiprecision.org/ + 2. https://gcc.gnu.org/install/prerequisites.html + 3. https://gcc.gnu.org/ml/gcc/2010-01/msg00510.html + 4. https://gcc.gnu.org/gcc-4.4/changes.html#obsoleted + 5. https://gcc.gnu.org/gcc-4.5/changes.html#x86 + 6. https://gcc.gnu.org/PR30789 + 7. https://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html#index-flto-801 + 8. https://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html#index-fwhopr-802 + 9. https://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html#index-fwhole-program-800 + 10. https://gcc.gnu.org/onlinedocs/gcc/Restricted-Pointers.html + 11. https://gcc.gnu.org/gcc-4.5/changes.html#cplusplus + 12. https://gcc.gnu.org/gcc-4.5/cxx0x_status.html + 13. https://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#757 + 14. https://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#176 + 15. https://gcc.gnu.org/onlinedocs/libstdc++/manual/profile_mode.html + 16. https://gcc.gnu.org/onlinedocs/libstdc++/manual/status.html#status.iso.tr24733 + 17. https://sourceware.org/gdb/wiki/STLSupport + 18. https://gcc.gnu.org/gcc-4.5/changes.html#Fortran + 19. https://gcc.gnu.org/gcc-4.4/changes.html + 20. https://gcc.gnu.org/onlinedocs/gfortran/Code-Gen-Options.html + 21. https://gcc.gnu.org/onlinedocs/gfortran/Mixed-Language-Programming.html + 22. https://gcc.gnu.org/onlinedocs/gfortran/GNU-Fortran-Compiler-Directives.html + 23. https://gcc.gnu.org/wiki/OOP + 24. https://gcc.gnu.org/gcc-4.5/changes.html#targets + 25. https://gcc.gnu.org/gcc-4.5/changes.html#x86 + 26. https://gcc.gnu.org/gcc-4.5/changes.html#mep + 27. https://gcc.gnu.org/gcc-4.5/changes.html#rs6000 + 28. https://gcc.gnu.org/gcc-4.5/changes.html#rx + 29. https://gcc.gnu.org/gcc-4.5/changes.html#os + 30. https://gcc.gnu.org/gcc-4.5/changes.html#windows + 31. https://gcc.gnu.org/gcc-4.5/changes.html#GCC4.5.1 + 32. https://gcc.gnu.org/bugzilla/buglist.cgi?bug_status=RESOLVED&resolution=FIXED&target_milestone=4.5.1 + 33. https://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html#index-flto-801 + 34. https://gcc.gnu.org/gcc-4.5/changes.html#GCC4.5.2 + 35. https://gcc.gnu.org/bugzilla/buglist.cgi?bug_status=RESOLVED&resolution=FIXED&target_milestone=4.5.2 + 36. https://gcc.gnu.org/gcc-4.5/changes.html#GCC4.5.3 + 37. https://gcc.gnu.org/bugzilla/buglist.cgi?bug_status=RESOLVED&resolution=FIXED&target_milestone=4.5.3 + 38. https://gcc.gnu.org/gcc-4.5/changes.html#GCC4.5.4 + 39. https://gcc.gnu.org/bugzilla/buglist.cgi?bug_status=RESOLVED&resolution=FIXED&target_milestone=4.5.4 + 40. https://gcc.gnu.org/onlinedocs/ + 41. mailto:gcc-help@gcc.gnu.org + 42. mailto:gcc@gcc.gnu.org + 43. https://gcc.gnu.org/lists.html + 44. https://www.fsf.org/ + 45. https://gcc.gnu.org/about.html +====================================================================== +http://gcc.gnu.org/gcc-4.4/index.html + GCC 4.4 Release Series + + This release series is no longer maintained. + + March 13, 2012 + + The [1]GNU project and the GCC developers are pleased to announce the + release of GCC 4.4.7. + + This release is a bug-fix release, containing fixes for regressions in + GCC 4.4.6 relative to previous releases of GCC. + +Release History + + GCC 4.4.7 + March 13, 2012 ([2]changes) + + GCC 4.4.6 + April 16, 2011 ([3]changes) + + GCC 4.4.5 + October 1, 2010 ([4]changes) + + GCC 4.4.4 + April 29, 2010 ([5]changes) + + GCC 4.4.3 + January 21, 2010 ([6]changes) + + GCC 4.4.2 + October 15, 2009 ([7]changes) + + GCC 4.4.1 + July 22, 2009 ([8]changes) + + GCC 4.4.0 + April 21, 2009 ([9]changes) + +References and Acknowledgements + + GCC used to stand for the GNU C Compiler, but since the compiler + supports several other languages aside from C, it now stands for the + GNU Compiler Collection. + + A list of [10]successful builds is updated as new information becomes + available. + + The GCC developers would like to thank the numerous people that have + contributed new features, improvements, bug fixes, and other changes as + well as test results to GCC. This [11]amazing group of volunteers is + what makes GCC successful. + + For additional information about GCC please refer to the [12]GCC + project web site or contact the [13]GCC development mailing list. + + To obtain GCC please use [14]our mirror sites or [15]our version + control system. + + + For questions related to the use of GCC, please consult these web + pages and the [16]GCC manuals. If that fails, the + [17]gcc-help@gcc.gnu.org mailing list might help. Comments on these + web pages and the development of GCC are welcome on our developer + list at [18]gcc@gcc.gnu.org. All of [19]our lists have public + archives. + + Copyright (C) [20]Free Software Foundation, Inc. Verbatim copying and + distribution of this entire article is permitted in any medium, + provided this notice is preserved. + + These pages are [21]maintained by the GCC team. Last modified + 2022-10-26. + +References + + 1. http://www.gnu.org/ + 2. https://gcc.gnu.org/gcc-4.4/changes.html + 3. https://gcc.gnu.org/gcc-4.4/changes.html + 4. https://gcc.gnu.org/gcc-4.4/changes.html + 5. https://gcc.gnu.org/gcc-4.4/changes.html + 6. https://gcc.gnu.org/gcc-4.4/changes.html + 7. https://gcc.gnu.org/gcc-4.4/changes.html + 8. https://gcc.gnu.org/gcc-4.4/changes.html + 9. https://gcc.gnu.org/gcc-4.4/changes.html + 10. https://gcc.gnu.org/gcc-4.4/buildstat.html + 11. https://gcc.gnu.org/onlinedocs/gcc/Contributors.html + 12. https://gcc.gnu.org/index.html + 13. mailto:gcc@gcc.gnu.org + 14. https://gcc.gnu.org/mirrors.html + 15. https://gcc.gnu.org/git.html + 16. https://gcc.gnu.org/onlinedocs/ + 17. mailto:gcc-help@gcc.gnu.org + 18. mailto:gcc@gcc.gnu.org + 19. https://gcc.gnu.org/lists.html + 20. https://www.fsf.org/ + 21. https://gcc.gnu.org/about.html +====================================================================== +http://gcc.gnu.org/gcc-4.4/changes.html + GCC 4.4 Release Series + Changes, New Features, and Fixes + + The latest release in the 4.4 release series is [1]GCC 4.4.7. + +Caveats + + * __builtin_stdarg_start has been completely removed from GCC. + Support for had been deprecated since GCC 4.0. Use + __builtin_va_start as a replacement. + * Some of the errors issued by the C++ front end that could be + downgraded to warnings in previous releases by using -fpermissive + are now warnings by default. They can be converted into errors by + using -pedantic-errors. + * Use of the cpp assertion extension will now emit a warning when + -Wdeprecated or -pedantic is used. This extension has been + deprecated for many years, but never warned about. + * Packed bit-fields of type char were not properly bit-packed on many + targets prior to GCC 4.4. On these targets, the fix in GCC 4.4 + causes an ABI change. For example there is no longer a 4-bit + padding between field a and b in this structure: + struct foo + { + char a:4; + char b:8; + } __attribute__ ((packed)); + There is a new warning to help identify fields that are affected: + foo.c:5: note: Offset of packed bit-field 'b' has changed in GCC 4.4 + The warning can be disabled with -Wno-packed-bitfield-compat. + * On ARM EABI targets, the C++ mangling of the va_list type has been + changed to conform to the current revision of the EABI. This does + not affect the libstdc++ library included with GCC. + * The SCOUNT and POS bits of the MIPS DSP control register are now + treated as global. Previous versions of GCC treated these fields as + call-clobbered instead. + * The MIPS port no longer recognizes the h asm constraint. It was + necessary to remove this constraint in order to avoid generating + unpredictable code sequences. + One of the main uses of the h constraint was to extract the high + part of a multiplication on 64-bit targets. For example: + asm ("dmultu\t%1,%2" : "=h" (result) : "r" (x), "r" (y)); + You can now achieve the same effect using 128-bit types: + typedef unsigned int uint128_t __attribute__((mode(TI))); + result = ((uint128_t) x * y) >> 64; + The second sequence is better in many ways. For example, if x and y + are constants, the compiler can perform the multiplication at + compile time. If x and y are not constants, the compiler can + schedule the runtime multiplication better than it can schedule an + asm statement. + * Support for a number of older systems and recently unmaintained or + untested target ports of GCC has been declared obsolete in GCC 4.4. + Unless there is activity to revive them, the next release of GCC + will have their sources permanently removed. + The following ports for individual systems on particular + architectures have been obsoleted: + + Generic a.out on IA32 and m68k (i[34567]86-*-aout*, + m68k-*-aout*) + + Generic COFF on ARM, H8300, IA32, m68k and SH (arm-*-coff*, + armel-*-coff*, h8300-*-*, i[34567]86-*-coff*, m68k-*-coff*, + sh-*-*). This does not affect other more specific targets + using the COFF object format on those architectures, or the + more specific H8300 and SH targets (h8300-*-rtems*, + h8300-*-elf*, sh-*-elf*, sh-*-symbianelf*, sh-*-linux*, + sh-*-netbsdelf*, sh-*-rtems*, sh-wrs-vxworks). + + 2BSD on PDP-11 (pdp11-*-bsd) + + AIX 4.1 and 4.2 on PowerPC (rs6000-ibm-aix4.[12]*, + powerpc-ibm-aix4.[12]*) + + Tuning support for Itanium1 (Merced) variants. Note that code + tuned for Itanium2 should also run correctly on Itanium1. + * The protoize and unprotoize utilities have been obsoleted and will + be removed in GCC 4.5. These utilities have not been installed by + default since GCC 3.0. + * Support has been removed for all the [2]configurations obsoleted in + GCC 4.3. + * Unknown -Wno-* options are now silently ignored by GCC if no other + diagnostics are issued. If other diagnostics are issued, then GCC + warns about the unknown options. + * More information on porting to GCC 4.4 from previous versions of + GCC can be found in the [3]porting guide for this release. + +General Optimizer Improvements + + * A new command-line switch -findirect-inlining has been added. When + turned on it allows the inliner to also inline indirect calls that + are discovered to have known targets at compile time thanks to + previous inlining. + * A new command-line switch -ftree-switch-conversion has been added. + This new pass turns simple initializations of scalar variables in + switch statements into initializations from a static array, given + that all the values are known at compile time and the ratio between + the new array size and the original switch branches does not exceed + the parameter --param switch-conversion-max-branch-ratio (default + is eight). + * A new command-line switch -ftree-builtin-call-dce has been added. + This optimization eliminates unnecessary calls to certain builtin + functions when the return value is not used, in cases where the + calls can not be eliminated entirely because the function may set + errno. This optimization is on by default at -O2 and above. + * A new command-line switch -fconserve-stack directs the compiler to + minimize stack usage even if it makes the generated code slower. + This affects inlining decisions. + * When the assembler supports it, the compiler will now emit unwind + information using assembler .cfi directives. This makes it possible + to use such directives in inline assembler code. The new option + -fno-dwarf2-cfi-asm directs the compiler to not use .cfi + directives. + * The [4]Graphite branch has been merged. This merge has brought in a + new framework for loop optimizations based on a polyhedral + intermediate representation. These optimizations apply to all the + languages supported by GCC. The following new code transformations + are available in GCC 4.4: + + -floop-interchange performs loop interchange transformations + on loops. Interchanging two nested loops switches the inner + and outer loops. For example, given a loop like: + DO J = 1, M + DO I = 1, N + A(J, I) = A(J, I) * C + ENDDO + ENDDO + + loop interchange will transform the loop as if the user had + written: + DO I = 1, N + DO J = 1, M + A(J, I) = A(J, I) * C + ENDDO + ENDDO + + which can be beneficial when N is larger than the caches, + because in Fortran, the elements of an array are stored in + memory contiguously by column, and the original loop iterates + over rows, potentially creating at each access a cache miss. + + -floop-strip-mine performs loop strip mining transformations + on loops. Strip mining splits a loop into two nested loops. + The outer loop has strides equal to the strip size and the + inner loop has strides of the original loop within a strip. + For example, given a loop like: + DO I = 1, N + A(I) = A(I) + C + ENDDO + + loop strip mining will transform the loop as if the user had + written: + DO II = 1, N, 4 + DO I = II, min (II + 3, N) + A(I) = A(I) + C + ENDDO + ENDDO + + + -floop-block performs loop blocking transformations on loops. + Blocking strip mines each loop in the loop nest such that the + memory accesses of the element loops fit inside caches. For + example, given a loop like: + DO I = 1, N + DO J = 1, M + A(J, I) = B(I) + C(J) + ENDDO + ENDDO + + loop blocking will transform the loop as if the user had + written: + DO II = 1, N, 64 + DO JJ = 1, M, 64 + DO I = II, min (II + 63, N) + DO J = JJ, min (JJ + 63, M) + A(J, I) = B(I) + C(J) + ENDDO + ENDDO + ENDDO + ENDDO + + which can be beneficial when M is larger than the caches, + because the innermost loop will iterate over a smaller amount + of data that can be kept in the caches. + * A new register allocator has replaced the old one. It is called + integrated register allocator (IRA) because coalescing, register + live range splitting, and hard register preferencing are done + on-the-fly during coloring. It also has better integration with the + reload pass. IRA is a regional register allocator which uses modern + Chaitin-Briggs coloring instead of Chow's priority coloring used in + the old register allocator. More info about IRA internals and + options can be found in the GCC manuals. + * A new instruction scheduler and software pipeliner, based on the + selective scheduling approach, has been added. The new pass + performs instruction unification, register renaming, substitution + through register copies, and speculation during scheduling. The + software pipeliner is able to pipeline non-countable loops. The new + pass is targeted at scheduling-eager in-order platforms. In GCC 4.4 + it is available for the Intel Itanium platform working by default + as the second scheduling pass (after register allocation) at the + -O3 optimization level. + * When using -fprofile-generate with a multi-threaded program, the + profile counts may be slightly wrong due to race conditions. The + new -fprofile-correction option directs the compiler to apply + heuristics to smooth out the inconsistencies. By default the + compiler will give an error message when it finds an inconsistent + profile. + * The new -fprofile-dir=PATH option permits setting the directory + where profile data files are stored when using -fprofile-generate + and friends, and the directory used when reading profile data files + using -fprofile-use and friends. + +New warning options + + * The new -Wframe-larger-than=NUMBER option directs GCC to emit a + warning if any stack frame is larger than NUMBER bytes. This may be + used to help ensure that code fits within a limited amount of stack + space. + * The command-line option -Wlarger-than-N is now written as + -Wlarger-than=N and the old form is deprecated. + * The new -Wno-mudflap option disables warnings about constructs + which can not be instrumented when using -fmudflap. + +New Languages and Language specific improvements + + * Version 3.0 of the OpenMP specification is now supported for the C, + C++, and Fortran compilers. + * New character data types, per [5]TR 19769: New character types in + C, are now supported for the C compiler in -std=gnu99 mode, as + __CHAR16_TYPE__ and __CHAR32_TYPE__, and for the C++ compiler in + -std=c++0x and -std=gnu++0x modes, as char16_t and char32_t too. + + C family + + * A new optimize attribute was added to allow programmers to change + the optimization level and particular optimization options for an + individual function. You can also change the optimization options + via the GCC optimize pragma for functions defined after the pragma. + The GCC push_options pragma and the GCC pop_options pragma allow + you temporarily save and restore the options used. The GCC + reset_options pragma restores the options to what was specified on + the command line. + * Uninitialized warnings do not require enabling optimization + anymore, that is, -Wuninitialized can be used together with -O0. + Nonetheless, the warnings given by -Wuninitialized will probably be + more accurate if optimization is enabled. + * -Wparentheses now warns about expressions such as (!x | y) and (!x + & y). Using explicit parentheses, such as in ((!x) | y), silences + this warning. + * -Wsequence-point now warns within if, while,do while and for + conditions, and within for begin/end expressions. + * A new option -dU is available to dump definitions of preprocessor + macros that are tested or expanded. + + C++ + + * [6]Improved experimental support for the upcoming ISO C++ standard, + C++0x. Including support for auto, inline namespaces, generalized + initializer lists, defaulted and deleted functions, new character + types, and scoped enums. + * Those errors that may be downgraded to warnings to build legacy + code now mention -fpermissive when -fdiagnostics-show-option is + enabled. + * -Wconversion now warns if the result of a static_cast to enumeral + type is unspecified because the value is outside the range of the + enumeral type. + * -Wuninitialized now warns if a non-static reference or non-static + const member appears in a class without constructors. + * G++ now properly implements value-initialization, so objects with + an initializer of () and an implicitly defined default constructor + will be zero-initialized before the default constructor is called. + + Runtime Library (libstdc++) + + * Improved experimental support for the upcoming ISO C++ standard, + C++0x, including: + + Support for , , , + , , , , + , and . + + unique_ptr, additions, exception propagation, and + support for the new character types in and . + + Existing facilities now exploit initializer lists, defaulted + and deleted functions, and the newly implemented core C++0x + features. + + Some standard containers are more efficient together with + stateful allocators, i.e., no allocator is constructed on the + fly at element construction time. + * Experimental support for non-standard pointer types in containers. + * The long standing libstdc++/30928 has been fixed for targets + running glibc 2.10 or later. + * As usual, many small and larger bug fixes, in particular quite a + few corner cases in . + + Fortran + + * GNU Fortran now employs libcpp directly instead of using cc1 as an + external preprocessor. The [7]-cpp option was added to allow manual + invocation of the preprocessor without relying on filename + extensions. + * The [8]-Warray-temporaries option warns about array temporaries + generated by the compiler, as an aid to optimization. + * The [9]-fcheck-array-temporaries option has been added, printing a + notification at run time, when an array temporary had to be created + for an function argument. Contrary to -Warray-temporaries the + warning is only printed if the array is noncontiguous. + * Improved generation of DWARF debugging symbols + * If using an intrinsic not part of the selected standard (via -std= + and -fall-intrinsics) gfortran will now treat it as if this + procedure were declared EXTERNAL and try to link to a user-supplied + procedure. -Wintrinsics-std will warn whenever this happens. The + now-useless option -Wnonstd-intrinsic was removed. + * The flag -falign-commons has been added to control the alignment of + variables in COMMON blocks, which is enabled by default in line + with previous GCC version. Using -fno-align-commons one can force + commons to be contiguous in memory as required by the Fortran + standard, however, this slows down the memory access. The option + -Walign-commons, which is enabled by default, warns when padding + bytes were added for alignment. The proper solution is to sort the + common objects by decreasing storage size, which avoids the + alignment problems. + * Fortran 2003 support has been extended: + + Wide characters (ISO 10646, UCS-4, kind=4) and UTF-8 I/O is + now supported (except internal reads from/writes to wide + strings). [10]-fbackslash now supports also \unnnn and + \Unnnnnnnn to enter Unicode characters. + + Asynchronous I/O (implemented as synchronous I/O) and the + decimal=, size=, sign=, pad=, blank=, and delim= specifiers + are now supported in I/O statements. + + Support for Fortran 2003 structure constructors and for array + constructor with typespec has been added. + + Procedure Pointers (but not yet as component in derived types + and as function results) are now supported. + + Abstract types, type extension, and type-bound procedures + (both PROCEDURE and GENERIC but not as operators). Note: As + CLASS/polymorphyic types are not implemented, type-bound + procedures with PASS accept as non-standard extension TYPE + arguments. + * Fortran 2008 support has been added: + + The -std=f2008 option and support for the file extensions + .f2008 and .F2008 has been added. + + The g0 format descriptor is now supported. + + The Fortran 2008 mathematical intrinsics ASINH, ACOSH, ATANH, + ERF, ERFC, GAMMA, LOG_GAMMA, BESSEL_*, HYPOT, and ERFC_SCALED + are now available (some of them existed as GNU extension + before). Note: The hyperbolic functions are not yet supporting + complex arguments and the three- argument version of BESSEL_*N + is not available. + + The bit intrinsics LEADZ and TRAILZ have been added. + + Java (GCJ) + + Ada + + * The Ada runtime now supports multilibs on many platforms including + x86_64, SPARC and PowerPC. Their build is enabled by default. + +[11]New Targets and Target Specific Improvements + + ARM + + * GCC now supports optimizing for the Cortex-A9, Cortex-R4 and + Cortex-R4F processors and has many other improvements to + optimization for ARM processors. + * GCC now supports the VFPv3 variant with 16 double-precision + registers with -mfpu=vfpv3-d16. The option -mfpu=vfp3 has been + renamed to -mfpu=vfpv3. + * GCC now supports the -mfix-cortex-m3-ldrd option to work around an + erratum on Cortex-M3 processors. + * GCC now supports the __sync_* atomic operations for ARM EABI + GNU/Linux. + * The section anchors optimization is now enabled by default when + optimizing for ARM. + * GCC now uses a new EABI-compatible profiling interface for EABI + targets. This requires a function __gnu_mcount_nc, which is + provided by GNU libc versions 2.8 and later. + + AVR + + * The -mno-tablejump option has been deprecated because it has the + same effect as the -fno-jump-tables option. + * Added support for these new AVR devices: + + ATA6289 + + ATtiny13A + + ATtiny87 + + ATtiny167 + + ATtiny327 + + ATmega8C1 + + ATmega16C1 + + ATmega32C1 + + ATmega8M1 + + ATmega16M1 + + ATmega32M1 + + ATmega32U4 + + ATmega16HVB + + ATmega4HVD + + ATmega8HVD + + ATmega64C1 + + ATmega64M1 + + ATmega16U4 + + ATmega32U6 + + ATmega128RFA1 + + AT90PWM81 + + AT90SCR100 + + M3000F + + M3000S + + M3001B + + IA-32/x86-64 + + * Support for Intel AES built-in functions and code generation is + available via -maes. + * Support for Intel PCLMUL built-in function and code generation is + available via -mpclmul. + * Support for Intel AVX built-in functions and code generation is + available via -mavx. + * Automatically align the stack for local variables with alignment + requirement. + * GCC can now utilize the SVML library for vectorizing calls to a set + of C99 functions if -mveclibabi=svml is specified and you link to + an SVML ABI compatible library. + * On x86-64, the ABI has been changed in the following cases to + conform to the x86-64 ABI: + + Passing/returning structures with flexible array member: + struct foo + { + int i; + int flex[]; + }; + + Passing/returning structures with complex float member: + struct foo + { + int i; + __complex__ float f; + }; + + Passing/returning unions with long double member: + union foo + { + int x; + long double ld; + }; + Code built with previous versions of GCC that uses any of these is + not compatible with code built with GCC 4.4.0 or later. + * A new target attribute was added to allow programmers to change the + target options like -msse2 or -march=k8 for an individual function. + You can also change the target options via the GCC target pragma + for functions defined after the pragma. + * GCC can now be configured with options --with-arch-32, + --with-arch-64, --with-cpu-32, --with-cpu-64, --with-tune-32 and + --with-tune-64 to control the default optimization separately for + 32-bit and 64-bit modes. + + IA-32/IA64 + + * Support for __float128 (TFmode) IEEE quad type and corresponding + TCmode IEEE complex quad type is available via the soft-fp library + on IA-32/IA64 targets. This includes basic arithmetic operations + (addition, subtraction, negation, multiplication and division) on + __float128 real and TCmode complex values, the full set of IEEE + comparisons between __float128 values, conversions to and from + float, double and long double floating point types, as well as + conversions to and from signed or unsigned integer, signed or + unsigned long integer and signed or unsigned quad (TImode, IA64 + only) integer types. Additionally, all operations generate the full + set of IEEE exceptions and support the full set of IEEE rounding + modes. + + M68K/ColdFire + + * GCC now supports instruction scheduling for ColdFire V1, V3 and V4 + processors. (Scheduling support for ColdFire V2 processors was + added in GCC 4.3.) + * GCC now supports the -mxgot option to support programs requiring + many GOT entries on ColdFire. + * The m68k-*-linux-gnu target now builds multilibs by default. + + MIPS + + * MIPS Technologies have extended the original MIPS SVR4 ABI to + include support for procedure linkage tables (PLTs) and copy + relocations. These extensions allow GNU/Linux executables to use a + significantly more efficient code model than the one defined by the + original ABI. + GCC support for this code model is available via a new command-line + option, -mplt. There is also a new configure-time option, + --with-mips-plt, to make -mplt the default. + The new code model requires support from the assembler, the linker, + and the runtime C library. This support is available in binutils + 2.19 and GLIBC 2.9. + * GCC can now generate MIPS16 code for 32-bit GNU/Linux executables + and 32-bit GNU/Linux shared libraries. This feature requires GNU + binutils 2.19 or above. + * Support for RMI's XLR processor is now available through the + -march=xlr and -mtune=xlr options. + * 64-bit targets can now perform 128-bit multiplications inline, + instead of relying on a libgcc function. + * Native GNU/Linux toolchains now support -march=native and + -mtune=native, which select the host processor. + * GCC now supports the R10K, R12K, R14K and R16K processors. The + canonical -march= and -mtune= names for these processors are + r10000, r12000, r14000 and r16000 respectively. + * GCC can now work around the side effects of speculative execution + on R10K processors. Please see the documentation of the + -mr10k-cache-barrier option for details. + * Support for the MIPS64 Release 2 instruction set has been added. + The option -march=mips64r2 enables generation of these + instructions. + * GCC now supports Cavium Networks' Octeon processor. This support is + available through the -march=octeon and -mtune=octeon options. + * GCC now supports STMicroelectronics' Loongson 2E/2F processors. The + canonical -march= and -mtune= names for these processors are + loongson2e and loongson2f. + + [12]picochip + + Picochip is a 16-bit processor. A typical picoChip contains over 250 + small cores, each with small amounts of memory. There are three + processor variants (STAN, MEM and CTRL) with different instruction sets + and memory configurations and they can be chosen using the -mae option. + + This port is intended to be a "C" only port. + + Power Architecture and PowerPC + + * GCC now supports the e300c2, e300c3 and e500mc processors. + * GCC now supports Xilinx processors with a single-precision FPU. + * Decimal floating point is now supported for e500 processors. + + S/390, zSeries and System z9/z10 + + * Support for the IBM System z10 EC/BC processor has been added. When + using the -march=z10 option, the compiler will generate code making + use of instructions provided by the General-Instruction-Extension + Facility and the Execute-Extension Facility. + + VxWorks + + * GCC now supports the thread-local storage mechanism used on + VxWorks. + + Xtensa + + * GCC now supports thread-local storage (TLS) for Xtensa processor + configurations that include the Thread Pointer option. TLS also + requires support from the assembler and linker; this support is + provided in the GNU binutils beginning with version 2.19. + +Documentation improvements + +Other significant improvements + +[13]GCC 4.4.1 + + This is the [14]list of problem reports (PRs) from GCC's bug tracking + system that are known to be fixed in the 4.4.1 release. This list might + not be complete (that is, it is possible that some PRs that have been + fixed are not listed here). + +[15]GCC 4.4.2 + + This is the [16]list of problem reports (PRs) from GCC's bug tracking + system that are known to be fixed in the 4.4.2 release. This list might + not be complete (that is, it is possible that some PRs that have been + fixed are not listed here). + +[17]GCC 4.4.3 + + This is the [18]list of problem reports (PRs) from GCC's bug tracking + system that are known to be fixed in the 4.4.3 release. This list might + not be complete (that is, it is possible that some PRs that have been + fixed are not listed here). + +[19]GCC 4.4.4 + + This is the [20]list of problem reports (PRs) from GCC's bug tracking + system that are known to be fixed in the 4.4.4 release. This list might + not be complete (that is, it is possible that some PRs that have been + fixed are not listed here). + +[21]GCC 4.4.5 + + This is the [22]list of problem reports (PRs) from GCC's bug tracking + system that are known to be fixed in the 4.4.5 release. This list might + not be complete (that is, it is possible that some PRs that have been + fixed are not listed here). + +[23]GCC 4.4.6 + + This is the [24]list of problem reports (PRs) from GCC's bug tracking + system that are known to be fixed in the 4.4.6 release. This list might + not be complete (that is, it is possible that some PRs that have been + fixed are not listed here). + +[25]GCC 4.4.7 + + This is the [26]list of problem reports (PRs) from GCC's bug tracking + system that are known to be fixed in the 4.4.7 release. This list might + not be complete (that is, it is possible that some PRs that have been + fixed are not listed here). + + + For questions related to the use of GCC, please consult these web + pages and the [27]GCC manuals. If that fails, the + [28]gcc-help@gcc.gnu.org mailing list might help. Comments on these + web pages and the development of GCC are welcome on our developer + list at [29]gcc@gcc.gnu.org. All of [30]our lists have public + archives. + + Copyright (C) [31]Free Software Foundation, Inc. Verbatim copying and + distribution of this entire article is permitted in any medium, + provided this notice is preserved. + + These pages are [32]maintained by the GCC team. Last modified + 2025-01-31. + +References + + 1. https://gcc.gnu.org/gcc-4.4/changes.html#4.4.7 + 2. https://gcc.gnu.org/gcc-4.3/changes.html#obsoleted + 3. https://gcc.gnu.org/gcc-4.4/porting_to.html + 4. https://gcc.gnu.org/wiki/Graphite + 5. https://www.open-std.org/jtc1/sc22/wg14/www/docs/n1040.pdf + 6. https://gcc.gnu.org/gcc-4.4/cxx0x_status.html + 7. https://gcc.gnu.org/onlinedocs/gfortran/Preprocessing-Options.html + 8. https://gcc.gnu.org/onlinedocs/gfortran/Error-and-Warning-Options.html#index-g_t_0040code_007bWarray-temporaries_007d-125 + 9. https://gcc.gnu.org/onlinedocs/gfortran/Code-Gen-Options.html#index-g_t_0040code_007bfcheck-array-temporaries_007d-221 + 10. https://gcc.gnu.org/onlinedocs/gfortran/Fortran-Dialect-Options.html#index-g_t_0040code_007bbackslash_007d-34 + 11. https://gcc.gnu.org/gcc-4.4/changes.html#targets + 12. https://gcc.gnu.org/gcc-4.4/changes.html#picochip + 13. https://gcc.gnu.org/gcc-4.4/changes.html#GCC4.4.1 + 14. https://gcc.gnu.org/bugzilla/buglist.cgi?bug_status=RESOLVED&resolution=FIXED&target_milestone=4.4.1 + 15. https://gcc.gnu.org/gcc-4.4/changes.html#GCC4.4.2 + 16. https://gcc.gnu.org/bugzilla/buglist.cgi?bug_status=RESOLVED&resolution=FIXED&target_milestone=4.4.2 + 17. https://gcc.gnu.org/gcc-4.4/changes.html#GCC4.4.3 + 18. https://gcc.gnu.org/bugzilla/buglist.cgi?bug_status=RESOLVED&resolution=FIXED&target_milestone=4.4.3 + 19. https://gcc.gnu.org/gcc-4.4/changes.html#GCC4.4.4 + 20. https://gcc.gnu.org/bugzilla/buglist.cgi?bug_status=RESOLVED&resolution=FIXED&target_milestone=4.4.4 + 21. https://gcc.gnu.org/gcc-4.4/changes.html#GCC4.4.5 + 22. https://gcc.gnu.org/bugzilla/buglist.cgi?bug_status=RESOLVED&resolution=FIXED&target_milestone=4.4.5 + 23. https://gcc.gnu.org/gcc-4.4/changes.html#GCC4.4.6 + 24. https://gcc.gnu.org/bugzilla/buglist.cgi?bug_status=RESOLVED&resolution=FIXED&target_milestone=4.4.6 + 25. https://gcc.gnu.org/gcc-4.4/changes.html#GCC4.4.7 + 26. https://gcc.gnu.org/bugzilla/buglist.cgi?bug_status=RESOLVED&resolution=FIXED&target_milestone=4.4.7 + 27. https://gcc.gnu.org/onlinedocs/ + 28. mailto:gcc-help@gcc.gnu.org + 29. mailto:gcc@gcc.gnu.org + 30. https://gcc.gnu.org/lists.html + 31. https://www.fsf.org/ + 32. https://gcc.gnu.org/about.html +====================================================================== +http://gcc.gnu.org/gcc-4.3/index.html + GCC 4.3 Release Series + + (This release series is no longer supported.) + + Jun 27, 2011 + + The [1]GNU project and the GCC developers are pleased to announce the + release of GCC 4.3.6. + + This release is a bug-fix release, containing fixes for regressions in + GCC 4.3.5 relative to previous releases of GCC. + +Release History + + GCC 4.3.6 + Jun 27, 2011 ([2]changes) + + GCC 4.3.5 + May 22, 2010 ([3]changes) + + GCC 4.3.4 + August 4, 2009 ([4]changes) + + GCC 4.3.3 + January 24, 2009 ([5]changes) + + GCC 4.3.2 + August 27, 2008 ([6]changes) + + GCC 4.3.1 + June 6, 2008 ([7]changes) + + GCC 4.3.0 + March 5, 2008 ([8]changes) + +References and Acknowledgements + + GCC used to stand for the GNU C Compiler, but since the compiler + supports several other languages aside from C, it now stands for the + GNU Compiler Collection. + + A list of [9]successful builds is updated as new information becomes + available. + + The GCC developers would like to thank the numerous people that have + contributed new features, improvements, bug fixes, and other changes as + well as test results to GCC. This [10]amazing group of volunteers is + what makes GCC successful. + + For additional information about GCC please refer to the [11]GCC + project web site or contact the [12]GCC development mailing list. + + To obtain GCC please use [13]our mirror sites or [14]our version + control system. + + + For questions related to the use of GCC, please consult these web + pages and the [15]GCC manuals. If that fails, the + [16]gcc-help@gcc.gnu.org mailing list might help. Comments on these + web pages and the development of GCC are welcome on our developer + list at [17]gcc@gcc.gnu.org. All of [18]our lists have public + archives. + + Copyright (C) [19]Free Software Foundation, Inc. Verbatim copying and + distribution of this entire article is permitted in any medium, + provided this notice is preserved. + + These pages are [20]maintained by the GCC team. Last modified + 2022-10-26. + +References + + 1. http://www.gnu.org/ + 2. https://gcc.gnu.org/gcc-4.3/changes.html + 3. https://gcc.gnu.org/gcc-4.3/changes.html + 4. https://gcc.gnu.org/gcc-4.3/changes.html + 5. https://gcc.gnu.org/gcc-4.3/changes.html + 6. https://gcc.gnu.org/gcc-4.3/changes.html + 7. https://gcc.gnu.org/gcc-4.3/changes.html + 8. https://gcc.gnu.org/gcc-4.3/changes.html + 9. https://gcc.gnu.org/gcc-4.3/buildstat.html + 10. https://gcc.gnu.org/onlinedocs/gcc/Contributors.html + 11. https://gcc.gnu.org/index.html + 12. mailto:gcc@gcc.gnu.org + 13. https://gcc.gnu.org/mirrors.html + 14. https://gcc.gnu.org/git.html + 15. https://gcc.gnu.org/onlinedocs/ + 16. mailto:gcc-help@gcc.gnu.org + 17. mailto:gcc@gcc.gnu.org + 18. https://gcc.gnu.org/lists.html + 19. https://www.fsf.org/ + 20. https://gcc.gnu.org/about.html +====================================================================== +http://gcc.gnu.org/gcc-4.3/changes.html + GCC 4.3 Release Series + Changes, New Features, and Fixes + + The latest release in the 4.3 release series is [1]GCC 4.3.5. + +Caveats + + * GCC requires the [2]GMP and [3]MPFR libraries for building all the + various front-end languages it supports. See the [4]prerequisites + page for version requirements. + * ColdFire targets now treat long double as having the same format as + double. In earlier versions of GCC, they used the 68881 long double + format instead. + * The m68k-uclinux target now uses the same calling conventions as + m68k-linux-gnu. You can select the original calling conventions by + configuring for m68k-uclinuxoldabi instead. Note that + m68k-uclinuxoldabi also retains the original 80-bit long double on + ColdFire targets. + * The -fforce-mem option has been removed because it has had no + effect in the last few GCC releases. + * The i386 -msvr3-shlib option has been removed since it is no longer + used. + * Fastcall for i386 has been changed not to pass aggregate arguments + in registers, following Microsoft compilers. + * Support for the AOF assembler has been removed from the ARM back + end; this affects only the targets arm-semi-aof and armel-semi-aof, + which are no longer recognized. We removed these targets without a + deprecation period because we discovered that they have been + unusable since GCC 4.0.0. + * Support for the TMS320C3x/C4x processor (targets c4x-* and tic4x-*) + has been removed. This support had been deprecated since GCC 4.0.0. + * Support for a number of older systems and recently unmaintained or + untested target ports of GCC has been declared obsolete in GCC 4.3. + Unless there is activity to revive them, the next release of GCC + will have their sources permanently removed. + All GCC ports for the following processor architectures have been + declared obsolete: + + Morpho MT (mt-*) + The following aliases for processor architectures have been + declared obsolete. Users should use the indicated generic target + names instead, with compile-time options such as -mcpu or + configure-time options such as --with-cpu to control the + configuration more precisely. + + strongarm*-*-*, ep9312*-*-*, xscale*-*-* (use arm*-*-* + instead). + + parisc*-*-* (use hppa*-*-* instead). + + m680[012]0-*-* (use m68k-*-* instead). + All GCC ports for the following operating systems have been + declared obsolete: + + BeOS (*-*-beos*) + + kaOS (*-*-kaos*) + + GNU/Linux using the a.out object format (*-*-linux*aout*) + + GNU/Linux using version 1 of the GNU C Library + (*-*-linux*libc1*) + + Solaris versions before Solaris 7 (*-*-solaris2.[0-6], + *-*-solaris2.[0-6].*) + + Miscellaneous System V (*-*-sysv*) + + WindISS (*-*-windiss*) + Also, those for some individual systems on particular architectures + have been obsoleted: + + UNICOS/mk on DEC Alpha (alpha*-*-unicosmk*) + + CRIS with a.out object format (cris-*-aout) + + BSD 4.3 on PA-RISC (hppa1.1-*-bsd*) + + OSF/1 on PA-RISC (hppa1.1-*-osf*) + + PRO on PA-RISC (hppa1.1-*-pro*) + + Sequent PTX on IA32 (i[34567]86-sequent-ptx4*, + i[34567]86-sequent-sysv4*) + + SCO Open Server 5 on IA32 (i[34567]86-*-sco3.2v5*) + + UWIN on IA32 (i[34567]86-*-uwin*) (support for UWIN as a host + was previously [5]removed in 2001, leaving only the support + for UWIN as a target now being deprecated) + + ChorusOS on PowerPC (powerpc-*-chorusos*) + + All VAX configurations apart from NetBSD and OpenBSD + (vax-*-bsd*, vax-*-sysv*, vax-*-ultrix*) + * The [6]-Wconversion option has been modified. Its purpose now is to + warn for implicit conversions that may alter a value. This new + behavior is available for both C and C++. Warnings about + conversions between signed and unsigned integers can be disabled by + using -Wno-sign-conversion. In C++, they are disabled by default + unless -Wsign-conversion is explicitly requested. The old behavior + of -Wconversion, that is, warn for prototypes causing a type + conversion that is different from what would happen to the same + argument in the absence of a prototype, has been moved to a new + option -Wtraditional-conversion, which is only available for C. + * The -m386, -m486, -mpentium and -mpentiumpro tuning options have + been removed because they were deprecated for more than 3 GCC major + releases. Use -mtune=i386, -mtune=i486, -mtune=pentium or + -mtune=pentiumpro as a replacement. + * The -funsafe-math-optimizations option now automatically turns on + -fno-trapping-math in addition to -fno-signed-zeros, as it enables + reassociation and thus may introduce or remove traps. + * The -ftree-vectorize option is now on by default under -O3. In + order to generate code for a SIMD extension, it has to be enabled + as well: use -maltivec for PowerPC platforms and -msse/-msse2 for + i?86 and x86_64. + * More information on porting to GCC 4.3 from previous versions of + GCC can be found in the [7]porting guide for this release. + +General Optimizer Improvements + + * The GCC middle-end has been integrated with the MPFR library. This + allows GCC to evaluate and replace at compile-time calls to + built-in math functions having constant arguments with their + mathematically equivalent results. In making use of MPFR, GCC can + generate correct results regardless of the math library + implementation or floating point precision of the host platform. + This also allows GCC to generate identical results regardless of + whether one compiles in native or cross-compile configurations to a + particular target. The following built-in functions take advantage + of this new capability: acos, acosh, asin, asinh, atan2, atan, + atanh, cbrt, cos, cosh, drem, erf, erfc, exp10, exp2, exp, expm1, + fdim, fma, fmax, fmin, gamma_r, hypot, j0, j1, jn, lgamma_r, log10, + log1p, log2, log, pow10, pow, remainder, remquo, sin, sincos, sinh, + tan, tanh, tgamma, y0, y1 and yn. The float and long double + variants of these functions (e.g. sinf and sinl) are also handled. + The sqrt and cabs functions with constant arguments were already + optimized in prior GCC releases. Now they also use MPFR. + * A new forward propagation pass on RTL was added. The new pass + replaces several slower transformations, resulting in compile-time + improvements as well as better code generation in some cases. + * A new command-line switch -frecord-gcc-switches has been added to + GCC, although it is only enabled for some targets. The switch + causes the command line that was used to invoke the compiler to be + recorded into the object file that is being created. The exact + format of this recording is target and binary file format + dependent, but it usually takes the form of a note section + containing ASCII text. The switch is related to the -fverbose-asm + switch, but that one only records the information in the assembler + output file as comments, so the information never reaches the + object file. + * The inliner heuristic is now aware of stack frame consumption. New + command-line parameters --param large-stack-frame and --param + large-stack-frame-growth can be used to limit stack frame size + growth caused by inlining. + * During feedback directed optimizations, the expected block size the + memcpy, memset and bzero functions operate on is discovered and for + cases of commonly used small sizes, specialized inline code is + generated. + * __builtin_expect no longer requires its argument to be a compile + time constant. + * Interprocedural optimization was reorganized to work on functions + in SSA form. This enables more precise and cheaper dataflow + analysis and makes writing interprocedural optimizations easier. + The following improvements have been implemented on top of this + framework: + + Pre-inline optimization: Selected local optimization passes + are run before the inliner (and other interprocedural passes) + are executed. This significantly improves the accuracy of code + growth estimates used by the inliner and reduces the overall + memory footprint for large compilation units. + + Early inlining (a simple bottom-up inliner pass inlining only + functions whose body is smaller than the expected call + overhead) is now executed with the early optimization passes, + thus inlining already optimized function bodies into an + unoptimized function that is subsequently optimized by early + optimizers. This enables the compiler to quickly eliminate + abstraction penalty in C++ programs. + + Interprocedural constant propagation now operate on SSA form + increasing accuracy of the analysis. + * A new internal representation for GIMPLE statements has been + contributed, resulting in compile-time memory savings. + * The vectorizer was enhanced to support vectorization of outer + loops, intra-iteration parallelism (loop-aware SLP), vectorization + of strided accesses and loops with multiple data-types. Run-time + dependency testing using loop versioning was added. The cost model, + turned on by -fvect-cost-model, was developed. + +New Languages and Language specific improvements + + * We have added new command-line options + -finstrument-functions-exclude-function-list and + -finstrument-functions-exclude-file-list. They provide more control + over which functions are annotated by the -finstrument-functions + option. + + C family + + * Implicit conversions between generic vector types are now only + permitted when the two vectors in question have the same number of + elements and compatible element types. (Note that the restriction + involves compatible element types, not implicitly-convertible + element types: thus, a vector type with element type int may not be + implicitly converted to a vector type with element type unsigned + int.) This restriction, which is in line with specifications for + SIMD architectures such as AltiVec, may be relaxed using the flag + -flax-vector-conversions. This flag is intended only as a + compatibility measure and should not be used for new code. + * -Warray-bounds has been added and is now enabled by default for + -Wall . It produces warnings for array subscripts that can be + determined at compile time to be always out of bounds. + -Wno-array-bounds will disable the warning. + * The constructor and destructor function attributes now accept + optional priority arguments which control the order in which the + constructor and destructor functions are run. + * New [8]command-line options -Wtype-limits, -Wold-style-declaration, + -Wmissing-parameter-type, -Wempty-body, -Wclobbered and + -Wignored-qualifiers have been added for finer control of the + diverse warnings enabled by -Wextra. + * A new function attribute alloc_size has been added to mark up + malloc style functions. For constant sized allocations this can be + used to find out the size of the returned pointer using the + __builtin_object_size() function for buffer overflow checking and + similar. This supplements the already built-in malloc and calloc + constant size handling. + * Integer constants written in binary are now supported as a GCC + extension. They consist of a prefix 0b or 0B, followed by a + sequence of 0 and 1 digits. + * A new predefined macro __COUNTER__ has been added. It expands to + sequential integral values starting from 0. In conjunction with the + ## operator, this provides a convenient means to generate unique + identifiers. + * A new command-line option -fdirectives-only has been added. It + enables a special preprocessing mode which improves the performance + of applications like distcc and ccache. + * Fixed-point data types and operators have been added. They are + based on Chapter 4 of the Embedded-C specification (n1169.pdf). + Currently, only MIPS targets are supported. + * Decimal floating-point arithmetic based on draft ISO/IEC TR 24732, + N1241, is now supported as a GCC extension to C for targets + i[34567]86-*-linux-gnu, powerpc*-*-linux-gnu, s390*-ibm-linux-gnu, + and x86_64-*-linux-gnu. The feature introduces new data types + _Decimal32, _Decimal64, and _Decimal128 with constant suffixes DF, + DD, and DL. + + C++ + + * [9]Experimental support for the upcoming ISO C++ standard, C++0x. + * -Wc++0x-compat has been added and is now enabled by default for + -Wall. It produces warnings for constructs whose meaning differs + between ISO C++ 1998 and C++0x. + * The -Wparentheses option now works for C++ as it does for C. It + warns if parentheses are omitted when operators with confusing + precedence are nested. It also warns about ambiguous else + statements. Since -Wparentheses is enabled by -Wall, this may cause + additional warnings with existing C++ code which uses -Wall. These + new warnings may be disabled by using -Wall -Wno-parentheses. + * The -Wmissing-declarations now works for C++ as it does for C. + * The -fvisibility-ms-compat flag was added, to make it easier to + port larger projects using shared libraries from Microsoft's Visual + Studio to ELF and Mach-O systems. + * C++ attribute handling has been overhauled for template arguments + (ie dependent types). In particular, __attribute__((aligned(T))); + works for C++ types. + + Runtime Library (libstdc++) + + * [10]Experimental support for the upcoming ISO C++ standard, C++0x. + * Support for TR1 mathematical special functions and regular + expressions. + * Default what implementations give more elaborate exception strings + for bad_cast, bad_typeid, bad_exception, and bad_alloc. + * Header dependencies have been streamlined, reducing unnecessary + includes and pre-processed bloat. + * Variadic template implementations of items in and + . + * An experimental [11]parallel mode has been added. This is a + parallel implementation of many C++ Standard library algorithms, + like std::accumulate, std::for_each, std::transform, or std::sort, + to give but four examples. These algorithms can be substituted for + the normal (sequential) libstdc++ algorithms on a piecemeal basis, + or all existing algorithms can be transformed via the + -D_GLIBCXX_PARALLEL macro. + * Debug mode versions of classes in and + . + * Formal deprecation of and , which are + now and . This code: + #include + __gnu_cxx::hash_set s; + + Can be transformed (in order of preference) to: + #include + std::tr1::unordered_set s; + + or + #include + __gnu_cxx::hash_set s; + + Similar transformations apply to __gnu_cxx::hash_map, + __gnu_cxx::hash_multimap, __gnu_cxx::hash_set, + __gnu_cxx::hash_multiset. + + Fortran + + * Due to the fact that the GMP and MPFR libraries are required for + all languages, Fortran is no longer special in this regard and is + available by default. + * The [12]-fexternal-blas option has been added, which generates + calls to BLAS routines for intrinsic matrix operations such as + matmul rather than using the built-in algorithms. + * Support to give a backtrace (compiler flag -fbacktrace or + environment variable GFORTRAN_ERROR_BACKTRACE; on glibc systems + only) or a core dump (-fdump-core, GFORTRAN_ERROR_DUMPCORE) when a + run-time error occured. + * GNU Fortran now defines __GFORTRAN__ when it runs the C + preprocessor (CPP). + * The [13]-finit-local-zero, -finit-real, -finit-integer, + -finit-character, and -finit-logical options have been added, which + can be used to initialize local variables. + * The intrinsic procedures [14]GAMMA and [15]LGAMMA have been added, + which calculate the Gamma function and its logarithm. Use EXTERNAL + gamma if you want to use your own gamma function. + * GNU Fortran now regards the backslash character as literal (as + required by the Fortran 2003 standard); using [16]-fbackslash GNU + Fortran interprets backslashes as C-style escape characters. + * The [17]interpretation of binary, octal and hexadecimal (BOZ) + literal constants has been changed. Before they were always + interpreted as integer; now they are bit-wise transferred as + argument of INT, REAL, DBLE and CMPLX as required by the Fortran + 2003 standard, and for real and complex variables in DATA + statements or when directly assigned to real and complex variables. + Everywhere else and especially in expressions they are still + regarded as integer constants. + * Fortran 2003 support has been extended: + + Intrinsic statements IMPORT, PROTECTED, VALUE and VOLATILE + + Pointer intent + + Intrinsic module ISO_ENV_FORTRAN + + Interoperability with C (ISO C Bindings) + + ABSTRACT INTERFACES and PROCEDURE statements (without POINTER + attribute) + + Fortran 2003 BOZ + + Java (GCJ) + + * GCJ now uses the Eclipse Java compiler for its Java parsing needs. + This enables the use of all 1.5 language features, and fixes most + existing front end bugs. + * libgcj now supports all 1.5 language features which require runtime + support: foreach, enum, annotations, generics, and auto-boxing. + * We've made many changes to the tools shipped with gcj. + + The old jv-scan tool has been removed. This tool never really + worked properly. There is no replacement. + + gcjh has been rewritten. Some of its more obscure options no + longer work, but are still recognized in an attempt at + compatibility. gjavah is a new program with similar + functionality but different command-line options. + + grmic and grmiregistry have been rewritten. grmid has been + added. + + gjar replaces the old fastjar. + + gjarsigner (used for signing jars), gkeytool (used for key + management), gorbd (for CORBA), gserialver (computes + serialization UIDs), and gtnameserv (also for CORBA) are now + installed. + * The ability to dump the contents of the java run time heap to a + file for off-line analysis has been added. The heap dumps may be + analyzed with the new gc-analyze tool. They may be generated on + out-of-memory conditions or on demand and are controlled by the new + run time class gnu.gcj.util.GCInfo. + * java.util.TimeZone can now read files from /usr/share/zoneinfo to + provide correct, updated, timezone information. This means that + packagers no longer have to update libgcj when a time zone change + is published. + +[18]New Targets and Target Specific Improvements + + IA-32/x86-64 + + * Tuning for Intel Core 2 processors is available via -mtune=core2 + and -march=core2. + * Tuning for AMD Geode processors is available via -mtune=geode and + -march=geode. + * Code generation of block move (memcpy) and block set (memset) was + rewritten. GCC can now pick the best algorithm (loop, unrolled + loop, instruction with rep prefix or a library call) based on the + size of the block being copied and the CPU being optimized for. A + new option -minline-stringops-dynamically has been added. With this + option string operations of unknown size are expanded such that + small blocks are copied by in-line code, while for large blocks a + library call is used. This results in faster code than + -minline-all-stringops when the library implementation is capable + of using cache hierarchy hints. The heuristic choosing the + particular algorithm can be overwritten via -mstringop-strategy. + Newly also memset of values different from 0 is inlined. + * GCC no longer places the cld instruction before string operations. + Both i386 and x86-64 ABI documents mandate the direction flag to be + clear at the entry of a function. It is now invalid to set the flag + in asm statement without reseting it afterward. + * Support for SSSE3 built-in functions and code generation are + available via -mssse3. + * Support for SSE4.1 built-in functions and code generation are + available via -msse4.1. + * Support for SSE4.2 built-in functions and code generation are + available via -msse4.2. + * Both SSE4.1 and SSE4.2 support can be enabled via -msse4. + * A new set of options -mpc32, -mpc64 and -mpc80 have been added to + allow explicit control of x87 floating point precision. + * Support for __float128 (TFmode) IEEE quad type and corresponding + TCmode IEEE complex quad type is available via the soft-fp library + on x86_64 targets. This includes basic arithmetic operations + (addition, subtraction, negation, multiplication and division) on + __float128 real and TCmode complex values, the full set of IEEE + comparisons between __float128 values, conversions to and from + float, double and long double floating point types, as well as + conversions to and from signed or unsigned integer, signed or + unsigned long integer and signed or unsigned quad (TImode) integer + types. Additionally, all operations generate the full set of IEEE + exceptions and support the full set of IEEE rounding modes. + * GCC can now utilize the ACML library for vectorizing calls to a set + of C99 functions on x86_64 if -mveclibabi=acml is specified and you + link to an ACML ABI compatible library. + + ARM + + * Compiler and Library support for Thumb-2 and the ARMv7 architecture + has been added. + + [19]CRIS + + New features + + * Compiler and Library support for the CRIS v32 architecture, as + found in Axis Communications ETRAX FS and ARTPEC-3 chips, has been + added. + + Configuration changes + + * The cris-*-elf target now includes support for CRIS v32, including + libraries, through the -march=v32 option. + * A new crisv32-*-elf target defaults to generate code for CRIS v32. + * A new crisv32-*-linux* target defaults to generate code for CRIS + v32. + * The cris-*-aout target has been obsoleted. + + Improved support for built-in functions + + * GCC can now use the lz and swapwbr instructions to implement the + __builtin_clz, __builtin_ctz and __builtin_ffs family of functions. + * __builtin_bswap32 is now implemented using the swapwb instruction, + when available. + + [20]m68k and ColdFire + + New features + + * Support for several new ColdFire processors has been added. You can + generate code for them using the new -mcpu option. + * All targets now support ColdFire processors. + * m68k-uclinux targets have improved support for C++ constructors and + destructors, and for shared libraries. + * It is now possible to set breakpoints on the first or last line of + a function, even if there are no statements on that line. + + Optimizations + + * Support for sibling calls has been added. + * More use is now made of the ColdFire mov3q instruction. + * __builtin_clz is now implemented using the ff1 ColdFire + instruction, when available. + * GCC now honors the -m68010 option. 68010 code now uses clr rather + than move to zero volatile memory. + * 68020 targets and above can now use symbol(index.size*scale) + addresses for indexed array accesses. Earlier compilers would + always load the symbol into a base register first. + + Configuration changes + + * All m68k and ColdFire targets now allow the default processor to be + set at configure time using --with-cpu. + * A --with-arch configuration option has been added. This option + allows you to restrict a target to ColdFire or non-ColdFire + processors. + + Preprocessor macros + + * An __mcfv*__ macro is now defined for all ColdFire targets. + (Earlier versions of GCC only defined __mcfv4e__.) + * __mcf_cpu_*, __mcf_family_* and __mcffpu__ macros have been added. + * All targets now define __mc68010 and __mc68010__ when generating + 68010 code. + + Command-line changes + + * New command-line options -march, -mcpu, -mtune and -mhard-float + have been added. These options apply to both m68k and ColdFire + targets. + * -mno-short, -mno-bitfield and -mno-rtd are now accepted as negative + versions of -mshort, etc. + * -fforce-addr has been removed. It is now ignored by the compiler. + + Other improvements + + * ColdFire targets now try to maintain a 4-byte-aligned stack where + possible. + * m68k-uclinux targets now try to avoid situations that lead to the + load-time error: BINFMT_FLAT: reloc outside program. + + MIPS + + Changes to existing configurations + + * libffi and libjava now support all three GNU/Linux ABIs: o32, n32 + and n64. Every GNU/Linux configuration now builds these libraries + by default. + * GNU/Linux configurations now generate -mno-shared code unless + overridden by -fpic, -fPIC, -fpie or -fPIE. + * mipsisa32*-linux-gnu configurations now generate hard-float code by + default, just like other mipsisa32* and mips*-linux-gnu + configurations. You can build a soft-float version of any + mips*-linux-gnu configuration by passing --with-float=soft to + configure. + * mips-wrs-vxworks now supports run-time processes (RTPs). + + Changes to existing command-line options + + * The -march and -mtune options no longer accept 24k as a processor + name. Please use 24kc, 24kf2_1 or 24kf1_1 instead. + * The -march and -mtune options now accept 24kf2_1, 24kef2_1 and + 34kf2_1 as synonyms for 24kf, 24kef and 34kf respectively. The + options also accept 24kf1_1, 24kef1_1 and 34kf1_1 as synonyms for + 24kx, 24kex and 34kx. + + New configurations + + GCC now supports the following configurations: + * mipsisa32r2*-linux-gnu*, which generates MIPS32 revision 2 code by + default. Earlier releases also recognized this configuration, but + they treated it in the same way as mipsisa32*-linux-gnu*. Note that + you can customize any mips*-linux-gnu* configuration to a + particular ISA or processor by passing an appropriate --with-arch + option to configure. + * mipsisa*-sde-elf*, which provides compatibility with MIPS + Technologies' SDE toolchains. The configuration uses the SDE + libraries by default, but you can use it like other newlib-based + ELF configurations by passing --with-newlib to configure. It is the + only configuration besides mips64vr*-elf* to build MIPS16 as well + as non-MIPS16 libraries. + * mipsisa*-elfoabi*, which is similar to the general mipsisa*-elf* + configuration, but uses the o32 and o64 ABIs instead of the 32-bit + and 64-bit forms of the EABI. + + New processors and application-specific extensions + + * Support for the SmartMIPS ASE is available through the new + -msmartmips option. + * Support for revision 2 of the DSP ASE is available through the new + -mdspr2 option. A new preprocessor macro called __mips_dsp_rev + indicates the revision of the ASE in use. + * Support for the 4KS and 74K families of processors is available + through the -march and -mtune options. + + Improved support for built-in functions + + * GCC can now use load-linked, store-conditional and sync + instructions to implement atomic built-in functions such as + __sync_fetch_and_add. The memory reference must be 4 bytes wide for + 32-bit targets and either 4 or 8 bytes wide for 64-bit targets. + * GCC can now use the clz and dclz instructions to implement the + __builtin_ctz and __builtin_ffs families of functions. + * There is a new __builtin___clear_cache function for flushing the + instruction cache. GCC expands this function inline on MIPS32 + revision 2 targets, otherwise it calls the function specified by + -mcache-flush-func. + + MIPS16 improvements + + * GCC can now compile objects that contain a mixture of MIPS16 and + non-MIPS16 code. There are two new attributes, mips16 and nomips16, + for specifying which mode a function should use. + * A new option called -minterlink-mips16 makes non-MIPS16 code + link-compatible with MIPS16 code. + * After many bug fixes, the long-standing MIPS16 -mhard-float support + should now work fairly reliably. + * GCC can now use the MIPS16e save and restore instructions. + * -fsection-anchors now works in MIPS16 mode. MIPS16 code compiled + with -G0 -fsection-anchors is often smaller than code compiled with + -G8. However, please note that you must usually compile all objects + in your application with the same -G option; see the documentation + of -G for details. + * A new option called-mcode-readable specifies which instructions are + allowed to load from the code segment. -mcode-readable=yes is the + default and says that any instruction may load from the code + segment. The other alternatives are -mcode-readable=pcrel, which + says that only PC-relative MIPS16 instructions may load from the + code segment, and -mcode-readable=no, which says that no + instruction may do so. Please see the documentation for more + details, including example uses. + + Small-data improvements + + There are three new options for controlling small data: + * -mno-extern-sdata, which disables small-data accesses for + externally-defined variables. Code compiled with -Gn + -mno-extern-sdata will be link-compatible with any -G setting + between -G0 and -Gn inclusive. + * -mno-local-sdata, which disables the use of small-data sections for + data that is not externally visible. This option can be a useful + way of reducing small-data usage in less performance-critical parts + of an application. + * -mno-gpopt, which disables the use of the $gp register while still + honoring the -G limit when placing externally-visible data. This + option implies -mno-extern-sdata and -mno-local-sdata and it can be + useful in situations where $gp does not necessarily hold the + expected value. + + Miscellaneous improvements + + * There is a new option called -mbranch-cost for tweaking the + perceived cost of branches. + * If GCC is configured to use a version of GAS that supports the + .gnu_attribute directive, it will use that directive to record + certain properties of the output code. .gnu_attribute is new to GAS + 2.18. + * There are two new function attributes, near and far, for overriding + the command-line setting of -mlong-calls on a function-by-function + basis. + * -mfp64, which previously required a 64-bit target, now works with + MIPS32 revision 2 targets as well. The mipsisa*-elfoabi* and + mipsisa*-sde-elf* configurations provide suitable library support. + * GCC now recognizes the -mdmx and -mmt options and passes them down + to the assembler. It does nothing else with the options at present. + + SPU (Synergistic Processor Unit) of the Cell Broadband Engine Architecture + (BEA) + + * Support has been added for this new architecture. + + RS6000 (POWER/PowerPC) + + * Support for the PowerPC 750CL paired-single instructions has been + added with a new powerpc-*-linux*paired* target configuration. It + is enabled by an associated -mpaired option and can be accessed + using new built-in functions. + * Support for auto-detecting architecture and system configuration to + auto-select processor optimization tuning. + * Support for VMX on AIX 5.3 has been added. + * Support for AIX Version 6.1 has been added. + + S/390, zSeries and System z9 + + * Support for the IBM System z9 EC/BC processor (z9 GA3) has been + added. When using the -march=z9-ec option, the compiler will + generate code making use of instructions provided by the decimal + floating point facility and the floating point conversion facility + (pfpo). Besides the instructions used to implement decimal floating + point operations these facilities also contain instructions to move + between general purpose and floating point registers and to modify + and copy the sign-bit of floating point values. + * When the -march=z9-ec option is used the new + -mhard-dfp/-mno-hard-dfp options can be used to specify whether the + decimal floating point hardware instructions will be used or not. + If none of them is given the hardware support is enabled by + default. + * The -mstack-guard option can now be omitted when using stack + checking via -mstack-size in order to let GCC choose a sensible + stack guard value according to the frame size of each function. + * Various changes to improve performance of generated code have been + implemented, including: + + The condition code set by an add logical with carry + instruction is now available for overflow checks like: a + b + + carry < b. + + The test data class instruction is now used to implement + sign-bit and infinity checks of binary and decimal floating + point numbers. + + SPARC + + * Support for the Sun UltraSPARC T2 (Niagara 2) processor has been + added. + + Xtensa + + * Stack unwinding for exception handling now uses by default a + specialized version of DWARF unwinding. This is not + binary-compatible with the setjmp/longjmp (sjlj) unwinding used for + Xtensa with previous versions of GCC. + * For Xtensa processors that include the Conditional Store option, + the built-in functions for atomic memory access are now implemented + using S32C1I instructions. + * If the Xtensa NSA option is available, GCC will use it to implement + the __builtin_ctz and __builtin_clz functions. + +Documentation improvements + + * Existing libstdc++ documentation has been edited and restructured + into a single DocBook XML manual. The results can be viewed online + [21]here. + +Other significant improvements + + * The compiler's --help command-line option has been extended so that + it now takes an optional set of arguments. These arguments restrict + the information displayed to specific classes of command-line + options, and possibly only a subset of those options. It is also + now possible to replace the descriptive text associated with each + displayed option with an indication of its current value, or for + binary options, whether it has been enabled or disabled. + Here are some examples. The following will display all the options + controlling warning messages: + --help=warnings + + Whereas this will display all the undocumented, target specific + options: + --help=target,undocumented + + This sequence of commands will display the binary optimizations + that are enabled by -O3: + gcc -c -Q -O3 --help=optimizers > /tmp/O3-opts + gcc -c -Q -O2 --help=optimizers > /tmp/O2-opts + diff /tmp/O2-opts /tmp/O3-opts | grep enabled + + * The configure options --with-pkgversion and --with-bugurl have been + added. These allow distributors of GCC to include a + distributor-specific string in manuals and --version output and to + specify the URL for reporting bugs in their versions of GCC. + +[22]GCC 4.3.1 + + This is the [23]list of problem reports (PRs) from GCC's bug tracking + system that are known to be fixed in the 4.3.1 release. This list might + not be complete (that is, it is possible that some PRs that have been + fixed are not listed here). + +Target Specific Changes + + IA-32/x86-64 + + ABI changes + + * Starting with GCC 4.3.1, decimal floating point variables are + aligned to their natural boundaries when they are passed on the + stack for i386. + + Command-line changes + + * Starting with GCC 4.3.1, the -mcld option has been added to + automatically generate a cld instruction in the prologue of + functions that use string instructions. This option is used for + backward compatibility on some operating systems and can be enabled + by default for 32-bit x86 targets by configuring GCC with the + --enable-cld configure option. + +[24]GCC 4.3.2 + + This is the [25]list of problem reports (PRs) from GCC's bug tracking + system that are known to be fixed in the 4.3.2 release. This list might + not be complete (that is, it is possible that some PRs that have been + fixed are not listed here). + +[26]GCC 4.3.3 + + This is the [27]list of problem reports (PRs) from GCC's bug tracking + system that are known to be fixed in the 4.3.3 release. This list might + not be complete (that is, it is possible that some PRs that have been + fixed are not listed here). + +[28]GCC 4.3.4 + + This is the [29]list of problem reports (PRs) from GCC's bug tracking + system that are known to be fixed in the 4.3.4 release. This list might + not be complete (that is, it is possible that some PRs that have been + fixed are not listed here). + +[30]GCC 4.3.5 + + This is the [31]list of problem reports (PRs) from GCC's bug tracking + system that are known to be fixed in the 4.3.5 release. This list might + not be complete (that is, it is possible that some PRs that have been + fixed are not listed here). + +[32]GCC 4.3.6 + + This is the [33]list of problem reports (PRs) from GCC's bug tracking + system that are known to be fixed in the 4.3.6 release. This list might + not be complete (that is, it is possible that some PRs that have been + fixed are not listed here). + + + For questions related to the use of GCC, please consult these web + pages and the [34]GCC manuals. If that fails, the + [35]gcc-help@gcc.gnu.org mailing list might help. Comments on these + web pages and the development of GCC are welcome on our developer + list at [36]gcc@gcc.gnu.org. All of [37]our lists have public + archives. + + Copyright (C) [38]Free Software Foundation, Inc. Verbatim copying and + distribution of this entire article is permitted in any medium, + provided this notice is preserved. + + These pages are [39]maintained by the GCC team. Last modified + 2025-01-31. + +References + + 1. https://gcc.gnu.org/gcc-4.3/changes.html#4.3.5 + 2. https://gmplib.org/ + 3. https://www.mpfr.org/ + 4. https://gcc.gnu.org/install/prerequisites.html + 5. https://gcc.gnu.org/ml/gcc-announce/2001/msg00000.html + 6. https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#Warning-Options + 7. https://gcc.gnu.org/gcc-4.3/porting_to.html + 8. https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html + 9. https://gcc.gnu.org/gcc-4.3/cxx0x_status.html + 10. https://gcc.gnu.org/gcc-4.3/cxx0x_status.html + 11. https://gcc.gnu.org/onlinedocs/libstdc++/manual/parallel_mode.html + 12. https://gcc.gnu.org/onlinedocs/gfortran/Code-Gen-Options.html#Code-Gen-Options + 13. https://gcc.gnu.org/onlinedocs/gfortran/Code-Gen-Options.html#index-g_t_0040code_007bfinit-local-zero_007d-167 + 14. https://gcc.gnu.org/onlinedocs/gcc-4.3.0/gfortran/GAMMA.html + 15. https://gcc.gnu.org/onlinedocs/gcc-4.3.0/gfortran/LGAMMA.html + 16. https://gcc.gnu.org/onlinedocs/gfortran/Fortran-Dialect-Options.html + 17. https://gcc.gnu.org/onlinedocs/gfortran/BOZ-literal-constants.html + 18. https://gcc.gnu.org/gcc-4.3/changes.html#targets + 19. https://gcc.gnu.org/gcc-4.3/changes.html#cris + 20. https://gcc.gnu.org/gcc-4.3/changes.html#m68k + 21. https://gcc.gnu.org/onlinedocs/libstdc++/ + 22. https://gcc.gnu.org/gcc-4.3/changes.html#GCC4.3.1 + 23. https://gcc.gnu.org/bugzilla/buglist.cgi?bug_status=RESOLVED&resolution=FIXED&target_milestone=4.3.1 + 24. https://gcc.gnu.org/gcc-4.3/changes.html#GCC4.3.2 + 25. https://gcc.gnu.org/bugzilla/buglist.cgi?bug_status=RESOLVED&resolution=FIXED&target_milestone=4.3.2 + 26. https://gcc.gnu.org/gcc-4.3/changes.html#GCC4.3.3 + 27. https://gcc.gnu.org/bugzilla/buglist.cgi?bug_status=RESOLVED&resolution=FIXED&target_milestone=4.3.3 + 28. https://gcc.gnu.org/gcc-4.3/changes.html#GCC4.3.4 + 29. https://gcc.gnu.org/bugzilla/buglist.cgi?bug_status=RESOLVED&resolution=FIXED&target_milestone=4.3.4 + 30. https://gcc.gnu.org/gcc-4.3/changes.html#GCC4.3.5 + 31. https://gcc.gnu.org/bugzilla/buglist.cgi?bug_status=RESOLVED&resolution=FIXED&target_milestone=4.3.5 + 32. https://gcc.gnu.org/gcc-4.3/changes.html#GCC4.3.6 + 33. https://gcc.gnu.org/bugzilla/buglist.cgi?bug_status=RESOLVED&resolution=FIXED&target_milestone=4.3.6 + 34. https://gcc.gnu.org/onlinedocs/ + 35. mailto:gcc-help@gcc.gnu.org + 36. mailto:gcc@gcc.gnu.org + 37. https://gcc.gnu.org/lists.html + 38. https://www.fsf.org/ + 39. https://gcc.gnu.org/about.html +====================================================================== +http://gcc.gnu.org/gcc-4.2/index.html + GCC 4.2 Release Series + + (This release series is no longer supported.) + + May 19, 2008 + + The [1]GNU project and the GCC developers are pleased to announce the + release of GCC 4.2.4. + + This release is a bug-fix release, containing fixes for regressions in + GCC 4.2.3 relative to previous releases of GCC. + +Release History + + GCC 4.2.4 + May 19, 2008 ([2]changes) + + GCC 4.2.3 + February 1, 2008 ([3]changes) + + GCC 4.2.2 + October 7, 2007 ([4]changes) + + GCC 4.2.1 + July 18, 2007 ([5]changes) + + GCC 4.2.0 + May 13, 2007 ([6]changes) + +References and Acknowledgements + + GCC used to stand for the GNU C Compiler, but since the compiler + supports several other languages aside from C, it now stands for the + GNU Compiler Collection. + + A list of [7]successful builds is updated as new information becomes + available. + + The GCC developers would like to thank the numerous people that have + contributed new features, improvements, bug fixes, and other changes as + well as test results to GCC. This [8]amazing group of volunteers is + what makes GCC successful. + + For additional information about GCC please refer to the [9]GCC project + web site or contact the [10]GCC development mailing list. + + To obtain GCC please use [11]our mirror sites or [12]our version + control system. + + + For questions related to the use of GCC, please consult these web + pages and the [13]GCC manuals. If that fails, the + [14]gcc-help@gcc.gnu.org mailing list might help. Comments on these + web pages and the development of GCC are welcome on our developer + list at [15]gcc@gcc.gnu.org. All of [16]our lists have public + archives. + + Copyright (C) [17]Free Software Foundation, Inc. Verbatim copying and + distribution of this entire article is permitted in any medium, + provided this notice is preserved. + + These pages are [18]maintained by the GCC team. Last modified + 2022-10-26. + +References + + 1. http://www.gnu.org/ + 2. https://gcc.gnu.org/gcc-4.2/changes.html + 3. https://gcc.gnu.org/gcc-4.2/changes.html + 4. https://gcc.gnu.org/gcc-4.2/changes.html + 5. https://gcc.gnu.org/gcc-4.2/changes.html + 6. https://gcc.gnu.org/gcc-4.2/changes.html + 7. https://gcc.gnu.org/gcc-4.2/buildstat.html + 8. https://gcc.gnu.org/onlinedocs/gcc/Contributors.html + 9. https://gcc.gnu.org/index.html + 10. mailto:gcc@gcc.gnu.org + 11. https://gcc.gnu.org/mirrors.html + 12. https://gcc.gnu.org/git.html + 13. https://gcc.gnu.org/onlinedocs/ + 14. mailto:gcc-help@gcc.gnu.org + 15. mailto:gcc@gcc.gnu.org + 16. https://gcc.gnu.org/lists.html + 17. https://www.fsf.org/ + 18. https://gcc.gnu.org/about.html +====================================================================== +http://gcc.gnu.org/gcc-4.2/changes.html + GCC 4.2 Release Series + Changes, New Features, and Fixes + +Caveats + + * GCC no longer accepts the -fshared-data option. This option has had + no effect in any GCC 4 release; the targets to which the option + used to apply had been removed before GCC 4.0. + +General Optimizer Improvements + + * New command-line options specify the possible relationships among + parameters and between parameters and global data. For example, + -fargument-noalias-anything specifies that arguments do not alias + any other storage. + Each language will automatically use whatever option is required by + the language standard. You should not need to use these options + yourself. + +New Languages and Language specific improvements + + * [1]OpenMP is now supported for the C, C++ and Fortran compilers. + * New command-line options -fstrict-overflow and -Wstrict-overflow + have been added. -fstrict-overflow tells the compiler that it may + assume that the program follows the strict signed overflow + semantics permitted for the language: for C and C++ this means that + the compiler may assume that signed overflow does not occur. For + example, a loop like + for (i = 1; i > 0; i *= 2) + + is presumably intended to continue looping until i overflows. With + -fstrict-overflow, the compiler may assume that signed overflow + will not occur, and transform this into an infinite loop. + -fstrict-overflow is turned on by default at -O2, and may be + disabled via -fno-strict-overflow. The -Wstrict-overflow option may + be used to warn about cases where the compiler assumes that signed + overflow will not occur. It takes five different levels: + -Wstrict-overflow=1 to 5. See the [2]documentation for details. + -Wstrict-overflow=1 is enabled by -Wall. + * The new command-line option -fno-toplevel-reorder directs GCC to + emit top-level functions, variables, and asm statements in the same + order that they appear in the input file. This is intended to + support existing code which relies on a particular ordering (for + example, code which uses top-level asm statements to switch + sections). For new code, it is generally better to use function and + variable attributes. The -fno-toplevel-reorder option may be used + for most cases which currently use -fno-unit-at-a-time. The + -fno-unit-at-a-time option will be removed in some future version + of GCC. If you know of a case which requires -fno-unit-at-a-time + which is not fixed by -fno-toplevel-reorder, please open a bug + report. + + C family + + * The pragma redefine_extname will now macro expand its tokens for + compatibility with SunPRO. + * In the next release of GCC, 4.3, -std=c99 or -std=gnu99 will direct + GCC to handle inline functions as specified in the C99 standard. In + preparation for this, GCC 4.2 will warn about any use of non-static + inline functions in gnu99 or c99 mode. This new warning may be + disabled with the new gnu_inline function attribute or the new + -fgnu89-inline command-line option. Also, GCC 4.2 and later will + define one of the preprocessor macros __GNUC_GNU_INLINE__ or + __GNUC_STDC_INLINE__ to indicate the semantics of inline functions + in the current compilation. + * A new command-line option -Waddress has been added to warn about + suspicious uses of memory addresses as, for example, using the + address of a function in a conditional expression, and comparisons + against the memory address of a string literal. This warning is + enabled by -Wall. + + C++ + + * C++ visibility handling has been overhauled. + Restricted visiblity is propagated from classes to members, from + functions to local statics, and from templates and template + arguments to instantiations, unless the latter has explicitly + declared visibility. + The visibility attribute for a class must come between the + class-key and the name, not after the closing brace. + Attributes are now allowed for enums and elaborated-type-specifiers + that only declare a type. + Members of the anonymous namespace are now local to a particular + translation unit, along with any other declarations which use them, + though they are still treated as having external linkage for + language semantics. + * The (undocumented) extension which permitted templates with default + arguments to be bound to template template parameters with fewer + parameters has been removed. For example: + template