[PATCH] libstdc++: container erasure overloads (P2077) [PR117404]

2025-11-08 Thread Nathan Myers
Implement C++23 P2077R3 "Heterogeneous erasure overloads for associative containers". Adds template overloads for members erase and extract to address elements using an alternative key type, such as string_view for a container of strings, without need to construct an actual key object. The new ove

[PATCH v2] c++: Fold non-ODR usages of potentially constant values early [PR120005]

2025-11-08 Thread Nathaniel Shead
On Tue, Oct 28, 2025 at 04:57:01PM +1100, Nathaniel Shead wrote: > On Fri, Oct 03, 2025 at 05:28:59PM +0100, Jason Merrill wrote: > > On 10/2/25 2:13 PM, Nathaniel Shead wrote: > > > Bootstrapped and regtested on x86_64-pc-linux-gnu, OK for trunk? > > > > > > This approach does have some downsides

[PATCH] gcc: quote some expressions in `test x...`

2025-11-08 Thread Sam James
$gcc_cv_nm may contain a string with spaces since r16-4178-g6051a849aa1e8e and r16-5013-gf8bb20167f8127. It was possible for this to happen via strange user input in the past too. `test x$gcc_cv_nm != x` therefore produces some noise like: ``` checking assembler for working .subsection -1...

Re: [PATCH v2 1/2] libstdc++: optional for function and unbounded array should not be range [PR122396]

2025-11-08 Thread Jonathan Wakely
On Sun, 9 Nov 2025 at 00:59, Jonathan Wakely wrote: > > On Fri, 7 Nov 2025 at 16:14, Tomasz Kamiński wrote: > > > > This implements proposed resolution for LWG4308 [1]. > > > > For T denoting either function type or unbounded array, the optional no > > longer exposes iterator, and viable begin/en

Re: [PATCH v2 1/2] libstdc++: optional for function and unbounded array should not be range [PR122396]

2025-11-08 Thread Jonathan Wakely
On Fri, 7 Nov 2025 at 16:14, Tomasz Kamiński wrote: > > This implements proposed resolution for LWG4308 [1]. > > For T denoting either function type or unbounded array, the optional no > longer exposes iterator, and viable begin/end members. The conditionally > provided iterator type, it is now de

[PATCH] libstdc++: Implement P1789R3 - Library Support for Expansion Statements

2025-11-08 Thread Matthias Wippich
The attached patch implements P1789R3 by making std::integer_sequence decomposable. This paper was approved for inclusion in C++26 by LWG motion 14 of the 2025 Kona meeting. Tested on x86_64-linux locally. From 0b4a71ef13e220cc17edc2d53c41bafc195d6186 Mon Sep 17 00:00:00 2001 From: Matthias Wippic

Re: [riscv] per-cpu abi defaults

2025-11-08 Thread Kito Cheng
I incline to set default abi by march if mabi is not given, rather than by mcpu. one point is I don’t want to introduce an incompatible behavior with clang, and the rule of inference abi from march is already in clang. Nathan Sidwell 於 2025年11月9日 週日,01:43寫道: > We have multiple cpus with differe

[PATCH] x32/baseline_symbols.txt: Remove __once_call/__once_callable

2025-11-08 Thread H.J. Lu
Since _GLIBCXX_HAVE_TLS isn't defined for x32, remove _ZSt11__once_call and _ZSt15__once_callable. * config/abi/post/x86_64-linux-gnu/x32/baseline_symbols.txt: Remove _ZSt11__once_call and _ZSt15__once_callable. I am checking in this patch. -- H.J. From 8d182c8dbdad433ba19691a884fd23567c88dfcf

[PATCH] gcc.dg/pr90838.c: Adjust for x32

2025-11-08 Thread H.J. Lu
Adjust gcc.dg/pr90838.c for x32 which has 32-bit long with x86-64 ISA. * gcc.dg/pr90838.c: Adjust for x32 I am checking in this patch for x32. -- H.J. From 178550642880e67c24372eec988a65d171d0ada1 Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Sun, 9 Nov 2025 05:45:25 +0800 Subject: [PATCH] gc

[PATCH v2 1/1] c: Refactor c_parser_unary_expression()

2025-11-08 Thread Alejandro Colomar
Store the 'rid' value in a local variable, and pass it to functions that handle various keywords. This simplifies the code, and removes some wrappers. No functional change intended. gcc/c/ChangeLog: * c-parser.cc (c_parser_sizeof_expression): Remove function. (c_parser_countof_e

[PATCH v2 0/1] c: Refactor c_parser_unary_expression()

2025-11-08 Thread Alejandro Colomar
Hi Joseph, I've rebased on top of trunk. The conflict was with RID_STATIC_ASSERT, but nothing important. I've tested again for regressions, and all's good. alx@devuan:~/src/gnu/gcc/countof$ git log --oneline gnu/master^..countof2 6c2034f3c38a (HEAD -> countof, tag: countof2) c:

New Spanish PO file for 'gcc' (version 15.2.0)

2025-11-08 Thread Translation Project Robot
Hello, gentle maintainer. This is a message from the Translation Project robot. A revised PO file for textual domain 'gcc' has been submitted by the Spanish team of translators. The file is available at: https://translationproject.org/latest/gcc/es.po (This file, 'gcc-15.2.0.es.po', has ju

[PATCH 11/11] Documentation for -fident and -Qy/-Qn options [PR122243]

2025-11-08 Thread Sandra Loosemore
I noticed that the comments for -fident in common.opt were garbled, and its description is confusing; this is classed as a code generation option rather than a preprocessor option, and it controls emission of all ".ident" directives in the assembly file, not just those inserted by the "#ident" prep

[PATCH 10/11] Document linker options + -Q and -S [PR122243]

2025-11-08 Thread Sandra Loosemore
This patch adds documentation for several options that the GCC driver passes to the linker via specs without further interpretation. I've also added some comments/documentation strings to common.opt for these and a couple other options that previously didn't have any. gcc/ChangeLog PR oth

[PATCH 09/11] Add missing documentation for some -f, -g, and -W options [PR122243] [PR120064]

2025-11-08 Thread Sandra Loosemore
gcc/ChangeLog PR other/122243 PR rtl-optimization/120064 * doc/invoke.texi: Document -fconcepts-diagnostics-depth, -Wdeprecated-copy-dtor, -Wformat-diag, -Wcannot-profile, -fvar-tracking-uninit, -gno-pubnames, -finline-atomics, -fext-dce, -fipa-icf-fu

[PATCH 07/11] Only document -A/--assert options in cpp manual [PR122243]

2025-11-08 Thread Sandra Loosemore
Assertions are a preprocessor feature that has been declared obsolete with strong warnings not to use them since 2001. The main GCC manual documents the -A command-line option but doesn't include the section that explains the purpose of the feature or that it is obsolete; that material appears onl

[PATCH 06/11] Add missing options to option summary [PR122243]

2025-11-08 Thread Sandra Loosemore
I noticed that several options (mostly C++ options, including those for contracts) were documented in the manual but were not listed in the corresponding option summary table. Besides adding the entries, I also corrected the alphabetization in the C++ option table and some formatting issues for op

[PATCH 08/11] Document long-form command-line options [PR122243]

2025-11-08 Thread Sandra Loosemore
GCC has long supported long-form command-line options with the same meanings as its traditional one-character options, e.g. --output as an alias for -o, --language for -x, and so on. However, these have never been documented in the manual. This patch adds the missing documentation for these optio

[PATCH 01/11] Fix typos in @opindex entries [PR122243]

2025-11-08 Thread Sandra Loosemore
gcc/ChangeLog PR other/122243 * doc/invoke.texi (fdump-analyzer-exploded-nodes): Correct spelling of option in @opindex. (fdump-analyzer-exploded-nodes-2): Likewise. (fdump-analyzer-exploded-nodes-3): Likewise. (fdump-analyzer-feasibility): Likewise.

[PATCH 03/11] Mark some unused/undocumented options as "Ignore" [PR122243]

2025-11-08 Thread Sandra Loosemore
gcc/c-family/ChangeLog PR other/PR122243 * c.opt (Wsynth): Mark as "Ignore". gcc/ChangeLog PR other/PR122243 * common.opt (ftree-lrs): Mark as "Ignore". --- gcc/c-family/c.opt | 4 ++-- gcc/common.opt | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-)

[PATCH 05/11] Mark some undocumented options as such [PR122243]

2025-11-08 Thread Sandra Loosemore
We have a number of command-line options that are undocumented (either intentionally or because they are obsolete and retained only for compatibility), that ought to be marked as "Undocumented". I've also added some comments to the .opt files. gcc/c-family/ChangeLog PR other/122243

[PATCH 02/11] Add some missing @opindex entries [PR122243]

2025-11-08 Thread Sandra Loosemore
The options handled in this patch already have documentation but are either missing an @opindex entry entirely, or index only the negative option form. gcc/ChangeLog PR other/122243 * doc/cppopts.texi (fcanonical-system-headers): Add @opindex. * doc/invoke.texi (fdump-ada-s

[PATCH 04/11] Add "RejectNegative" to some options where it doesn't make sense [PR122243]

2025-11-08 Thread Sandra Loosemore
This patch adds the "RejectNegative" property to several options where it doesn't make sense. These are either options of the form "name=value" rather than an on/off switch, those that are already in a "no-" form, or options that form a mutually-exclusive set. Also, the fhelp, ftarget-help, and f

[RFC 00/11] Documentation and .opt file fixes for PR122243

2025-11-08 Thread Sandra Loosemore
For PR122243 I have been trying to systematically identify GCC command-line options that are missing documentation, and fixing them. I've found that most of problems fall into one of three categories: (1) Options that should be documented, but are missing from at least one of the three places

[PATCH] builtins: Fix atomics expansion after build_call_nary change [PR122605]

2025-11-08 Thread Andrew Pinski
So before r16-5089-gc66ebc3e22138, we could call build_call_nary with more arguments than was passed as the nargs. Afterwards we get an assert if there were not exactly that amount. In this case the code is easier to read when passing the correct number of args in the first place. This fixes the tw

[Ada] Fix bogus error on limited with clause and private parent package

2025-11-08 Thread Eric Botcazou
The implementation of the 10.1.2(8/2-11/2) subclauses that establish rules for the legality of "with" clauses of private child units is done separately for regular "with" clauses (in Check_Private_Child_Unit) and for limited "with" clauses (in Check_Private_Limited_Withed_Unit). The attached te

[riscv] per-cpu abi defaults

2025-11-08 Thread Nathan Sidwell
We have multiple cpus with different abis (combinations of 32 vs 64, float vs no-float, etc). It's annoying having to specify both -mcpu=thing and the correct -mabi=thing. Just as with -mcpu selecting a default ISA set, this adds smarts for it to select a default ABI. You can still specify -

Re: [PATCH] fortran: Fix ICE and self-assignment bugs with recursive allocatable finalizers [PR90519]

2025-11-08 Thread Jerry D
On 11/7/25 8:30 PM, Christopher Albert wrote: Derived types with recursive allocatable components and FINAL procedures trigger an ICE in gimplify_call_expr because the finalizer wrapper's result symbol references itself (final->result = final), creating a cycle. This patch creates a separate __re

[committed][RISC-V] Add testcase for shifted truthvalue

2025-11-08 Thread Jeff Law
I was doing some cleanup on our internal tree and noticed a pattern that I didn't think was actually useful in practice. Thankfully the internal commit included a testcase clearly targeting that pattern. I'm upstreaming the testcase, but not the unnecessary pattern. Jeff commit 191896c993b1b

Re: [PATCH] Fortran: F2018 extensions to interoperability of procedures [PR113338]

2025-11-08 Thread Harald Anlauf
Am 08.11.25 um 03:14 schrieb Jerry D: On 11/7/25 1:37 PM, Harald Anlauf wrote: Dear All, the attached patch adjust the checks for interoperability of procedures, the conditions of which were relaxed in F2018. The testcase is based on the one provided by the reporter. The added examples of int

[PATCH] libstdc++: std::bitset<0>("zero") should throw std::invalid_argument [PR121054]

2025-11-08 Thread ArktinenKarpalo
From: Karpalo Toivonen According to the standard the first n characters of a bitset constructor string need to be checked instead of only N. Tested on x86_64-linux. libstdc++-v3/ChangeLog: PR libstdc++/121054 * include/std/bitset: Add string check to constructor. * tests

RE: [PATCH] vect: Do not set range for step != 1 [PR121985].

2025-11-08 Thread Tamar Christina
> -Original Message- > From: Tamar Christina > Sent: 08 November 2025 11:34 > To: Robin Dapp ; gcc-patches [email protected]> > Subject: RE: [PATCH] vect: Do not set range for step != 1 [PR121985]. > > > -Original Message- > > From: Robin Dapp > > Sent: 07 November 2025 17:31

[COMMITTED] isel: Check bounds before converting VIEW_CONVERT to VEC_SET. [PR122126]

2025-11-08 Thread Avinash Jayakar
The function gimple_expand_vec_set_expr in the isel pass, converted VIEW_CONVERT_EXPR to VEC_SET_EXPR without checking the bounds on the index, which cause ICE on targets that supported VEC_SET_EXPR like x86 and powerpc. This patch adds a bound check on the index operand and rejects the conversion

RE: [PATCH] vect: Do not set range for step != 1 [PR121985].

2025-11-08 Thread Tamar Christina
> -Original Message- > From: Robin Dapp > Sent: 07 November 2025 17:31 > To: gcc-patches > Cc: Robin Dapp ; Tamar Christina > > Subject: [PATCH] vect: Do not set range for step != 1 [PR121985]. > > Hi, > > In PR120922 we first disabled setting a range on niters_vector for > partial vec