aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/interface.c
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2020-07-02 15:14:52 -0400
committerGiuliano Belinassi <giuliano.belinassi@usp.br>2020-08-17 13:17:16 -0300
commitf66b2b5cf1a9d192fcbbbe16233a8e67f70a4592 (patch)
treee7aff3abff6dc18b6f5cfea85644978535b122b5 /gcc/fortran/interface.c
parent2f58b9e7f21eaa87abf3f6b65e4d9285574020e5 (diff)
downloadgcc-f66b2b5cf1a9d192fcbbbe16233a8e67f70a4592.zip
gcc-f66b2b5cf1a9d192fcbbbe16233a8e67f70a4592.tar.gz
gcc-f66b2b5cf1a9d192fcbbbe16233a8e67f70a4592.tar.bz2
c++: Allow floating-point template parms in C++20.
P1907R1 made various adjustments to non-type template parameters, notably introducing the notion of "structural type". I implemented an early version of that specification in r10-4426, but it was adjusted in the final paper to allow more. This patch implements allowing template parameters of floating-point type; still to be implemented are unions and subobjects. gcc/cp/ChangeLog: * pt.c (convert_nontype_argument): Handle REAL_TYPE. (invalid_nontype_parm_type_p): Allow all structural types. * tree.c (structural_type_p): Use SCALAR_TYPE_P. gcc/testsuite/ChangeLog: * g++.dg/cpp0x/pr81246.C: No error in C++20. * g++.dg/cpp0x/variadic74.C: No error in C++20. * g++.dg/cpp1z/nontype-auto3.C: No error in C++20. * g++.dg/template/crash106.C: No error in C++20. * g++.dg/template/crash119.C: No error in C++20. * g++.dg/template/nontype12.C: No error in C++20. * g++.dg/template/void3.C: Don't require follow-on message. * g++.dg/template/void7.C: Don't require follow-on message. * g++.dg/template/void9.C: Don't require follow-on message.
Diffstat (limited to 'gcc/fortran/interface.c')
0 files changed, 0 insertions, 0 deletions