From: Andreas Schwab <schwab@linux-m68k.org>
To: Kito Cheng <kito.cheng@sifive.com>
Cc: gcc-patches@gcc.gnu.org, kito.cheng@gmail.com,
palmer@dabbelt.com, jeffreyalaw@gmail.com
Subject: Re: [PATCH v2] RISC-V: Implement target attribute
Date: Fri, 17 Nov 2023 16:41:05 +0100 [thread overview]
Message-ID: <87r0koz8tq.fsf@igel.home> (raw)
In-Reply-To: <20231114141513.24515-1-kito.cheng@sifive.com> (Kito Cheng's message of "Tue, 14 Nov 2023 22:15:13 +0800")
In file included from /daten/riscv64/gcc/gcc-20231117/Build/prev-riscv64-suse-linux/libstdc++-v3/include/memory:78,
from ../../gcc/system.h:769,
from ../../gcc/config/riscv/riscv-target-attr.cc:25:
In member function 'void std::default_delete<_Tp>::operator()(_Tp*) const [with _Tp = char]',
inlined from 'std::unique_ptr<_Tp, _Dp>::~unique_ptr() [with _Tp = char; _Dp = std::default_delete<char>]' at /daten/riscv64/gcc/gcc-20231117/Build/prev-riscv64-suse-linux/libstdc++-v3/include/bits/unique_ptr.h:398:17,
inlined from 'bool riscv_process_one_target_attr(char*, location_t, {anonymous}::riscv_target_attr_parser&)' at ../../gcc/config/riscv/riscv-target-attr.cc:274:1,
inlined from 'bool riscv_process_target_attr(tree, location_t, gcc_options*)' at ../../gcc/config/riscv/riscv-target-attr.cc:346:37:
/daten/riscv64/gcc/gcc-20231117/Build/prev-riscv64-suse-linux/libstdc++-v3/include/bits/unique_ptr.h:93:9: error: 'void operator delete(void*, std::size_t)' called on pointer returned from a mismatched allocation function [-Werror=mismatched-new-delete]
93 | delete __ptr;
| ^~~~~~~~~~~~
In function 'bool riscv_process_one_target_attr(char*, location_t, {anonymous}::riscv_target_attr_parser&)',
inlined from 'bool riscv_process_target_attr(tree, location_t, gcc_options*)' at ../../gcc/config/riscv/riscv-target-attr.cc:346:37:
../../gcc/config/riscv/riscv-target-attr.cc:244:42: note: returned from 'void* operator new [](std::size_t)'
244 | std::unique_ptr<char> buf (new char[len]);
| ^
In member function 'void std::default_delete<_Tp>::operator()(_Tp*) const [with _Tp = char]',
inlined from 'std::unique_ptr<_Tp, _Dp>::~unique_ptr() [with _Tp = char; _Dp = std::default_delete<char>]' at /daten/riscv64/gcc/gcc-20231117/Build/prev-riscv64-suse-linux/libstdc++-v3/include/bits/unique_ptr.h:398:17,
inlined from 'bool riscv_process_target_attr(tree, location_t, gcc_options*)' at ../../gcc/config/riscv/riscv-target-attr.cc:361:1:
/daten/riscv64/gcc/gcc-20231117/Build/prev-riscv64-suse-linux/libstdc++-v3/include/bits/unique_ptr.h:93:9: error: 'void operator delete(void*, std::size_t)' called on pointer returned from a mismatched allocation function [-Werror=mismatched-new-delete]
93 | delete __ptr;
| ^~~~~~~~~~~~
../../gcc/config/riscv/riscv-target-attr.cc: In function 'bool riscv_process_target_attr(tree, location_t, gcc_options*)':
../../gcc/config/riscv/riscv-target-attr.cc:330:42: note: returned from 'void* operator new [](std::size_t)'
330 | std::unique_ptr<char> buf (new char[len]);
| ^
In member function 'void std::default_delete<_Tp>::operator()(_Tp*) const [with _Tp = char]',
inlined from 'std::unique_ptr<_Tp, _Dp>::~unique_ptr() [with _Tp = char; _Dp = std::default_delete<char>]' at /daten/riscv64/gcc/gcc-20231117/Build/prev-riscv64-suse-linux/libstdc++-v3/include/bits/unique_ptr.h:398:17,
inlined from 'bool {anonymous}::riscv_target_attr_parser::parse_arch(const char*)' at ../../gcc/config/riscv/riscv-target-attr.cc:140:5,
inlined from 'bool {anonymous}::riscv_target_attr_parser::handle_arch(const char*)' at ../../gcc/config/riscv/riscv-target-attr.cc:158:21:
/daten/riscv64/gcc/gcc-20231117/Build/prev-riscv64-suse-linux/libstdc++-v3/include/bits/unique_ptr.h:93:9: error: 'void operator delete(void*, std::size_t)' called on pointer returned from a mismatched allocation function [-Werror=mismatched-new-delete]
93 | delete __ptr;
| ^~~~~~~~~~~~
In member function 'bool {anonymous}::riscv_target_attr_parser::parse_arch(const char*)',
inlined from 'bool {anonymous}::riscv_target_attr_parser::handle_arch(const char*)' at ../../gcc/config/riscv/riscv-target-attr.cc:158:21:
../../gcc/config/riscv/riscv-target-attr.cc:108:46: note: returned from 'void* operator new [](std::size_t)'
108 | std::unique_ptr<char> buf (new char[len]);
| ^
In member function 'void std::default_delete<_Tp>::operator()(_Tp*) const [with _Tp = char]',
inlined from 'std::unique_ptr<_Tp, _Dp>::~unique_ptr() [with _Tp = char; _Dp = std::default_delete<char>]' at /daten/riscv64/gcc/gcc-20231117/Build/prev-riscv64-suse-linux/libstdc++-v3/include/bits/unique_ptr.h:398:17,
inlined from 'bool {anonymous}::riscv_target_attr_parser::parse_arch(const char*)' at ../../gcc/config/riscv/riscv-target-attr.cc:140:5,
inlined from 'bool {anonymous}::riscv_target_attr_parser::handle_arch(const char*)' at ../../gcc/config/riscv/riscv-target-attr.cc:158:21:
/daten/riscv64/gcc/gcc-20231117/Build/prev-riscv64-suse-linux/libstdc++-v3/include/bits/unique_ptr.h:93:9: error: 'void operator delete(void*, std::size_t)' called on pointer returned from a mismatched allocation function [-Werror=mismatched-new-delete]
93 | delete __ptr;
| ^~~~~~~~~~~~
In member function 'bool {anonymous}::riscv_target_attr_parser::parse_arch(const char*)',
inlined from 'bool {anonymous}::riscv_target_attr_parser::handle_arch(const char*)' at ../../gcc/config/riscv/riscv-target-attr.cc:158:21:
../../gcc/config/riscv/riscv-target-attr.cc:108:46: note: returned from 'void* operator new [](std::size_t)'
108 | std::unique_ptr<char> buf (new char[len]);
| ^
cc1plus: all warnings being treated as errors
make[3]: *** [../../gcc/config/riscv/t-riscv:120: riscv-target-attr.o] Error 1
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1
"And now for something completely different."
next prev parent reply other threads:[~2023-11-17 15:41 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-14 14:15 Kito Cheng
2023-11-14 14:17 ` Kito Cheng
2023-11-15 23:58 ` Christoph Müllner
2023-11-16 11:40 ` Kito Cheng
2023-11-17 15:41 ` Andreas Schwab [this message]
2023-11-18 10:44 ` Kito Cheng
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=87r0koz8tq.fsf@igel.home \
--to=schwab@linux-m68k.org \
--cc=gcc-patches@gcc.gnu.org \
--cc=jeffreyalaw@gmail.com \
--cc=kito.cheng@gmail.com \
--cc=kito.cheng@sifive.com \
--cc=palmer@dabbelt.com \
/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).