public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "markmigm at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/103499] C++20 modules error: invalid use of non-static member function
Date: Sat, 03 Sep 2022 20:43:57 +0000 [thread overview]
Message-ID: <bug-103499-4-HiSsCp0M2Z@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-103499-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103499
--- Comment #2 from Mark Millard <markmigm at gmail dot com> ---
(In reply to Mark Millard from comment #1)
> // g++12 -std=c++20 -fmodules-ts -xc++ -c gpp12_module_iostream_failure.cppm
> // g++12 -freport-bug -std=c++20 -fmodules-ts -c
> gpp12_module_iostream_failure.cpp
The iostream based file names were from before I reduced
the test to the smaller test case. The updated comments are:
// g++12 -std=c++20 -fmodules-ts -xc++ -c
gpp12_module_is_nothrow_constructible_v_failure.cppm
// g++12 -std=c++20 -fmodules-ts -xc++ -c
gpp12_module_is_nothrow_constructible_v_failure.cpp
On Fedora 26, where "c++" is g++ 12.2.1, I've tried the same,
with the copies of the source code, and it gets the same error.
The -freport-bug outout is shown below.
# more /tmp/ccRnanx8.out
// Target: aarch64-redhat-linux
// Configured with: ../configure --enable-bootstrap
--enable-languages=c,c++,fortran,objc,obj-c++,ada,go,lto --prefix=/usr
--mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzil
la.redhat.com/bugzilla --enable-shared --enable-threads=posix
--enable-checking=release --enable-multilib --with-system-zlib
--enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-ob
ject --enable-linker-build-id --with-gcc-major-version-only
--enable-libstdcxx-backtrace --with-linker-hash-style=gnu --enable-plugin
--enable-initfini-array --with-isl=/builddir/build/BUILD/gcc-12.2.
1-20220819/obj-aarch64-redhat-linux/isl-install --enable-gnu-indirect-function
--build=aarch64-redhat-linux --with-build-config=bootstrap-lto
--enable-link-serialization=1
// Thread model: posix
// Supported LTO compression algorithms: zlib zstd
// gcc version 12.2.1 20220819 (Red Hat 12.2.1-1) (GCC)
//
// In module /usr/include/c++/12/type_traits, imported at
gpp12_module_is_nothrow_constructible_v_failure.cpp:7:
// /usr/include/c++/12/type_traits: In substitution of ‘template<class _Tp,
class ... _Args> using __is_nothrow_constructible_impl =
std::__bool_constant<__is_nothrow_constructible(_Tp)> [with _Tp = d
erived@derived_interface; _Args = {}]’:
// /usr/include/c++/12/type_traits:1047:12: required from ‘struct
std::is_nothrow_constructible<derived@derived_interface>’
// /usr/include/c++/12/type_traits:3243:46: required from ‘constexpr const
bool std::is_nothrow_constructible_v<derived@derived_interface>’
// gpp12_module_is_nothrow_constructible_v_failure.cpp:11:11: required from
here
// /usr/include/c++/12/type_traits:1041:11: error: invalid use of non-static
member function ‘virtual constexpr derived@derived_interface::~derived()’
// 1041 | using __is_nothrow_constructible_impl
// | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// In module derived_interface, imported at
gpp12_module_is_nothrow_constructible_v_failure.cpp:5:
// gpp12_module_is_nothrow_constructible_v_failure.cppm:10:15: note: declared
here
// 10 | export struct derived : base
// | ^~~~~~~
// /usr/include/c++/12/type_traits:1041: confused by earlier errors, bailing
out
// /usr/libexec/gcc/aarch64-redhat-linux/12/cc1plus -quiet -D_GNU_SOURCE
gpp12_module_is_nothrow_constructible_v_failure.cpp -quiet -dumpbase
gpp12_module_is_nothrow_constructible_v_failure.cpp -dumpb
ase-ext .cpp -mlittle-endian -mabi=lp64 -std=c++20 -freport-bug -fmodules-ts -o
- -frandom-seed=0 -fdump-noaddr
# 0 "gpp12_module_is_nothrow_constructible_v_failure.cpp"
# 0 "<built-in>"
# 0 "<command-line>"
# 1 "/usr/include/stdc-predef.h" 1 3 4
# 0 "<command-line>" 2
# 1 "gpp12_module_is_nothrow_constructible_v_failure.cpp"
import derived_interface;
import "/usr/include/c++/12/type_traits";
void test()
{
if (std::is_nothrow_constructible_v<derived>);
}
next prev parent reply other threads:[~2022-09-03 20:43 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-30 16:35 [Bug c++/103499] New: " oleg at smolsky dot net
2022-09-02 20:28 ` [Bug c++/103499] " markmigm at gmail dot com
2022-09-03 20:43 ` markmigm at gmail dot com [this message]
2022-09-08 4:58 ` markmigm at gmail dot com
2023-06-02 19:27 ` pinskia at gcc dot gnu.org
2023-06-05 8:38 ` redi at gcc dot gnu.org
2023-06-05 13:44 ` markmigm at gmail dot com
2023-11-14 19:43 ` cvs-commit at gcc dot gnu.org
2024-02-10 4:32 ` nshead at gcc dot gnu.org
2024-03-08 16:03 ` ppalka at gcc dot gnu.org
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=bug-103499-4-HiSsCp0M2Z@http.gcc.gnu.org/bugzilla/ \
--to=gcc-bugzilla@gcc.gnu.org \
--cc=gcc-bugs@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).