public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "janezz55 at gmail dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/109775] New: gcc misidentifies a VLA Date: Mon, 08 May 2023 16:07:23 +0000 [thread overview] Message-ID: <bug-109775-4@http.gcc.gnu.org/bugzilla/> (raw) https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109775 Bug ID: 109775 Summary: gcc misidentifies a VLA Product: gcc Version: 13.1.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: janezz55 at gmail dot com Target Milestone: --- If I compile the example .cpp file: gcc -std=c++20 -Wextra -Wall -Wpedantic add_sub_tests.cpp -o a gcc produces the warning: ../intt.hpp: In member function 'constexpr auto intt::intt< <template-parameter-1-1>, N, <anonymous> >::naimul(const intt::intt< <template-parameter-1-1>, N, <anonymous> >&) const': ../intt.hpp:675:24: warning: ISO C++ forbids variable length array 'v_' [-Wvla] 675 | D const pp(D(v_[i]) * o.v_[S - i]); | ^~ But no VLA is involved and clang++ 15 manages to avoid this issue. The example file is here: https://github.com/user1095108/intt/blob/master/tests/add_sub_tests.cpp I believe the bug was present in prior versions of gcc as well.
next reply other threads:[~2023-05-08 16:07 UTC|newest] Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-05-08 16:07 janezz55 at gmail dot com [this message] 2023-05-08 16:13 ` [Bug c++/109775] " pinskia at gcc dot gnu.org 2023-05-08 16:17 ` pinskia at gcc dot gnu.org 2023-05-08 16:46 ` pinskia at gcc dot gnu.org 2023-05-08 16:48 ` pinskia at gcc dot gnu.org 2023-05-08 16:49 ` pinskia 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-109775-4@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: linkBe 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).