r8-1253-g3d2e25a240c711 removed the template argument linkage requirement in convert_nontype_argument for C++17 (which r9-3836-g4be5c72cf3ea3e later factored out into invalid_tparm_referent_p), but we need to also remove the one in convert_nontype_argument_function for benefit of the first and third testcase which we currently reject even in C++17/20 mode. And in invalid_tparm_referent_p we're inadvertendly returning false for the address of a lambda's static op() since it's DECL_ARTIFICIAL, which currently causes us to reject the second (C++20) testcase. But this DECL_ARTIFICIAL check seems to be relevant only for VAR_DECL, and in fact this code path was originally reachable only for VAR_DECL until recently (r13-6970-gb5e38b1c166357). So this patch restricts the check to VAR_DECL. Co-authored-by: Jonathan Wakely <jwakely@redhat.com> PR c++/83258 PR c++/80488 PR c++/97700 gcc/cp/ChangeLog: * pt.cc (convert_nontype_argument_function): Remove linkage requirement for C++17 and later. (invalid_tparm_referent_p) <case ADDR_EXPR>: Restrict DECL_ARTIFICIAL rejection test to VAR_DECL. gcc/testsuite/ChangeLog: * g++.dg/ext/visibility/anon8.C: Don't expect a "no linkage" error for the template argument &B2:fn in C++17 mode. * g++.dg/cpp0x/lambda/lambda-conv15.C: New test. * g++.dg/cpp2a/nontype-class56.C: New test. * g++.dg/template/function2.C: New test. (cherry picked from commit c3afdb8ba8f1839544c414f57e41a58c8fda5349)
…
…
…
rust: Disable --enable-languages=rust and silently exclude it from --enable-languages=all for GCC 13
rust: Disable --enable-languages=rust and silently exclude it from --enable-languages=all for GCC 13
…
…
…
…
…
…
…
…
This directory contains the GNU Compiler Collection (GCC). The GNU Compiler Collection is free software. See the files whose names start with COPYING for copying permission. The manuals, and some of the runtime libraries, are under different terms; see the individual source files for details. The directory INSTALL contains copies of the installation information as HTML and plain text. The source of this information is gcc/doc/install.texi. The installation information includes details of what is included in the GCC sources and what files GCC installs. See the file gcc/doc/gcc.texi (together with other files that it includes) for usage and porting information. An online readable version of the manual is in the files gcc/doc/gcc.info*. See http://gcc.gnu.org/bugs/ for how to report bugs usefully. Copyright years on GCC source files may be listed using range notation, e.g., 1987-2012, indicating that every year in the range, inclusive, is a copyrightable year that could otherwise be listed individually.
Description
Languages
C++
33%
C
27.4%
Ada
13%
Go
7.1%
D
7%
Other
12.1%