public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug testsuite/113634] New: FAIL: gcc.dg/Wfree-nonheap-object-7.c, incorrect declaration for calloc()
@ 2024-01-28 7:45 nightstrike at gmail dot com
2024-01-28 7:53 ` [Bug testsuite/113634] " pinskia at gcc dot gnu.org
0 siblings, 1 reply; 2+ messages in thread
From: nightstrike at gmail dot com @ 2024-01-28 7:45 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113634
Bug ID: 113634
Summary: FAIL: gcc.dg/Wfree-nonheap-object-7.c, incorrect
declaration for calloc()
Product: gcc
Version: unknown
Status: UNCONFIRMED
Keywords: testsuite-fail
Severity: normal
Priority: P3
Component: testsuite
Assignee: unassigned at gcc dot gnu.org
Reporter: nightstrike at gmail dot com
Target Milestone: ---
This test uses an incorrect declaration for calloc():
void *calloc(long, long);
whereas the standard requires that it be:
void *calloc(size_t, size_t);
This can be replaced with:
void *calloc(__SIZE_TYPE__, __SIZE_TYPE__);
But I'd question why the test doesn't just include stdlib.h. Or, if the intent
is to avoid including headers as much as possible, use __builtin_calloc(),
which does the right thing. All three of these solutions work (header,
builtin, correct declaration).
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug testsuite/113634] FAIL: gcc.dg/Wfree-nonheap-object-7.c, incorrect declaration for calloc()
2024-01-28 7:45 [Bug testsuite/113634] New: FAIL: gcc.dg/Wfree-nonheap-object-7.c, incorrect declaration for calloc() nightstrike at gmail dot com
@ 2024-01-28 7:53 ` pinskia at gcc dot gnu.org
0 siblings, 0 replies; 2+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-01-28 7:53 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113634
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
realloc is wrong too ..
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-01-28 7:53 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-28 7:45 [Bug testsuite/113634] New: FAIL: gcc.dg/Wfree-nonheap-object-7.c, incorrect declaration for calloc() nightstrike at gmail dot com
2024-01-28 7:53 ` [Bug testsuite/113634] " pinskia at gcc dot gnu.org
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).